Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Modify y-axis unit type in diagram

Hello together,

 

I'm a pretty new Power Bi User, so maybe my problem will be quickly solved.

I would like to edit some units to my diagrams ( like [hour] , [pieces] or [liter] )

Unfortunately I just found for the y-axis after enabling "title on" these options:

- "show title"

- "show unit"

- "both"

 

But by using "show unit" there's just the title of my column. So how I can modify the units to [hour], [pieces] or [liter] ?

Do I have to create an extra column with a special measure or something like that?

 

Thank you very much for every helpful answer :)

 

Greetings,

 

Sven

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi Anonymous,

     

    I think you can try to rename visual field name to add unit.(notice: it not effect the original column name)

     

    Sample: Amount to Amount (units)

     

    Regards,

    Xiaoxin Sheng

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    I think you have misunderstood the 'unit'.

    Current power bi only support modify the axis numeric unit(e.g thousand, million, hundred), it not means the object unit.(e.g. pieces, liter, dozen...)

     

    For these situation, you need to add one table to store unit transform records and manually convert them in calculation.

     

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous,

       

      thank you very much for your information!

      You mean to calculate my column with a measure right? Like this:

      Water Unit = CALCULATE(SUM('Watertable'[Water]) & " liter")

      Or have I misunderssod something again?

       

      With this measure I couldn't visualize my data in a diagram cause there are no clear numbers...

       

      Watertable

       

      Watertable in query

       

      Best regards,

       

      Sven

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous,

         

        As I mentioned, current visual not support text value in value field. 

        For your requirement, you can create a unit convert table.(e.g.g In water table, it store liquid with 'Milliliter' unit)

         

        Sample:

        Name, Rate
        Milliliter,1
        liter, 0.001
        Gallon,0.00026

         

        Then you can add a slicer to choose unit and write a measure to dynamic transfer unit.

         

        Measure:

        dynamic =
        VAR selected =
            SELECTEDVALUE ( UnitTransform[Name] )
        VAR unit_rate =
            LOOKUPVALUE ( UnitTransform[Rate], UnitTransform[Name], selected )
        VAR current_value =
            MAX ( Watertable[Water] )
        RETURN
            current_value * MIN ( unit_rate, 1 )
        

         

        Regards,

        Xiaoxin Sheng