The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hello,
I am trying to create a line chart like the one below, calculating the percentage of each gender within each category, rather than that of the total population:
I have used two formulas to achieve that.
First, I created a new column:
Solved! Go to Solution.
Hello @V-pazhen-msft! Thank you for your help.
Unfortunately, DAX syntax doesn't allow for more than 2 arguments to be passed to the Filter function, so it doesn't work.
However, I posted this problem again, and somebody found a solution, please see below:
You would need to use Allselected instead of ALLEXCEPT. Try the following measure:
Total by Category = CALCULATE(COUNT(Headcount[Pers. No.]), Filter(Allselected(Headcount),[Categories]=MAX([Categories]), [Division]=MAX([Division]), [Subdivision]=MAX([Subdivision]), [Org. Unit]=MAX([Org. Unit])))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hello @V-pazhen-msft! Thank you for your help.
Unfortunately, DAX syntax doesn't allow for more than 2 arguments to be passed to the Filter function, so it doesn't work.
However, I posted this problem again, and somebody found a solution, please see below:
@korina , Try a measure like this and check
Total by Category = CALCULATE(COUNT(Headcount[Pers. No.]), Filter(allselected(Headcount), Headcount[Categories] = all(Headcount[Categories])))
User | Count |
---|---|
160 | |
111 | |
96 | |
86 | |
75 |
User | Count |
---|---|
158 | |
136 | |
133 | |
81 | |
61 |