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

Measure can't be used in visual

Hello,

 

I have below table and ratio is calculated by On/Total

MachineOnOffTotalRatio
one56,919,990.0019,918,078.0076,838,068.0074.08%
two101,407,451.0021,289,453.00122,696,904.0082.65%
three1,582,723.00633,407.002,216,130.0071.42%
four129,632,460.0020,119,081.00149,751,541.0086.57%
five196,965,125.0025,407,489.00222,372,614.0088.57%

 

But when I want use 'Ratio' on treemap or piechart or anything else I can't use it as value of the chart.

 

Formula of ratio is = FORMAT(DIVIDE(SUM('Data'[On]),SUM('Data'[Total])),"0.00%")

Total is a calculated column not a measure.

 

Should I write ratio formula differently? Or what should I do?

 

Thanks in advance!

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

When you use format you are transforming you calculations into text values in this case since you are using a division simply format the value in percentage using the measure bar options no need to use the format syntax then you can use it on your charts:

MFelix_0-1603292583352.png

 


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

2 REPLIES 2
manikumar34
Solution Sage
Solution Sage

@Anonymous ,

 

When you use FORMAT function and format to percenatge it converts to String Value. 

Because of whcih the value will not appear on visuals Except on Table, Crad and Matrix. 

 

If you want to change it to Percenatge use Column tools or Measure tools to change the data type to percenatge. 

 

Regards, 

Manikumar

 

Appreciate your Kudos, Accept as Solution if this is helpful.





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




MFelix
Super User
Super User

Hi @Anonymous ,

 

When you use format you are transforming you calculations into text values in this case since you are using a division simply format the value in percentage using the measure bar options no need to use the format syntax then you can use it on your charts:

MFelix_0-1603292583352.png

 


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



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.