Forum Discussion
Column IF Statement with two variables help
- 3 years ago
Vtomsons , refer if my blog to get latest value can help
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Vtomsons , refer if my blog to get latest value can help
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
- Vtomsons3 years agoHelper I
Thank you Amit. I think I almost have it using the two measures on your blog. One scenario is not working though. If the latest registration start date is the same for multiple promo courses, the sum is calculating all three rather then just the one. The measure works but my data for some have the same registration start date for the latest promo course, ugh. Any ideas on how to account for this in one of these measures from your blog? Thanks again!
Last Promo Date Qty =
var _max = MAXX(FILTER(ALLSELECTED('ONLINE Reg''n'), 'ONLINE Reg''n'[Student ID] = MAX('ONLINE Reg''n'[Student ID])), 'ONLINE Reg''n'[Registration start date])
return CALCULATE(SUM('ONLINE Reg''n'[Promo Revenue]),FILTER('ONLINE Reg''n','ONLINE Reg''n'[Student ID]=MAX('ONLINE Reg''n'[Student ID]) && ('ONLINE Reg''n'[Registration start date] = _max)))Promo Revenue SUM = SUMX(VALUES('ONLINE Reg''n'[Student ID]), 'ONLINE Reg''n'[Last Promo Date Qty])