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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Need help filtering with a dax expression

Hi!

 

Can somebody assist me with this calculation as I have minor trouble: 

 

I have a column which I want to count, but I want to exclude all the rows in that column containing the number "110". How would I write a DAX expression for this?

 

So I want to have something like: "Count all the values in this column, except those cells containing "110". 

 

Hoping somebody can help,

 

Thanks

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link down below.

 

Picture4.png

 

Count except 110 =
COUNTROWS ( FILTER ( 'Table', NOT CONTAINSSTRING ( 'Table'[ColumnA], "110" ) ) )

 

https://www.dropbox.com/s/2ppp72bfmuegzd3/pbiuser.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

Try:

rows =

VAR calc = SUM(Table[column])

RETURN

CALCULATE ( COUNT(Table [column]), FILTER (Table [ column ], calc <> 110)





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link down below.

 

Picture4.png

 

Count except 110 =
COUNTROWS ( FILTER ( 'Table', NOT CONTAINSSTRING ( 'Table'[ColumnA], "110" ) ) )

 

https://www.dropbox.com/s/2ppp72bfmuegzd3/pbiuser.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Hi,

 

Thank you so much! This seemed to work! Appreciate it a lot!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.