Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have the following measure
Solved! Go to Solution.
Hi @Natalia10000 ,
I understand what you mean, but there is no way to dynamically add parameters to ALLEXCEPT, the method in reply 2 is an alternative. Or you could consider the ALLSELECTED function and see if it achieves your desired result.
PercentageofTotal2 =
var TotalKPI = CALCULATE(
[Calculation KPI],
ALLSELECTED(dimarticle))
RETURN
DIVIDE([Calculation KPI],TotalKPI)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Natalia10000 ,
You can use ISFILTERED function to check if a column is being filtered.
PercentageofTotal2 =
VAR TotalKPI1 =
CALCULATE (
[Calculation KPI],
ALLEXCEPT (
dimarticle,
dimarticle[MerchandiseCategoryACGDesc],
dimarticle[ProductAllocation]
)
)
VAR _1 =
DIVIDE ( [Calculation KPI], TotalKPI1 )
VAR TotalKPI2 =
CALCULATE (
[Calculation KPI],
ALLEXCEPT (
dimarticle,
dimarticle[MerchandiseCategoryACGDesc],
dimarticle[ProductAllocation],
dimarticle[Category]
)
)
VAR _2 =
DIVIDE ( [Calculation KPI], TotalKPI2 )
RETURN
IF ( ISFILTERED ( dimarticle[Category] ), _2, _1 )
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank You, but do You know another way? Because I would need to add more to ALLEXCEPT because I have several filters on dimarticle, if I would use ISFILETERED that would mean lots of conditions
Hi @Natalia10000 ,
I understand what you mean, but there is no way to dynamically add parameters to ALLEXCEPT, the method in reply 2 is an alternative. Or you could consider the ALLSELECTED function and see if it achieves your desired result.
PercentageofTotal2 =
var TotalKPI = CALCULATE(
[Calculation KPI],
ALLSELECTED(dimarticle))
RETURN
DIVIDE([Calculation KPI],TotalKPI)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |