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 Everyone,
How can I create a "Coste Actual Estimado" column that shows an accumulated value, something like this:
Coste Mensual Estimado | Coste Total 2015 | Coste Actual Estimado | |
Month | 0 | 50 | 50 |
January | 0 | 50 | 50 |
February | 0 | 50 | 50 |
March | 0 | 50 | 50 |
April | 0 | 50 | 50 |
May | 0 | 50 | 50 |
June | 0 | 50 | 50 |
July | 15 | 50 | 65 |
August | 10 | 50 | 75 |
September | 15 | 50 | 90 |
October | 0 | 50 | 90 |
November | 35 | 50 | 125 |
December | 40 | 50 | 165 |
In addition, I have to disinguish the values by CODE (cause I have a lot of projects).
Thanks
Solved! Go to Solution.
Hi @as3znaus,
Based on the sample data above, you can create "Coste Actual Estimado" column using below formula. But, you should add an index column in Query Editor.
Coste Actual Estimado = CALCULATE ( SUM ( 'Cumulative SUM'[Coste Mensual Estimado] ), FILTER ( 'Cumulative SUM', 'Cumulative SUM'[Index] <= EARLIER ( 'Cumulative SUM'[Index] ) ) ) + 'Cumulative SUM'[Coste Total 2015]
What do you mean "disinguish the values by CODE"? Is "CODE" a column in your source table? For further analysis, would you please share some more sample data and describe more detailed about "CODE"?
Thanks,
Yuliana Gu
1. Create one index column for this in Query editor with what sorting u want.
2. Create column
Column = var index_1 = index
var sum_of_Coste_Mensual_Estimado = calculate ( sum(Coste Mensual Estimado), filter (all(Table_Name), index < index_1 )
var Val_Coste_Total_2015 = 'Coste Total 2015'
return Val_Coste_Total_2015 + sum_of_Coste_Mensual_Estimado
Try this , I hope it will help u dude,
let me know if it is not helping u
Thanks for the answers! I finally managed to avoid this sum using Group By.
I srtongly recomemded to everyone to avoid Earlier because it will create performance issue.
check with large amount of data.
Hi @as3znaus,
Based on the sample data above, you can create "Coste Actual Estimado" column using below formula. But, you should add an index column in Query Editor.
Coste Actual Estimado = CALCULATE ( SUM ( 'Cumulative SUM'[Coste Mensual Estimado] ), FILTER ( 'Cumulative SUM', 'Cumulative SUM'[Index] <= EARLIER ( 'Cumulative SUM'[Index] ) ) ) + 'Cumulative SUM'[Coste Total 2015]
What do you mean "disinguish the values by CODE"? Is "CODE" a column in your source table? For further analysis, would you please share some more sample data and describe more detailed about "CODE"?
Thanks,
Yuliana Gu
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |