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.
olá
quero calcular o saldo acumulado, da seguinte tabela (V ACUMULADO):
V LIQUIDO | V ACUMULADO |
-36 900 000 € | -36 900 000 € |
-57 300 000 € | -94 200 000 € |
-61 500 000 € | -155 700 000 € |
18 900 000 € | -136 800 000 € |
-57 000 000 € | -193 800 000 € |
-15 900 000 € | -209 700 000 € |
-23 700 000 € | -233 400 000 € |
-45 900 000 € | -279 300 000 € |
-47 400 000 € | -326 700 000 € |
-11 400 000 € | -338 100 000 € |
-48 300 000 € | -386 400 000 € |
30 600 000 € | -355 800 000 € |
V Liquido é uma medida que determinar o valor liquido, quero agora criar outra medida para acumular o V Liquido todos os meses..
Solved! Go to Solution.
Hi, @Paulo123
I simulated some of the data hoping to restore your problem.
Measure:
V LIQUIDO = CALCULATE(SUM('Table'[Sales]))
V ACUMULADO =
CALCULATE (
SUMX ( VALUES ( 'Table'[Date] ), [V LIQUIDO] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= MAX ( 'Table'[Date] ) ))
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi,
how do I limit the sum period, for example accumulate only 3 previous periods
hi,
how do I limit the sum period, for example accumulate only 3 previous periods
Hi, @Paulo123
Measure:
Measure =
Var N1=SUMMARIZE(filter(ALL('Table'),[Date]<=MAX('Table'[Date])),[Date],"Sum",SUM('Table'[Sales]))
Var N2=TOPN(3,N1,[Date],DESC)
Return
SUMX(N2,[Sum])
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Paulo123
I simulated some of the data hoping to restore your problem.
Measure:
V LIQUIDO = CALCULATE(SUM('Table'[Sales]))
V ACUMULADO =
CALCULATE (
SUMX ( VALUES ( 'Table'[Date] ), [V LIQUIDO] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= MAX ( 'Table'[Date] ) ))
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
olá,
tentei aplicar os dois modelos, mas deparei com o mesmo problema em ambos os casos, diz que este parametro não é correto:
olá,
você precisa de referência de tabela:
[V Liquido YTD]=CALCULATE(SUM('Tabela'[V Liquido]),DATESYTD('calendário'[Date]))
[acumular o V Liquido] = var _date =MAX('calendário'[Date]) return
CALCULATE(SUM('Tabela'[V Liquido]),ALL(calendário),calendário'[Date]<=_date)
Proud to be a Super User!
Olá,
por YTD:
[V Liquido YTD]=CALCULATE(SUM('Table'[V Liquido]),DATESYTD('Calendar'[Date]))
por acumular:
[acumular o V Liquido] = var _date =MAX('Calendar'[Date]) return
CALCULATE(SUM('Table'[V Liquido]),ALL(Calendar),Calendar'[Date]<=_date)
Proud to be a Super User!
Hello @Paulo123, you can try the following and check if it works for you:
Cumulative Measure =
VAR _min =
MIN ( DimDate[Datekey] )
VAR _max =
CALCULATE ( MAX ( Sales[DateKey] ), ALL ( Sales ) )
VAR _sales =
CALCULATE (
SUM(Sales[Amount]),
FILTER (
ALL ( DimDate[Datekey] ),
DimDate[Datekey] <= MAX ( ( DimDate[Datekey] ) )
)
)
RETURN
IF ( _min <= _max, _sales, 0 )
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
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 |
---|---|
46 | |
26 | |
21 | |
12 | |
8 |
User | Count |
---|---|
75 | |
52 | |
45 | |
15 | |
12 |