Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
count = COUNT(table1[category])+0
Solved! Go to Solution.
@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
@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
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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |