Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Thought I was getting my head around dax but this simple measure (on a model I've inherited) has bamboozled me as I don't think it should work correctly, but it does... I'm not satisfied accepting that it works, I really need to understand why!!
This is a running total for 'Finish' dates that has been placed on a scorecard. I want the measure to ignore any slicer filters on the Calendar[Year] - a connected date table (that is not marked as a date table). When a user selects the year 2019, it still counts everything in up until 30 April 22 (e.g. counting items in 2019, 2020, 2021 and 2022) which is what I want... but how does it do this without an ALL(Calendar) ???
Calculate(count('Schedule'[Activity ID]),'Calendar'[Date]<=date(2022,4,30),'Schedule'[Date Type]="Finish")
It would appear that the bit in red is unaffected by the 2019 filter provided by the slicer. Is there something stopping filter transition? Just to confirm I've checked 'interactions' - the scorecard should defintely by effected by the slicer.
Thanks in advance, this is bugging me so much!
Solved! Go to Solution.
Hi @jimbobshandy
First of all, you have to remember that filters are in fact tables. And your code replaces the date filter (the VLAUES of 'Calendar'[Date] which is in fact a table) with a constant table containing all the dates from the start up to Apr. 30, 2022. In this case there is nothing that can can affect this table and no matter what you select it will remain the the same.
Hi @tamerj1 , thanks so much for the rapid response!
You've made that much clearer in my mind, I never thought of that as a table, so thank you.
Taking this a little further, the bit I was struggling with is why in this article there is a measure that uses an ALL() - see the bit i've highlighted in green. This was an approach I've always used but maybe this is largely redundant as I guess maybe this is explained by the section highlighted in red (I must admit I just noticed this!)? My model uses this approach - a datetime relationship - hence I can omit the ALL().
Taken from: Computing running totals in DAX - SQLBI
Thanks again for your help 🙂
Absolutely correct
Hi @jimbobshandy
First of all, you have to remember that filters are in fact tables. And your code replaces the date filter (the VLAUES of 'Calendar'[Date] which is in fact a table) with a constant table containing all the dates from the start up to Apr. 30, 2022. In this case there is nothing that can can affect this table and no matter what you select it will remain the the same.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 9 | |
| 7 | |
| 6 |