Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
I'm trying to get YTD value of a column (service fees). I have calender column and the YTD sum looks to work fine but it is summing all values.
My issue is that there is data in there with renewal date in the future. Eg today is 29th August i just want to see the sum of service fees from 1st Jan until today ( i want to exclude any with future renewal date if that makes sense)
Does anyone know how i can do this?
thanks,
Johnny
Solved! Go to Solution.
You can try the TOTALYTD or DATESYTD functions. Eg:
MeasureName = CALCULATE(SUM('Table'[Values]),DATESYTD('Calendar'[Date]=TODAY()))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
You can try the TOTALYTD or DATESYTD functions. Eg:
MeasureName = CALCULATE(SUM('Table'[Values]),DATESYTD('Calendar'[Date]=TODAY()))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
that's it - I've been all morning trying to get that (i'm not an IT guy but learning). thanks a mil
Hi,
The DAX is as below based on what you have asked. I am assuming there is no groupby or other filters to take care.
YTD =
calculate(
sum(table[values]),All(Table),table[date]>=date(2024,1,1)&&Table[date]<=today()
)
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |