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

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.

Reply
shun888
Frequent Visitor

How to count all nonblank values in a matrix visual

Hi, 

 

I have created a matrix visual similar to the following. With the first column A,B,C being the names. And the first row 21,22,23 the dates. The values is a measure that sums up how many burgers they have eaten - Calculate(sum('Food'[Eaten]), Filter('Food', [Type] ="Burger"))

 

shun888_1-1703192355964.png

 

Now I want to create a Scorecard that counts the total of nonblank values in the visual. In this case it would be 8 as there is only 1 cell that is blank in this 3x3 matrix. 

 

Any help would be appreciated thanks!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @shun888 ,

If I understand correctly, the issue is that you want to count all nonblank values in a matrix visual. Please try the following methods and check if they can solve your problem:

1.Create the Food table. 

vjiewumsft_0-1703841397995.png

2.Move the Name field into the Rows, move the Date into the Columns and move the Eaten into the Values.

vjiewumsft_1-1703841419388.png

3.Create a measure that counts the total of nonblank values in the visual. Enter the following DAX formula.

 

Measure 2 = 
CALCULATE(
    SUM(Food[Eaten]),FILTER(Food,[Type] = "Burger")
)

vjiewumsft_7-1703841567109.png

 

 

4.Publish the report to the service.

 

5.Create a new scorecard.

vjiewumsft_2-1703841468574.png

6.Edit the Current value and Final target. Select the Connect to data.

vjiewumsft_3-1703841477245.png

 

vjiewumsft_4-1703841483447.png

 

7.Choose the Final target and select the Measure 2.

vjiewumsft_5-1703841490139.png

 

8.Select Save.

vjiewumsft_6-1703841496550.png

 

Alternatively, you can use the following link to learn how to create a scorecard.

Create scorecards and manual metrics - Power BI | Microsoft Learn

Create connected metrics in Power BI - Power BI | Microsoft Learn

 

Looking forward to your reply.

Best Regards,

Wisdom

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @shun888 ,

If I understand correctly, the issue is that you want to count all nonblank values in a matrix visual. Please try the following methods and check if they can solve your problem:

1.Create the Food table. 

vjiewumsft_0-1703841397995.png

2.Move the Name field into the Rows, move the Date into the Columns and move the Eaten into the Values.

vjiewumsft_1-1703841419388.png

3.Create a measure that counts the total of nonblank values in the visual. Enter the following DAX formula.

 

Measure 2 = 
CALCULATE(
    SUM(Food[Eaten]),FILTER(Food,[Type] = "Burger")
)

vjiewumsft_7-1703841567109.png

 

 

4.Publish the report to the service.

 

5.Create a new scorecard.

vjiewumsft_2-1703841468574.png

6.Edit the Current value and Final target. Select the Connect to data.

vjiewumsft_3-1703841477245.png

 

vjiewumsft_4-1703841483447.png

 

7.Choose the Final target and select the Measure 2.

vjiewumsft_5-1703841490139.png

 

8.Select Save.

vjiewumsft_6-1703841496550.png

 

Alternatively, you can use the following link to learn how to create a scorecard.

Create scorecards and manual metrics - Power BI | Microsoft Learn

Create connected metrics in Power BI - Power BI | Microsoft Learn

 

Looking forward to your reply.

Best Regards,

Wisdom

 

amitchandak
Super User
Super User

@shun888, This measure can help

 

distinctcount(Table[Name]) * distinctcount(Table[Date]) -
Countrows(Summarize(Table, Table[Name], Table[Date], "_1", Calculate(sum('Food'[Eaten]), Filter('Food', [Type] ="Burger"))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.