Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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])))
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
100 | |
64 | |
44 | |
37 | |
35 |