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.
Probably the easiest question of today, had a look at the other questions on this but still struggling.
Trying to count the no of values (dates) in a column, but for this count to stay static regardless slicers etc then show how many values in the previous quarter.
My measures:
Total Values = CALCULATE(COUNTA('bi-import'[Values]))
Last Q = CALCULATE([Total Values], DATEADD('bi-import'[Values].[Date], -1, QUARTER))
However, my slicers are reducing the values/counts.
Where do I slot in the ALL function exactly for it to ignore the slicers? Thank you!
Solved! Go to Solution.
Total Values = CALCULATE(COUNTA('bi-import'[Values]), ALL('bi-import'))
There are lots of blogs on the use of Filters in Dax.
e.g.
https://www.sqlbi.com/articles/filtering-tables/
http://sqlblog.com/blogs/marco_russo/archive/2010/04/05/all-allexcept-and-values-in-dax.aspx
https://docs.microsoft.com/en-us/power-bi/desktop-quickstart-learn-dax-basics
https://docs.microsoft.com/en-us/power-bi/guided-learning/introductiontodax#step-6
If you just need to calculate those values for previous quarter, you can directly try PREVIOUSQUARTER() function in CALCULATE().
Previous Quarter Total Values = CALCULATE ( COUNTA ( 'bi-import'[Values] ), PREVIOUSQUARTER ( 'bi-import'[Date] ) )
Regards,
If you just need to calculate those values for previous quarter, you can directly try PREVIOUSQUARTER() function in CALCULATE().
Previous Quarter Total Values = CALCULATE ( COUNTA ( 'bi-import'[Values] ), PREVIOUSQUARTER ( 'bi-import'[Date] ) )
Regards,
Total Values = CALCULATE(COUNTA('bi-import'[Values]), ALL('bi-import'))
There are lots of blogs on the use of Filters in Dax.
e.g.
https://www.sqlbi.com/articles/filtering-tables/
http://sqlblog.com/blogs/marco_russo/archive/2010/04/05/all-allexcept-and-values-in-dax.aspx
https://docs.microsoft.com/en-us/power-bi/desktop-quickstart-learn-dax-basics
https://docs.microsoft.com/en-us/power-bi/guided-learning/introductiontodax#step-6
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |