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.
I need to calculate an accumulated sum and use the accumulated value for the current month as a variable to add the value column for the other previous months. Example:
Mês | Valor | Acumulado | Resultado |
Janeiro | 10 | 10 | 80+10=90 |
Fevereiro | 10 | 20 | 80+20=100 |
Março | 10 | 30 | 80+30=110 |
Abril | 10 | 40 | 80+40=120 |
Maio | 10 | 50 | 80+50=130 |
Junho | 10 | 60 | 80+60=140 |
Julho | 10 | 70 | 80+70=150 |
Agosto | 10 | 80 | 80+80=160 |
Setembro | 10 | 90 | 80+90=170 |
Outubro | 10 | 100 | 80+100=180 |
Novembro | 10 | 110 | 80+110=190 |
I created a measurement to return the value for the month of August, but when I put the measurement on the graph, I have the result below.
Mês | Valor | Acumulado | Resultado |
Janeiro | 10 | 10 | 10+10 =20 |
Fevereiro | 10 | 20 | 10+20=30 |
Março | 10 | 30 | 10+30=40 |
Abril | 10 | 40 | 10+40=50 |
Maio | 10 | 50 | 10+50=60 |
Junho | 10 | 60 | 10+60=70 |
Julho | 10 | 70 | 10+70=80 |
Agosto | 10 | 80 | 10+80=90 |
Setembro | 10 | 90 | 10+90=100 |
Outubro | 10 | 100 | 10+100=110 |
Novembro | 10 | 110 | 10+110=120 |
I need the accumulated value of the current month (August) to add with the value column for each month.
can you help me?
Solved! Go to Solution.
HI @Wilianfilho_ps ,
Create an index column in Power Query
Then create these Calculated Columns
Ac = SUMX(FILTER('Table','Table'[Index] <= EARLIER('Table'[Index])),'Table'[Valor])
RE =
var Augusto = SUMX(FILTER('Table','Table'[Mês] = "Agosto"),'Table'[Ac])
RETURN
Augusto + 'Table'[Ac]
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
HI @Wilianfilho_ps ,
Create an index column in Power Query
Then create these Calculated Columns
Ac = SUMX(FILTER('Table','Table'[Index] <= EARLIER('Table'[Index])),'Table'[Valor])
RE =
var Augusto = SUMX(FILTER('Table','Table'[Mês] = "Agosto"),'Table'[Ac])
RETURN
Augusto + 'Table'[Ac]
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Wilianfilho_ps ,
Not very clear.
Can you share the expectd output?
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
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 |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |