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
benjaminhoang
Helper III
Helper III

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
v-chuncz-msft
Community Support
Community Support

@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.
Zubair_Muhammad
Community Champion
Community Champion

@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 () }
)

Regards
Zubair

Please try my custom visuals

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

Capture.JPG

@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.

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.