Forum Discussion
Ramfeb27
1 year agoRegular Visitor
Revenue lost in Next year
Hi Everyone, please help me on the below use case I want to calculate Revenue lost in the next year value. In the below sample data, in the Lost column, whichever record is marked as 1 needs to m...
- 1 year ago
Hi Ramfeb27 🙂
You can try this measure:Lost Revenue Measure = VAR __PrevYear = SELECTEDVALUE ( Demo[Year] ) - 1 VAR __CustID = SELECTEDVALUE ( Demo[Cus#] ) VAR __PrevRevenue = LOOKUPVALUE ( Demo[Revenue], Demo[Year], __PrevYear, Demo[Cus#], __CustID ) RETURN IF ( SELECTEDVALUE ( Demo[Lost] ) = 1, __PrevRevenue )Or if you prefer a calculated column:
Lost Revenue Calculated Column = VAR __PrevYear = Demo[Year] - 1 VAR __CustID = Demo[Cus#] VAR __PrevRevenue = LOOKUPVALUE ( Demo[Revenue], Demo[Year], __PrevYear, Demo[Cus#], __CustID ) RETURN IF ( Demo[Lost] = 1, __PrevRevenue )I just copied your tabel above and named it "Demo", and this is the result:
Anonymous
1 year agoNot applicable
Hi Ramfeb27 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng