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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to display non-existent data

Hello, I want to make the matrix shown below.
However, the data with zero count cannot be displayed.
"Display items without data" or
I couldn't even add 0 to the major formula.
"count = COUNT (table1 [category]) +0"


I want to know this solution.

 

thank you

 

target table

f_999_4-1643256511718.png

 

count = COUNT(table1[category])

f_999_2-1643256411259.png

count = COUNT(table1[category])+0

f_999_3-1643256448831.png

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous So, in your matrix, use the day and id columns from table2. Remove the relationship between the tables and create a measure like:

count = 
  VAR __day = MAX('table2'[day])
  VAR __id = MAX('table2'[id])
  VAR __count = COUNTROWS(FILTER('table1',[id]=__id))
RETURN
  __count + 0


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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous So, in your matrix, use the day and id columns from table2. Remove the relationship between the tables and create a measure like:

count = 
  VAR __day = MAX('table2'[day])
  VAR __id = MAX('table2'[id])
  VAR __count = COUNTROWS(FILTER('table1',[id]=__id))
RETURN
  __count + 0


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!:
DAX For Humans

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

thank you for your reply.
It's a great solution.
However, in the actual data, the slicer of table1 is applied.
So I want to keep the relation and put the column id of table1.
is it possible?
thank you.

 

Anonymous
Not applicable

HI @Anonymous,

Nope, the filter effect has a high priority than DAX expressions. These expanded parts will be filtered first instead of replace/expand by DAX formulas.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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