Forum Discussion
Anonymous
4 years agoNot applicable
Calculation error in YTD due to duplicates
Hi Experts, I have written the formula for ytd as below: TotalGWPYTD = calculate(SUM ( PolBudget[Total Gross Premium] ), VALUE(PolBudget[Year]) = YEAR ( TODAY () ) ) and got the expected result,...
- Anonymous4 years ago
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Flag = IF( MAX('PolBudget'[Year])=YEAR(TODAY()),1,0)TotalGWPYTD = SUMX(ALLSELECTED('PolBudget'),[Total Gross Premium])2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
If you need pbix, please click here.
Calculation error in YTD due to duplicates.pbix
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
amitchandak
Super User
4 years agoAnonymous , try like
TotalGWPYTD = calculate(SUM ( PolBudget[Total Gross Premium] ), Filter(PolBudget, PolBudget[Year]) = YEAR ( TODAY () ) )
refer if needed
- Anonymous4 years agoNot applicable