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.
Hi, I'm working in a small dataset with twelve fiscal weeks. So, I need to sum the values from CalculatedMeasure1 for the CalculatedMeasure2 by Fiscal Week, but the SUMX plus ALLEXCEPT is not working to return expected result.
The dataset:
Fiscal Week | CalculatedMeasure1 (percentile) | CalculatedMeasure2 (expected result) |
2022_F05 | 30% | 115% |
2022_F05 | 60% | 115% |
2022_F05 | 25% | 115% |
For the For the CalculatedMeasure1 I'm only divide the Consumed by Budget to return the percentile consumed (not all columns in the table to simplify).
For the CalculatedMeasure2 I'm trying
CalculatedMeasure2 =
CALCULATE(SUMX('Table','Table'[CalculatedMeasure1]),
ALLEXCEPT('Table','Table'[Fiscal Week])
)
Solved! Go to Solution.
I could solve step back on the dataset and use CTE (Commom Table Expression) in SQL Server side. So, based in solution outside of Power BI DAX, I think the solution is the same in DAX, create a temp table and then apply measure in the aggregated temp table.
I could solve step back on the dataset and use CTE (Commom Table Expression) in SQL Server side. So, based in solution outside of Power BI DAX, I think the solution is the same in DAX, create a temp table and then apply measure in the aggregated temp table.
Hi @Ito_c ,
Try this:
CalculatedMeasure2 =
SUMX (
ALLEXCEPT ( 'Table', 'Table'[Fiscal Week] ),
'Table'[CalculatedMeasure1]
)
Or
CalculatedMeasure2 =
SUMX (
FILTER (
'Table',
'Table'[Fiscal Week] = SELECTEDVALUE ( 'Table'[Fiscal Week] )
),
'Table'[CalculatedMeasure1]
)
Best Regards,
Jay
Hi @v-jayw-msft , both not work. The first return the same value mentioned 40686% and the second return blank.
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |