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.
The following expression give the Total salary of all month or only May ? Please help me.....
CALCULATE([TotalSalary],FILTER(ALL(FactSalary[Month]), FactSalary[Month]="May"))
Solved! Go to Solution.
May only
Hello arifulice
I'm not an expert on DAX but I found a good explanation here:
https://community.powerbi.com/t5/Desktop/Filter-and-Allexcept/td-p/76403
the way I understand:
CALCULATE([TotalSalary],FILTER(ALL(FactSalary[Month]), FactSalary[Month]="May"))
the filter iterates only the values of the [Month] column (you will see May only). It is the same as:
CALCULATE([TotalSalary],FactSalary[Month]="May"))
in order to remove all the filters from other columns, you change to:
CALCULATE([TotalSalary],FILTER(ALL(FactSalary), FactSalary[Month]="May"))
where the only difference is that the filter iterates the entire FactSalary table and not only the values of the Month column (you see all months)
May only
Hello, pawel1
Although I have understand the problem but further you briefly describe the solution .(Why only May will be the answer Although the ALL(FactSalary[Month]) remaining?
Hello arifulice
I'm not an expert on DAX but I found a good explanation here:
https://community.powerbi.com/t5/Desktop/Filter-and-Allexcept/td-p/76403
the way I understand:
CALCULATE([TotalSalary],FILTER(ALL(FactSalary[Month]), FactSalary[Month]="May"))
the filter iterates only the values of the [Month] column (you will see May only). It is the same as:
CALCULATE([TotalSalary],FactSalary[Month]="May"))
in order to remove all the filters from other columns, you change to:
CALCULATE([TotalSalary],FILTER(ALL(FactSalary), FactSalary[Month]="May"))
where the only difference is that the filter iterates the entire FactSalary table and not only the values of the Month column (you see all months)
Hello Pawel1
Thank you so much. I have understand the solution, Thats you described in your post...
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 |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |