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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
asad-mustafa-
Regular Visitor

Display Data with no Values

Hi everyone,

 

I am stuck at this Power BI issue from a long time and any help would be much appreciated.

So I have a dataset with Department, ID, Year and Status.(Dummy tableis attached below) 

 

I am creating a matrix visualization on Power BI Desktop. I have created a mesure called CountID.

I put Year and Status in the Filters pane, and filtering only records for 2014 and it is giving me the following 2 count, which is absolutely correct (image attached).

But what I want is other departments to appear as well, even though they don't have any value, so they can stay blank. I have tried 'Show Items with No data' but it is not working as well.

I want the empty cells for Department B and D for the below dataset, or even If I can replace the blank with 0.

 

Any help would be greatly appreciated.

 

Thanks

   

asadmustafa_0-1704385657375.png

 

 

IDStatusDepartmentYear
49Further Info RequiredA2014
50Not ImplementedB2017
51With TeamB2018
52With TeamC2014
53Further Info RequiredD2016
54With TeamA2015
55With TeamD2017
56With TeamC2015
57ImplementedB2019
58Further Info RequiredA2016
59Further Info RequiredA2017
60Further Info RequiredA2018
61With TeamA2019
62ImplementedA2020
63Not ImplementedD2019
64Further Info RequiredD2020
65Further Info RequiredD2021
66With TeamC2018
67ImplementedB2021
68Further Info RequiredC2019
69ImplementedB2022
70Further Info RequiredB2023
71ImplementedC2020
72ImplementedB2024
73Not ImplementedD2022
74Further Info RequiredA2021
75Further Info RequiredA2022
76Further Info RequiredA2023
77ImplementedA2024
78Not ImplementedD2023
79With TeamA2025
80Further Info RequiredC2022
1 ACCEPTED SOLUTION
v-heq-msft
Community Support
Community Support

Hi @asad-mustafa- ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1704425012571.png

1.Create a calculate table

Table 2 = VALUES('Table'[Department])

2.Create a measure

Count of ID = IF(
    COUNT('Table'[Department]) = BLANK(),
    0,
    COUNT('Table'[Department])
)

3.Create relationship between two tables

vheqmsft_2-1704425326324.png

vheqmsft_3-1704425335788.png

 

3.Create a matrix using Table2[Department] as column and measure as value

vheqmsft_1-1704425179318.png

4.Final output

vheqmsft_4-1704425382378.png

Best regards

Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

4 REPLIES 4
v-heq-msft
Community Support
Community Support

Hi @asad-mustafa- ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1704425012571.png

1.Create a calculate table

Table 2 = VALUES('Table'[Department])

2.Create a measure

Count of ID = IF(
    COUNT('Table'[Department]) = BLANK(),
    0,
    COUNT('Table'[Department])
)

3.Create relationship between two tables

vheqmsft_2-1704425326324.png

vheqmsft_3-1704425335788.png

 

3.Create a matrix using Table2[Department] as column and measure as value

vheqmsft_1-1704425179318.png

4.Final output

vheqmsft_4-1704425382378.png

Best regards

Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Hi @v-heq-msft 

Thanks a million for the solution. It fixed my issue.

Highly appreciated.

 

Regards,

Asad

gadielsolis
Super User
Super User

Hello, you can create the following measure
IDCount=Countrows(Sheet1)+0
then the matrix will show 0 for the values without data, in case you want to show this as blanks you can use a conditional formatting for the 0s.

Hi @gadielsolis,

I am using this formula:

CountID = COUNT(Sheet1[ID]) + 0
 
But it doesn't change anything.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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