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
Anonymous
Not applicable

Counting non-blank values of a measure with date slicer

I have a measure (Downtime) that takes many values from many tables and calculates something. The final result is a number.

 

When I plot this number against a date axis (like on a column chart) some values are blank - this is fine.

 

I want to find out the number of days that this measure was a blank. There is a date slicer on the page of this visual. Please help! Thanks!

 

newbieuser_0-1623425795813.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Just tried it - it gives 7 as a result for the above example - should return 2 😞

newbieuser_0-1623426386918.png

 

View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Would a measure like this work for you?

 

_blankDays =
CALCULATE(
  COUNT(aTable[Date]),
  ISBLANK([downtimeMeasure])
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Just tried it - it gives 7 as a result for the above example - should return 2 😞

newbieuser_0-1623426386918.png

 

@Anonymous ,

 

Are you using a related calendar table for your chart axis? If so, try something like this:

_blankDays =
CALCULATE(
  COUNT(Calendar[Date]),
  FILTER(
    Calendar,
    ISBLANK([downtimeMeasure])
    || [downtimeMeasure] = 0
  )
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.