Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All
I am new to PowerBI and delved around to try and find a solution to prevent rolling 12 charts extending on beyond todays date and pulled together the following, but i am getting an error end of input reached. I have tried changing the parent thesis but for life of me i cannot figure out what i have done wrong. Any help appreciated
Here is what i have
Solved! Go to Solution.
@Alpj , Sorry there was a mistake
use allselected
I trying to get max selected date or max available date in selection from fact- Sales in my case
@Alpj , Try a measure like
Rolling 12 Sales =
var _max = maxx(allselcted(date),date[date]) // or today()
var _max2 = maxx(allselcted(Sales),Sales[date]) //
var _min = date(year(_max), month(_max)-12,1)
return
CALCULATE(SUM(Sales[Sales Amount]),filter(date, date[date] <=_max && date[date] >=_min && date[date]<=_max2 ))
or
Rolling 12 =
var _max2 = maxx(allselcted(Sales),Sales[date]) //
return
CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH), 'Date'[Date] <= _max2)
Thank you so much for responding, apologies could you explain this a little,
what is the "allselcted(date)" and "allselcted(Sales)" elements?
am i replacing date[date] with my date range table?
what is the "Sales[date]"?
Fairly new to all this, so would appreciate if you could give a little explanation
Thank you
Ali
@Alpj , Sorry there was a mistake
use allselected
I trying to get max selected date or max available date in selection from fact- Sales in my case
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |