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.
Hello,
I just happened to try this out to get the number of parts,was more of a trial but is there a place where i can read
how the below functions were applied.I read that Count would bring the count of the values in the column but how is
ALLEXCEPT AND ALL altering the result.
Count_part = calculate(COUNT('Spend'[Part]),ALLEXCEPT('Spend','Spend '[Part] ))
Colour Part count_part
Black A 3
Red A 3
Blue A 3
Blue B 1
Count_part = calculate(COUNT('Spend'[Part]),ALL('Spend','Spend '[Part] ))
Colour Part count_part
Black A 1
Red A 1
Blue A 1
Blue B 1
Thanks
Solved! Go to Solution.
@Anonymous
please refer to below links for help
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
https://www.sqlbi.com/blog/marco/2010/04/05/all-allexcept-and-values-in-dax/
Proud to be a Super User!
Hi @Anonymous
According to the syntax of CALCULATE function, Calculate(expression, filter). Calculate will use the parameter ‘filter’ to modify the filter context, choose or remove rows and then calculate the ‘expression’.
All and AllEXCEPT can be used as filters of CALCULATE. All(table/columns) will remove all filters on the table or columns and return all the rows. So the result will not be affect by the type of ‘Colour’ and ‘Part’. ALLEXCEPT (table, columns) function will remove all filters on the table except the filters on the parameter ‘columns”. So the result will be affected by the type of ‘Part’ but not ‘Colour’
For more details about using ALL and ALLEXCEPT, you can refer How to use ALL and ALLEXCEPT Function in Power BI DAX.
Best Regards
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
please refer to below links for help
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
https://www.sqlbi.com/blog/marco/2010/04/05/all-allexcept-and-values-in-dax/
Proud to be a Super User!
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |