Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a matrix which shows complaint subjects and the upheld rate, on this page I have a date timeline slicer which looks at the closure date, I want a card visual to show the overall uphold rate in the period I'm looking at in comparison to the individual uphold rates. When I look at previous months or a year, this card visual works fine but when I highlight the current month, it shows blank even though the matrix below shows the overall uphold rate for that month.
The measure that I'm using in both the card and the matrix is as follows:
Solved! Go to Solution.
Hello @fionabee,
Thank you for reaching out to the Microsoft Fabric Forum Community.
I have reproduced your scenario in Power BI using a sample dataset and implemented a measure like yours to calculate the % of Upheld Complaints. I also added:
After testing with previous months (e.g: May, June 2024) and the current month (July 2024), the Card visual returns the correct value as expected, without showing blank even when the Matrix displays breakdowns.
I used the following updated DAX measure to ensure the date slicer context is applied correctly:
% Upheld Complaints =
VAR UpheldCount =
CALCULATE(
COUNTROWS('Received Complaints'),
'Received Complaints'[Outcome] = "Upheld",
KEEPFILTERS(VALUES('Dates'[Date]))
)
VAR TotalCount =
CALCULATE(
COUNTROWS('Received Complaints'),
KEEPFILTERS(VALUES('Dates'[Date]))
)
RETURN DIVIDE(UpheldCount, TotalCount, 0)
For your reference, I’ve attached the .pbix file with this setup, so you can test it directly in your environment and validate the expected output.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hello @fionabee,
Hope everything’s going great on your end. Just checking in has the issue been resolved, or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.
Hello @fionabee,
hope you're doing well. Is the issue resolved or still ongoing? An update would help others in the community facing similar problems.
Thank you.
Hello @fionabee,
We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.
Thank you.
Hello @fionabee,
Thank you for reaching out to the Microsoft Fabric Forum Community.
I have reproduced your scenario in Power BI using a sample dataset and implemented a measure like yours to calculate the % of Upheld Complaints. I also added:
After testing with previous months (e.g: May, June 2024) and the current month (July 2024), the Card visual returns the correct value as expected, without showing blank even when the Matrix displays breakdowns.
I used the following updated DAX measure to ensure the date slicer context is applied correctly:
% Upheld Complaints =
VAR UpheldCount =
CALCULATE(
COUNTROWS('Received Complaints'),
'Received Complaints'[Outcome] = "Upheld",
KEEPFILTERS(VALUES('Dates'[Date]))
)
VAR TotalCount =
CALCULATE(
COUNTROWS('Received Complaints'),
KEEPFILTERS(VALUES('Dates'[Date]))
)
RETURN DIVIDE(UpheldCount, TotalCount, 0)
For your reference, I’ve attached the .pbix file with this setup, so you can test it directly in your environment and validate the expected output.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hi @fionabee ,
This issue usually happens because your matrix has a category (like "Subject") on rows, so it always returns a row, even if the value is blank, while the card only shows a result if the measure returns a value in the current filter context. If there are no rows matching "Upheld" for the selected period, your measure might be dividing 0 by 0, resulting in a blank in the card (even if the matrix shows zero or handles blanks differently).
How to fix: Add an explicit BLANK() handler at the start of your measure to ensure it always returns a value, even if there are no upheld complaints in the period:
% Upheld Complaints =
VAR UpheldCount = CALCULATE(COUNTROWS('Received Complaints'), 'Received Complaints'[Outcome] = "Upheld")
VAR TotalCount = COUNTROWS('Received Complaints')
RETURN
IF(
TotalCount = 0,
0,
DIVIDE(UpheldCount, TotalCount)
)
This version will show 0 (not blank) in the card when there are no complaints in the filtered period, matching the matrix’s behavior.
Thank you for your response however there are results in the matrix as shown below,
There were 36 closed complaints with some upheld, some not:
The card behaves correctly for June but not July:
Hi @fionabee ,
1. You can update your Dax as per the following to avoids the card visual returning blank (which it may do if TotalComplaints = 0 and there's no upheld rows).
DAX
% Upheld Complaints =
VAR TotalComplaints =
CALCULATE(COUNTROWS('Received Complaints'))
VAR UpheldComplaints =
CALCULATE(COUNTROWS('Received Complaints'), 'Received Complaints'[Outcome] = "Upheld")
RETURN
IF(
TotalComplaints = 0,
0,
DIVIDE(UpheldComplaints, TotalComplaints)
)
2. Go to Format → Edit Interactions and make sure the timeline slicer is affecting both:
The card & The matrix
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together! 🚀 [Explore More]