Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Changing Format of Measure

Does anyone know what causes the comma button to be greyed out in the formatting options? I have tried to change the format of the following measure but it is stuck at the text format.

Capture.PNG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

The measures when are created take into account the type of data you have so if you are making a sum it will pick up the number, if it's a max of a date column it will pick up a date format.

 

When you use several formats in a measure then it automatically assumes the format is text, since you are having several different format.

 

In your case when you add the last step in your switch measure "Invaluid Selection" you are turning the measure into text so the formatting option is turn off.

 

Work around can be one of two:

  • Use FORMAT on each of the CALCULATE syntax similar to:
    • FORMAT(CALCULATE([P&L USD'000'),"###,### $")
  • Change the "Invalid Selection" by blank() or 0 and then create a new measure  that says invalid selection and place it on a visualization on top of the other so one will be on and the other off depending on the selection.

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

Hi @Anonymous ,

 

The measures when are created take into account the type of data you have so if you are making a sum it will pick up the number, if it's a max of a date column it will pick up a date format.

 

When you use several formats in a measure then it automatically assumes the format is text, since you are having several different format.

 

In your case when you add the last step in your switch measure "Invaluid Selection" you are turning the measure into text so the formatting option is turn off.

 

Work around can be one of two:

  • Use FORMAT on each of the CALCULATE syntax similar to:
    • FORMAT(CALCULATE([P&L USD'000'),"###,### $")
  • Change the "Invalid Selection" by blank() or 0 and then create a new measure  that says invalid selection and place it on a visualization on top of the other so one will be on and the other off depending on the selection.

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix,

The fix to the measure works well. Thanks so much for your help!

 

@MFelix 

 

I have gone through the above format to apply comma in measures for number.

But its applying only on first 3 decimal. 

 

is it possible to apply comma for first after 3 decimal then for all after 2 decimal. 

EX: 1. 23,000

      2. 2,12,244

      3. 23,23,445

 

It will be greate if you could able to help me out. 

 

Thank you in advance. 

 

Hi @NadeemAhamed ,

 

Is this a measure or a column on your dataset?

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



It is measure

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.