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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Create a dax measurement for percentage that reflects correctly in a visual when drilling down data

Case TypeCase #Case IDCase StyleDate FiledAge of caseNext Hearing dateCase StatusCase CategoryCase Status DateCourtCountAge of case - groups
MisdXXXXXXXXX8/30/2023111NullFiledCR8/30/2023CCL3391-120
MisdXXXXXXXXX11/30/2022384NullFiledCR11/30/2022CCL33361+
MisdXXXXXXXXX8/15/2023126NullFiledCR8/15/2023CCL33121-180

I have created a tooltip using the following dax measurements for a "card" visual:

1st Measurement:  Total Rows = COUNTROWS('County Courts Pending v12 - Grouped by Case ID')

2nd Measurement: % of Total = DIVIDE([TOTAL ROWS], CALCULATE([TOTAL ROWS], ALL ('County Courts Pending V12 - Grouped by Case ID'[COURT])))

 

When using the tooltip on a "stacked bar chart" visual (created to indicate the number of pending cases by Court), the percentage reflects correctly based on the current "Total Pending Cases" amount.  However, when I choose to "Drill down" on one of the "Courts" of the "stacked bar chart" visual, the "Total Pending Cases" changes as expected for the particular Court but, the percentage does not calculate correctly.  The percentage is far less than expected, for the total pending case for that Court. 

 

 

This is the tooltip that was created.

Tooltip - Canvas with measurementTooltip - Canvas with measurement

 

The tooltip reflects the correct % for the 11,652 Grand total currently reflecting, for County Court at Law 1.

All Courts - Percentage calculates correctlyAll Courts - Percentage calculates correctly

 

A "drill down" is performed for a specific court, ex.  County Court at Law 1

Drill down - Ex.  County Court At Law 1Drill down - Ex. County Court At Law 1

 

The Total Pending cases amount adjusts, but the percentage amount is incorrect, it should be 84% of the 800 total pending cases.

 

CCL1 - Family - Percentage is incorrect.JPG

 

 

I am in need of assistance to create a measurement that will allow for the percentage to reflect correctly based on the changed data that occurs when a  "drill down"  occurs for a visual, please.

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you for the additional information.  As a new user to Power BI, I apologize in advance if I miscommunicate the information, any help is greatly appreciated.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.