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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.