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

Dynamic Change type measure

I have an advance card and a Stacked column chart, with dynamic measures that looks like this:

 

Measure = 
  var meas =  min(_Measure[CoMeasure])
return
  switch(true();
    meas = "Rate%"; 100*[Rate]; 
    meas  = "Measure1"; [Events];
meas = other measures..... )
And as measure:
Rate = [New Device] / [New Total Device]

The problem is that in my card, the value displayed "Rate%" it is not showed as a percentage, but, as a number.

card-string.png

And the barchart is showing different values:

 

bc-string.png

Measure-mal.png

 

Then in the dynamic measure, I change "Rate%" to this:

...    meas = "Rate%"; Format([Rate]; "0.00%") 
   

The Card visual it is showing with the right format, but the bar chart is showing nothing.

 

On the other hand, when I drag the measure "Rate" directly to the bar chart, it is showing the right values as percentages:

bc-perc.png

 

right.png

 

What I'm doing wrong? How Can I show the dynamic measure in the card, as % and get the correct values in the bar chart, also showing the right values?

 

 

1 ACCEPTED SOLUTION

Use 2 different measures, and vote for my idea here https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-me...

 

 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

1 REPLY 1

Use 2 different measures, and vote for my idea here https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-me...

 

 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.