Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All
Paul
Solved! Go to Solution.
@admin11 , This formula seems correct. It should give Jan to march
Try one three versions . Two in comments //
LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return
if(max('Date'[Date])<=_max, CALCULATE(Sum('order'[Qty]),DATESYTD(dateadd('Date'[Date],-1,year)),'Date'[Date]<=_max), blank())
//OR
//CALCULATE(Sum('order'[Qty]),DATESYTD(dateadd('Date'[Date],-1,year)),'Date'[Date]<=_max)
//or
//TOTALYTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,year),'Date'[Date]<=_max)
Hi @admin11 ,
Your sample .pbix file is deleted. Please re-upload it. Please correct me if my understanding is wrong.
If you just want to sum the sales of which dates are from Jan 2021 to March 2021, you could use the "TOTALYTD()" function directly.
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Apprecaite very much for want to help me solve my issue , By the way i need your help to solve the below post , as this is more critial , Hope that you can take a look :-
@admin11 , This formula seems correct. It should give Jan to march
Try one three versions . Two in comments //
LYTD QTY forced=
var _max = date(year(today())-1,month(today()),day(today()))
return
if(max('Date'[Date])<=_max, CALCULATE(Sum('order'[Qty]),DATESYTD(dateadd('Date'[Date],-1,year)),'Date'[Date]<=_max), blank())
//OR
//CALCULATE(Sum('order'[Qty]),DATESYTD(dateadd('Date'[Date],-1,year)),'Date'[Date]<=_max)
//or
//TOTALYTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,year),'Date'[Date]<=_max)
I have try your expression :-
Above link is my PBI file
Paul
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |