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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BaldAccountant
Helper II
Helper II

Percentage of MCR by financial class not working

Percentage of Medicare by financial class

 

I need help with a measure in Power pivot which does not do what I expect it to do.

In healthcare one differentiation we use is a financial class, or insurance type.  In my organization we use MCR for Medicare.

I set up a measure as follows:

MCR % Cases:=divide(CALCULATE([Cases],Data[FC]="MCR"),[Cases],0)

It works fine for pivot tables like MCR % for each month or by doctor, etc.  But it does not behave the way I would expect for a pivot table by financial class.  I would expect Medicare to be 100% and all the others to be zero.  Here is what I get instead:

BaldAccountant_0-1683641609920.png

It appears to be dividing the total number of medicare cases in all FC by the number of cases for each financial class (for BC 641/428 or 149.77%), but I would expect that for BC it would be dividing the number of medicare cases in the blue cross financial class by the total number of BC cases, or 0/428 which should be 0.  

Is my formula wrong or is my expectation wrong (maybe I am having a brain freeze)? 

 

I tried to attach a link to dropbox, but it does not always seem to work.

 

Note the data in this spreadsheet is fake, made up.

 

https://www.dropbox.com/scl/fi/q5v33edzs54jdnd2ddaj5/Test-MCR.xlsx?dl=0&rlkey=f41yo7wstgz53wv8lg1cgi...

1 ACCEPTED SOLUTION

please try 

MCR% = IF( CONTAINS(Data1,Data1[FC],"MCR"),
    DIVIDE(
        CALCULATE([Total Cases],Data1[FC] = "MCR"),
        [Total Cases],
        0
    ),0
)

 

annonymous1999_0-1683645572663.png

 

View solution in original post

3 REPLIES 3
BaldAccountant
Helper II
Helper II

Since there are no medicare cases in BC (all those cases are BC), I would expect the % of medicare cases for the BC financial class to be zero

please try 

MCR% = IF( CONTAINS(Data1,Data1[FC],"MCR"),
    DIVIDE(
        CALCULATE([Total Cases],Data1[FC] = "MCR"),
        [Total Cases],
        0
    ),0
)

 

annonymous1999_0-1683645572663.png

 

eliasayyy
Super User
Super User

hello can you explain better your goaal, the % is what exactly all values divided by cases of each FC? or what exactly so lets say BC has 10 , COMM has 15 MCD has 20 MCR has 30 and WC has 25 so total is 100 and BC % is 10% ...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.