Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I was wondering if anybody could help me with what I think should be achieved very simply in DAX - I just can't find the right function!
I have two columns of data, let's say Column A and Column B. I'd like to SUM Column A based on the values in Column B.
With the example data below, I'd like to sum Column A for all values in Column B EXCLUDING blanks and 'Don't know'. So my total sum should be only for 'yes' and 'no' and therefore be 65. So my question is: how do I exclude specific values in a column from a calculation?
Any help much appreciated!
Thanks 😊
Solved! Go to Solution.
Result measure =
SUMX ( FILTER ( 'Table', NOT ( 'Table'[B] IN { "D", "" } ) ), 'Table'[A] )
https://www.dropbox.com/s/ou6ab6bsvhri2pe/harriet.pbix?dl=0
Result measure =
SUMX ( FILTER ( 'Table', NOT ( 'Table'[B] IN { "D", "" } ) ), 'Table'[A] )
https://www.dropbox.com/s/ou6ab6bsvhri2pe/harriet.pbix?dl=0
Excel, our oldie but goodie does the trick with ease,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks for this, but I need to do this within Power BI using a measure
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
9 | |
9 | |
6 | |
5 |
User | Count |
---|---|
17 | |
15 | |
10 | |
9 | |
8 |