Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Creating date range in measure

Hi guys,

 

i created a measure that should give me the revenue for the last 90 days rolling: 

 

Unbenannt.PNG

 

It works fine as long as i just show the measure in a card with the correct last 90 day revenue of 14K.

 

But once i pull the measure into the bar chart all bars for every month show the value of the last 90 days:

Unbenannt.PNG

 

In the bar chart it should should show the distribution of the revenue of last 90 days but not always the same revenue. 

 

Anybody an idea why that is and how to fix that?

 

Thank you!

 

 

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

it because of lastDateAvailable variable

you use ALL() sentence that remove all filters and return to you always the same value

try

lastDateAvailable = MAX('Bestselling'[dBezhalt])

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

@Anonymous , Try rolling like this

example

Rolling 30 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Date[Date],MAX(Sales[Sales Date]),-30,Day))

 

Use Date Table

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors