Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have created a measure to calculate the Last 45-day cumulative SalesValue for particular SKU of selected Date.
this measure is taking more time than expected to load the data.
is there any better way to write this query?
this is my measure query
Rtn Sales Value (45) =
CALCULATE (
SUM(ReturnTable[Sales Value]),
FILTER (
ALL ( ReturnTable ),
ReturnTable[Created Date] > MAX ( ReturnTable[Created Date] ) - 45
&& ReturnTable[Created Date] <= MAX ( ReturnTable[Created Date] ) && ReturnTable[SKU] = MAX(ReturnTable[SKU])
)
)
Solved! Go to Solution.
Alternate dax statement does same thing:
CALCULATE( [Total Sales],
DATESINPERIOD( Dates[Date], MAX( Dates[Date] ), -30, Day ) )
am using generic table/field names, not yours, 30 day example of course - and Dates table is just that ....assume you have one...
I've never seen a statement that this would be faster so am interested if it is, hope you'll post....
Alternate dax statement does same thing:
CALCULATE( [Total Sales],
DATESINPERIOD( Dates[Date], MAX( Dates[Date] ), -30, Day ) )
am using generic table/field names, not yours, 30 day example of course - and Dates table is just that ....assume you have one...
I've never seen a statement that this would be faster so am interested if it is, hope you'll post....
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
87 | |
80 | |
69 | |
69 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |