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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
fionabee
Helper I
Helper I

Card visual showing blank where matrix shows data

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:

% Upheld Complaints =
DIVIDE(
    CALCULATE(COUNTROWS('Received Complaints'), 'Received Complaints'[Outcome] = "Upheld"),
    COUNTROWS('Received Complaints'),
    0)+0
1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

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:

  • A Matrix visual to display complaint subjects and uphold rates.
  • A Card visual to show the overall uphold rate based on selected dates.
  • A Date slicer connected to the complaint closure date.

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.

View solution in original post

8 REPLIES 8
v-ssriganesh
Community Support
Community Support

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.

v-ssriganesh
Community Support
Community Support

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.

v-ssriganesh
Community Support
Community Support

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.

v-ssriganesh
Community Support
Community Support

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:

  • A Matrix visual to display complaint subjects and uphold rates.
  • A Card visual to show the overall uphold rate based on selected dates.
  • A Date slicer connected to the complaint closure date.

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.

rohit1991
Super User
Super User

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.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

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:

fionabee_0-1752669988917.png

 

The card behaves correctly for June but not July:

fionabee_1-1752670185819.png

 

GrowthNatives
Responsive Resident
Responsive Resident

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]




 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors