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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
gmat
Helper I
Helper I

Displaying 0s in Summary Matrix Not Working Correctly

I'm currently working on a summary dashboard in PowerBI that displays data from two business units over the last 12 months. I've divided the dashboard into sections, with the first section focusing on one business unit and only showing data for March 2023 and October 2023.

 

The second section is dedicated to the other business unit, displaying data for each month (because it is available).

My challenge is ensuring uniformity in the display, even when there is no data in the top BU . I attempted to insert a new measure to count certain data points and included 0s for cases with no data:

gmat_0-1708979971771.png

 

 

 Count + 0 = calculate(count(Query1[COUNT]))+0
 
(top BU)
gmat_1-1708980216837.png

 

However, this approach didn't work as expected. It did pull in display 0s but it interfered with my date filters, pulling in data for the last two years, including January 2023, despite having a relative date filter (in the last 1 year). It is also pulling in all of 2024 months (Jan 24 - Dec 24) with 0s. 

 

I'm puzzled about why it's pulling in all of these other months and would appreciate any help or insights you can provide to resolve this issue. If you need additional details about my setup, feel free to ask.

 
 

 

1 ACCEPTED SOLUTION

9 REPLIES 9
v-zhengdxu-msft
Community Support
Community Support

Hi @gmat 

 

Maybe you can try the COALESCE() function which returns the first expression that does not evaluate to BLANK. If all expressions evaluate to BLANK, BLANK is returned.

Here is the sample:

vzhengdxumsft_0-1708999147402.png

Then add a measure:

Measure = CALCULATE(COUNTROWS('Table'),'Table'[Name]="DD")

The result:

vzhengdxumsft_1-1708999250527.png

Then change the measure:

Measure = COALESCE(CALCULATE(COUNTROWS('Table'),'Table'[Name]="DD"),0)

The result is as follow:

vzhengdxumsft_2-1708999292391.png

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

 

lbendlin
Super User
Super User

To report on things that are not there you need to use disconnected tables and crossjoins.  In your scenario you need a disconnected calendar table for your X axis.

I get the idea here but I am unable to use a disconnected calendar table for my x axis. PowerBI canot use the calendar table without a relationship.

 

 

you can use two calendar tables. One for the data model and one for the X axis.

Can you walk me through how to do this? Not sure I know how to.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Below is a example data set that is needed to put this view together. When I try to create a matrix on this data set. This is what I am able to build in my matrix. I want to be able to show the months that are missing data Feb - Sep 2023. 

gmat_1-1709157282543.png

 

 

CategoryDateCount
New1/31/20237
New2/28/20238
New9/30/20239
New10/31/202310
New11/30/202311
New12/31/202312
Used1/31/202313
Used2/28/202310
Used9/30/20238
Used10/31/20239
Used11/30/202351
Used12/31/20233
New1/31/202422
Used1/31/202420

lbendlin_0-1709163148288.png

 

This worked, thanks so much. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.