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.
Hello
Im need to create a accumlated column grouped by 2 criteria. In my case group by A_Codi and Month
Im create a measure with this formula
Acumulated = CALCULATE(sum(Query1[Total_USD]);FILTER(ALL(Query1);Query1[Mes]<max(Query1[Mes])))
But not run!!
I need Accomulated has this values
A_Codi Month Acumulated Total_USD
28812 February -40.60 -40.60
28812 March -40.60 0
36100 April -35.44 -35.44
..
36246 January 0 0
36246 February 0 0
36246 March -2396.00 -2396.00
36246 April 2248,63 4644,63
36246 May 3075.31 826.68
36246 June 3379.3 303.99
Thanks
Best regards
Solved! Go to Solution.
Hi Sebasjun,
If you need the formula to maintain filters for other columns like 'A_Codi' you need to omit them from the ALL() call (as this will remove the filter context of the A-Codi column) Also I think the "<" should be a "<=" for it to work as you describe.
Try this pattern:
Acumulated = CALCULATE(sum(Query1[Total_USD]);FILTER(ALLEXCEPT(Query1, Query1[A_Codi]);Query1[Mes]<=max(Query1[Mes])))
Cheers Greg
Hi Sebasjun,
If you need the formula to maintain filters for other columns like 'A_Codi' you need to omit them from the ALL() call (as this will remove the filter context of the A-Codi column) Also I think the "<" should be a "<=" for it to work as you describe.
Try this pattern:
Acumulated = CALCULATE(sum(Query1[Total_USD]);FILTER(ALLEXCEPT(Query1, Query1[A_Codi]);Query1[Mes]<=max(Query1[Mes])))
Cheers Greg
Hello
Thanks for the reply
The formula runs correctly with my samples, but i try to put the table to a line graph and apply a filter by a_codi and the filter not run, but i change to table and the table filter correctly.
I think initially the problem is the Alllexcept, but why the table runs and the line chart not???
Best regards
Hi @sebasjun,
Can you provide the sample file to test? It is hard to reproduce and fix your issue from your description
Regards,
Xiaoxin Sheng
If use a table the solution is correct and this is my inital problem.
Thanks a lot
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 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |