Forum Discussion
admin11
5 years agoMemorable Member
How to modify expression return Feb 2021 Amount ?
Hi All I have below YTD expression working fine :- _YTD EXP = CALCULATE(CALCULATE(GL[AMOUNT],DATESYTD('Date'[Date],"12/31")), GL[1_EXP] = "EXP") Can some one help me to modify the above ...
mohammedadnant
5 years agoImpactful Individual
admin11
5 years agoMemorable Member
My PBI file :-
Above link is my PBIX file
Paul
- V-lianl-msft5 years agoCommunity Support
Hi admin11 ,
Your formula is used to calculate YTD. If you want to calculate the value of February, it is recommended that you apply filters to [amount].
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- admin115 years agoMemorable Member
Thank you for sharing.
The reasons i need it with out using filter panel is because , i need it dynamic change every month with me change the filter panel setting.
Paul
- V-lianl-msft5 years agoCommunity Support
Hi admin11 ,
Do you want to display the sum of the most recent months in the fact table with a card?
Try this measure:
Measure = var min_ = CALCULATE(MAX(GL[Posting Date]),ALLSELECTED('Date')) var ym = FORMAT(min_,"YYYY-MM") return CALCULATE(GL[AMOUNT],FILTER(GL,GL[1_EXP]="EXP"),FILTER('Date','Date'[YrMth Sort]=ym))Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.