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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
angela_marie
Frequent Visitor

% of Total in KPI Card not Working

I have many fields in my visuals.

I have high-level KPIs and chart KPIs.

For the % of the total, I need to calculate against either:

Skill Name  OR   

SLA Buckets

 

Here is what works in a table:

% of Total:   = DIVIDE([Total SLA Buckets],[Total SLA],0)

Total SLA Buckets = 
CALCULATE('SL_Data'[Total Skill Name by Buckets],ALL('SL_Data'[SLA Bucket]))
 Total Skill Name by Buckets = CALCULATE(COUNT(SL_Data[SLA Bucket]), FILTER('SL_Data''SL_Data'[Skill Name] IN {"Clinical""Equipment""Mechanical Room"}))
 
When I try to use the % of Total by itself in a KPI card I always get 100%, what is the best way to make a KPI card using the % of total with the Skill name?  There is only Clinical, Equipment, and Mechanical Room so I will need to make 3 separate ones and the filter did not work.
 
It is confusing, I hope this makes sense.  % of the total only works in the table. In tableau, I can use a FIXED calculation but I do not know how to do that in Power BI.
1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @angela_marie ,

Since you need to calculate % of Total for "Clinical", "Equipment", and "Mechanical Room" separately, create individual measures for each. For example, for "Clinical":

% of Total Clinical = 
DIVIDE(
    CALCULATE(
        COUNT('SL_Data'[SLA Bucket]),
        'SL_Data'[Skill Name] = "Clinical"
    ),
    CALCULATE(
        COUNT('SL_Data'[SLA Bucket]),
        ALL('SL_Data')
    ),
    0
)

If the results are not as expected, could you please provide more details?

How to Get Your Question Answered Quickly - Microsoft Fabric Community

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

Hi @angela_marie ,

Since you need to calculate % of Total for "Clinical", "Equipment", and "Mechanical Room" separately, create individual measures for each. For example, for "Clinical":

% of Total Clinical = 
DIVIDE(
    CALCULATE(
        COUNT('SL_Data'[SLA Bucket]),
        'SL_Data'[Skill Name] = "Clinical"
    ),
    CALCULATE(
        COUNT('SL_Data'[SLA Bucket]),
        ALL('SL_Data')
    ),
    0
)

If the results are not as expected, could you please provide more details?

How to Get Your Question Answered Quickly - Microsoft Fabric Community

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

I figured out how to make it work, but now I am having issues with the tool tip hover.  The % of total works on one field but not on the other.

parry2k
Super User
Super User

@angela_marie it is confusing, maybe post some sample data with the expected output, or share sample pbix file using one drive/google drive, remove any sensitive information before sharing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.