cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Create a filtered measure to count all rows if it does not start with the number 1

Hello trying to create a measure that count all rows that does not start with 1 but also excludes blank entries I have a sample quick measure I made which is wrong

 

Count of LEG-1 If does not start with 1=
CALCULATE(
COUNTA('Dispatch Total'[LEG-1]),
'Dispatch Total'[LEG-1] IN { "1" }
)

5 REPLIES 5
Super User III
Super User III

Re: Create a filtered measure to count all rows if it does not start with the number 1

@benjaminhoang 

 

Try with following

 

Count of LEG-1 If does not start with 1 =
CALCULATE (
    COUNT ( 'Dispatch Total'[LEG-1] ),
    NOT 'Dispatch Total'[LEG-1] IN { "1", BLANK () }
)
Try my new Power BI game Cross the River
Community Support Team
Community Support Team

Re: Create a filtered measure to count all rows if it does not start with the number 1

@benjaminhoang ,

 

By the way, you may take a look at https://www.sqlbi.com/articles/blank-handling-in-dax/.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Create a filtered measure to count all rows if it does not start with the number 1

DId I do something wrong it is counting its that start with 1

Capture.JPG

Community Support Team
Community Support Team

Re: Create a filtered measure to count all rows if it does not start with the number 1

@benjaminhoang ,

 

You'll need to use LEFT first.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I stated the question differently

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors