Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm struggling with a really simple concept, and trying to get a measure which ignores initial filter context coming from a row in a table to correctly aggregate values. Screeshot below shoes the scenario. Basically want to go from table on the LHS to the table on the RHS. I understand why the Count becomes 1 for each MeetingID in the RHS table but am hitting a road block in getting the right DAX to give the 'Count Desired'. Any help much appreciated!
Solved! Go to Solution.
try:
Count Desired = IF( COUNTROWS(FactMeetings) >0, CALCULATE( COUNTROWS(FactMeetings), FILTER( ALL(FactMeetings), MAX( DimSalesePerson[Initials]) = FactMeetings[Initials] ) ) )
try:
Count Desired = IF( COUNTROWS(FactMeetings) >0, CALCULATE( COUNTROWS(FactMeetings), FILTER( ALL(FactMeetings), MAX( DimSalesePerson[Initials]) = FactMeetings[Initials] ) ) )
Thanks @Anonymous , that works great! It was the MAX() part I was missing to try and redefine the required context. Though I can see the effect of removing the IF > 0 wrap around, I guess I don't fully understand the theory as why without it the filter between the tables seems to be multiplying out the columns.
it has to do with :
FILTER( ALL(FactMeetings),
The way ALL is being used here is to remove filters. There's more too it, but there are many sources out there that have explained this. But just play around with ALL using a table and ALL using a Table Column, ALLEXCEPT. Just see what happens and it will begin to click.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |