Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a matrix visualization in power bi. There are 'Dept' in the Rows and 'Year' in the column. And we have 'CountID' in the Values. Now a matrix is being created. There are a total of 8 Dept but only 7 are being shown in visualization becasue the eighth Dept, i.e. Law, does't have any CountID. What i want is to show the Law Dept as well even without any value.
You can refer to the folloiwng solution
Sample data
1.Create a Dept table to contain the eight departments
2.Create a year table
3.Then create a measure
Measure =
VAR a =
SUMMARIZE (
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] <> BLANK () ),
[Dept]
)
RETURN
IF (
SELECTEDVALUE ( Dept[Dept] ) IN a,
MAXX (
FILTER (
'Table',
[Dept]
IN VALUES ( Dept[Dept] )
&& [Year] IN VALUES ( 'Year'[Year] )
),
[Column1]
),
0
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @devesh_gupta ,
Thanks for your reply. I tried this solution but I cannot use CountID in a new measure as CountID itself is a self created Measure.
@asad-mustafa-dc Can we try like this if it works for you:
CountIDOrZero = IF(ISBLANK([CountID]), 0, [CountID])
@devesh_gupta No it's giving same results as before. It's not showing 0 as values where no CountID exists.
@asad-mustafa-dc Let's try these simpe steps:
Select the matrix visual.
On the Fields pane, locate the "Dept" field under the Rows section.
Click on the dropdown arrow next to the "Dept" field to open its context menu.
Check the option that says "Show items with no data." This option will ensure that all departments, even those without any CountID values, are displayed in your matrix visual.
If you find this insightful, please provide a Kudo and accept this as a solution.
@asad-mustafa-dc Community support has provided some solution above to this problem... Have you tried if that's working or not?
@asad-mustafa-dc You can create a new measure like this:
CountIDOrZero = IF(ISBLANK(SUM(YourTableName[CountID])), 0, SUM(YourTableName[CountID]))
Drag this measure into the values field. This should force Power BI to display all departments, including Law, even if it doesn't have any CountID values. The measure will return 0 for Law in this case.
If you find this insightful, please provide a Kudo and accept this as a solution.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
68 |
User | Count |
---|---|
226 | |
129 | |
120 | |
84 | |
78 |