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, I made a measure of 3 functions assuming the figure below.
However, ALL SELECTED and ALL behaved differently.
Even though I removed the filter in the "day" column, it behaves as if the filter remains.
I want to know why this happens and the solution. (What I want to make is "Measure_ALL SELECTED".)
thank you.
Solved! Go to Solution.
Hi @Anonymous ,
You can try to create a calculated table with the formula of the variable table1 and then see the final table obtained. From the figure below, you can see that the values of measure1 end up with a value of 1. In this case, you apply the date slicer only with the number of records affected. Without applying the date slicer filter, both all() and allselected() will return data like the table below.
If you apply a date filter (day>=2022/1/3) and use allselected, the variable table1 will only display the following 8 rows, and the value of measure1 will still be 1...
You can review the content in the following links to get more details about ALL(), ALLSELECTED and ALLEXCEPT().
ALL vs ALLSELECTED in DAX and Power BI Desktop
ALL Vs ALLSELECTED Vs ALLEXCEPT DAX FIiter Functions
The (ALL, ALLSELECTED & ALLEXCEPT) Code
Best Regards
I'm sorry.The position of MAXX was wrong.
Measure_ALL =
var table1 = ADDCOLUMNS('table',"measure1",CALCULATE(COUNTROWS('table'),ALL('table'[day])))
RETURN
MAXX(table1,[measure1])
Measure_ALLEXCEPT =
var table1 = ADDCOLUMNS('table',"measure1",CALCULATE(COUNTROWS('table'),ALLEXCEPT('table','table'[value])))
RETURN
MAXX(table1,[measure1])
measure_ALLSELECTED =
var table1 = ADDCOLUMNS('table',"measure1",CALCULATE(COUNTROWS('table'),ALLSELECTED('table'[day])))
RETURN
MAXX(table1,[measure1])
thank you
Hi @Anonymous ,
You can try to create a calculated table with the formula of the variable table1 and then see the final table obtained. From the figure below, you can see that the values of measure1 end up with a value of 1. In this case, you apply the date slicer only with the number of records affected. Without applying the date slicer filter, both all() and allselected() will return data like the table below.
If you apply a date filter (day>=2022/1/3) and use allselected, the variable table1 will only display the following 8 rows, and the value of measure1 will still be 1...
You can review the content in the following links to get more details about ALL(), ALLSELECTED and ALLEXCEPT().
ALL vs ALLSELECTED in DAX and Power BI Desktop
ALL Vs ALLSELECTED Vs ALLEXCEPT DAX FIiter Functions
The (ALL, ALLSELECTED & ALLEXCEPT) Code
Best Regards
thank you for your reply
It's easy to check if you use a table.
I will also read the reference.
Thank you!
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |