Forum Discussion
yaman123
5 years agoPost Partisan
YTD without a date column
Hi all, I need help with creating a measure which will give me the YTD value without a date column. I have a measure which calculates the budget per category Total Budget Values = SUMX(VA...
- Anonymous5 years ago
You can create a separate distinct table to use the period as the slicer, then create a measure to get expected value.
Period = DISTINCT('Table'[Period])Measure = CALCULATE(SUM('Table'[Budget Value]),FILTER(ALLSELECTED('Table'),[Category]=MAX([Category]) && [Period]<=SELECTEDVALUE(Period[Period])))Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
FarhanAhmed
5 years agoCommunity Champion
Can you please share some sample data for your requirement along with desired results?
yaman123
5 years agoPost Partisan
Hi FarhanAhmed
I am hoping this makes sense.
In yellow is what i expect. It should give me the YTD total per category when i select a account period from a slicer. E.g if i select account period 4, the total for consultancy is 600 and for IT costs is 120000.
- FarhanAhmed5 years agoCommunity Champion
Try something like this.
_YTD = CALCULATE(SUM('YTD'[Budget]),FILTER(ALLEXCEPT('YTD','YTD'[Category]),'YTD'[PeriodID]<=MAX('YTD'[PeriodID])))