Forum Discussion
SaCvP125
8 years agoFrequent Visitor
Calculations with previous row
Hi guys, I've the following dataset that shows me the numbe of consumed and losted tickets in last 4 years. And I know that I have 32 tickets consumed for the next year. Tickets_Consumed Yea...
- 8 years ago
Hi SaCvP125
Try this measures...
Total Consumed = SUM(Table1[Tickets Consumed])
Total Losted = SUM(Table1[Tickets Losted])
Current Number = 32
Result = var actualyear = FIRSTNONBLANK(Table1[Year];1) return CALCULATE([Current Number] + [Total Consumed] - [Total Losted];ALL(Table1);Table1[Year]>=actualyear)and this is the final result...
I hope this helps
Regards
BILASolution
Zubair_Muhammad
8 years agoCommunity Champion
Hi SaCvP125
This calculated column shall get you desired result hopefully.
Modify Table Name
Result=
32
+ CALCULATE (
SUM ( Table1[Tickets_Consumed] ),
FILTER ( Table1, Table1[Year] >= EARLIER ( Table1[Year] ) )
)
- CALCULATE (
SUM ( Table1[Tickets_Losted] ),
FILTER ( Table1, Table1[Year] >= EARLIER ( Table1[Year] ) )
)- Zubair_Muhammad8 years agoCommunity Champion