Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

dynamically change format in a calculated measure

Hi,

 

I have  a column chart drill down chart that has a calculated measure that changes between # of units and % market share based on the user selection in a slicer.  It works great except that the format doesn't change (i.e - I need the format to switch between % and #).  I can't use FORMAT( ) as it converts it to a string and blanks out the chart.  How do I make the % market share look like a % for the user (2.54% rather than .0254)?

 

Thank you in advance!

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Can you use some sort of IF statement and use a CONCATENATE, something like:

     

    CONCATENATE([column]*100,"%")
  • v-sihou-msft's avatar
    v-sihou-msft
    Microsoft Employee

    Anonymous

     

    In Power BI Desktop, it's not supported to dynamically set format for values within same measure or column. And if you use expression to format it, it will always convert values into string. So in this scenario, i suggest you separate the unit and market share into two different measures.

     

    Regards,