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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AndrewS
New Member

Matrix which shows only where CountRows is blank

I am using the following measure to show me how many instances of an Event have taken place each day:

 

EventCount = CALCULATE(COUNTROWS(EventsTable), EventsTable[EventCode] = 5)

 

This produces the below matrix, which is perfect. It shows the Site_ID as well as the individual machines within that site and a count by Date and Day Name. The Date and Day Name are in a separate calendar table, linked to the EventsTable by the Date.

What I would also like, however, is a matrix that only shows the machines where there was no instance of the EventCode occuring on a particular day - in other words, just the three parts I've highlighted in yellow.

 

EventCode Matrix.png

Is this possible?

I've tried adding "+0" to the end of my measure (in order to then filter the visual to just show where the EventCount = 0) but that just changes everything to zero. Using If(ISBLANK(EventCount), 0, EventCount) does the same.

Plus, if I just filter the visual where the EventCount is blank I get a completely empty matrix.

 

Thanks for your help!

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @AndrewS ,

 

Please try this measure.

Measure = IF(NOT [EventCount], 0 )

Disables the show items with no data for the [Date] axis.

vcgaomsft_0-1678242338670.png

Please refer to the sample file.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @AndrewS ,

 

Please try this measure.

Measure = IF(NOT [EventCount], 0 )

Disables the show items with no data for the [Date] axis.

vcgaomsft_0-1678242338670.png

Please refer to the sample file.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi Gao

 

Thanks for that - it works perfectly!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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