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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Daemetius
Helper II
Helper II

Skip rows with condition using DAX

Greetings,

 

I'm trying to create a measure with an if statements and some actions.

 

For example I am looking to create a measure that checks if date column is blank on a row, then that row is skipped.

 

Name         Date

John          5/5/2017

Alice          6/1/2017

Ralf            (blank)

Jeff            8/9/2017

 

Here, Ralf is skipped since there is no date in that row and moves on to Jeff.

1 ACCEPTED SOLUTION

Here is a mock calculation with some sample data I used:

 

Measure Value = CALCULATE(COUNT(Data[Date]),Data[Date]<>BLANK())

View solution in original post

4 REPLIES 4
CamFlawless
Frequent Visitor

I think I would need more context into what you are trying to compute. Getting DAX/Power BI to move over the rows with (Blank) values is easy enough, but providing a comprehensive solution requires more information from you. 


@CamFlawless wrote:

I think I would need more context into what you are trying to compute. Getting DAX/Power BI to move over the rows with (Blank) values is easy enough, but providing a comprehensive solution requires more information from you. 


This is basically to show an amount of system incidents occurred over a period of 1 month (all this is an example). Then throw it into a bar graph that shows the number of issues on that month but skips those without a date. so if there are total of 20 rows and 3 have empty dates then the graph would show 17 instead of 20.

Here is a mock calculation with some sample data I used:

 

Measure Value = CALCULATE(COUNT(Data[Date]),Data[Date]<>BLANK())

Hi,

 

I think you do not even need the filter, because COUNT counts only values that are not blank.

So :

COUNT( Data[Date] )

should give you the expected result.

 

Have a nice day

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.