Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
This measure runs perfectly until I use a slicer with values from another table - 'Departments' . How do I write the dax so that the measure not ignore the slicer?
Income per client = CALCULATE( SUMX('Table'; [Income]); ALLEXCEPT('Table';
'Table'[Clientnumber]); FILTER( ALLSELECTED('Calendar'[Date]); 'Calendar'[Date]<=MAX('Calendar'[Date]) && MAX('Calendar'[Date]) <= TODAY()) )
Solved! Go to Solution.
@Anonymous
Thankfully, you can provide ALLEXCEPT with a mixture of tables and columns for which to retain filters.
So you can write a measure like this to retain filters on any columns of the Departments table:
Income per client = CALCULATE ( SUMX ( 'Table'; [Income] ); ALLEXCEPT ( 'Table'; 'Table'[Clientnumber]; Departments ); FILTER ( ALLSELECTED ( 'Calendar'[Date] ); 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) && MAX ( 'Calendar'[Date] ) <= TODAY () ) )
Regards,
Owen
@Anonymous
Thankfully, you can provide ALLEXCEPT with a mixture of tables and columns for which to retain filters.
So you can write a measure like this to retain filters on any columns of the Departments table:
Income per client = CALCULATE ( SUMX ( 'Table'; [Income] ); ALLEXCEPT ( 'Table'; 'Table'[Clientnumber]; Departments ); FILTER ( ALLSELECTED ( 'Calendar'[Date] ); 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) && MAX ( 'Calendar'[Date] ) <= TODAY () ) )
Regards,
Owen
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |