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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
BaldAccountant
Helper III
Helper III

% of Medicare Cases

I have a dynamic formula that calculates different measures such as charge per case, Net profit per case etc.

One calulation is % of cases which are medicare.  Since most of the calulations are numbers, not percentage, I had to format this calculation as a pcercentage.  When I try to calculate teh difference between two different versions of the dynamic formula using % of Medicare cases I get the following error

BaldAccountant_0-1757343978779.png

The formula for this is DF - DF2 = Value([dynamic formula]) - value([dynamic formula2])

I tried it with the value formulas and without [dynamic formula] - [dynamic formula2]

 

I cant share the file here because of HIPAA and I am hoping someone can help with this without the file.  I could set up a dummy file with dummy info, but that would take quite a while due to the complexity of the dynamic formulas.

1 ACCEPTED SOLUTION

@BaldAccountant 

have you tried dynamics formatting?

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings?wt.mc_id=DP...

 





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

Proud to be a Super User!




View solution in original post

6 REPLIES 6
johnt75
Super User
Super User

Change both dynamic formula measures so that they return numeric values, e.g. 0.15. Then set the format to be a %, with as many decimal places as you need. That way when you display the values in a visual they will show up as e.g. 15%, but you can still use the underlying numbers in other calculations.

Wont that change all of the calculations to show up as %?

@BaldAccountant 

have you tried dynamics formatting?

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings?wt.mc_id=DP...

 





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

Proud to be a Super User!




That works, thanks.

you are welcome





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

Proud to be a Super User!




As @ryan_mayu suggests, using dynamic format strings is the way to go. You can use DAX code in there so that you can use logic to determine which is the correct format string.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.