Forum Discussion
music43
Advocate II
5 years agoPerformance problem with simple measure chain
Hi I am in the early stages of learning DAX. I have what I think is a simple chain of measures BUT my Quantity Sold (over nWeeks) is taking 3 minutes to reurn the results so clearly I have an iss...
AlB
Community Champion
5 years agoHi music43
Can you share the pbix? Optimization frequently depends on your data structure and other particularities of the model. Try this to start with
Quantity Sold (over nWeeks) =
VAR StartDate =
MAX ( 'fctSales'[Invoice Date] )
- 7 * SELECTEDVALUE ( 'WeekRange'[pWeekRangeForAWS], 26 )
RETURN
CALCULATE ( [Total Quantity Shipped], 'dimCalendar'[DATE: DATE] >= StartDate )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers