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! Learn more
Hello, I’m asking for help. The measure below takes a very long time to calculate. I have tried many optimization methods, but unfortunately, I can’t seem to do it well. Could I ask you for some tips on how to improve this?
xL4L Rev Units =
VAR dmax = CALCULATE ( MAX ( 'DWH DimDate'[DateID] ) )
VAR dmin = CALCULATE ( MIN ( 'DWH DimDate'[DateID] ) )
VAR temp = CALCULATETABLE (
SUMMARIZE (
'DWH FactL4L',
'DWH FactL4L'[StoreID],
"measure ACT", [Units_SUM],
"measure LY", [Units_LY]
),
'DWH FactL4L'[L4L_Monthly] = TRUE (),
'DWH FactL4L'[DimDate_ID] <= dmax,
'DWH FactL4L'[DimDate_ID] >= dmin,
ALL ( 'DWH DimDate' ) )
RETURN
CALCULATE (
DIVIDE(
SUMX ( temp, [measure ACT] - [measure LY]) ,
SUMX ( temp, [measure LY] ),
BLANK()
)
Solved! Go to Solution.
Hi @krzysztof
Has your problem been resolved? If so, could you mark the corresponding reply as the solution so that others with similar issues can benefit from it?
If not, please try the following modified Dax:
xL4L Rev Units =
VAR dmax = MAX ( 'DWH DimDate'[DateID] )
VAR dmin = MIN ( 'DWH DimDate'[DateID] )
VAR temp =
FILTER (
'DWH FactL4L',
'DWH FactL4L'[L4L_Monthly] = TRUE () &&
'DWH FactL4L'[DimDate_ID] <= dmax &&
'DWH FactL4L'[DimDate_ID] >= dmin
)
RETURN
DIVIDE(
SUMX ( temp, [Units_SUM] - [Units_LY] ),
SUMX ( temp, [Units_LY] ),
BLANK()
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @krzysztof
Has your problem been resolved? If so, could you mark the corresponding reply as the solution so that others with similar issues can benefit from it?
If not, please try the following modified Dax:
xL4L Rev Units =
VAR dmax = MAX ( 'DWH DimDate'[DateID] )
VAR dmin = MIN ( 'DWH DimDate'[DateID] )
VAR temp =
FILTER (
'DWH FactL4L',
'DWH FactL4L'[L4L_Monthly] = TRUE () &&
'DWH FactL4L'[DimDate_ID] <= dmax &&
'DWH FactL4L'[DimDate_ID] >= dmin
)
RETURN
DIVIDE(
SUMX ( temp, [Units_SUM] - [Units_LY] ),
SUMX ( temp, [Units_LY] ),
BLANK()
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @krzysztof
you can try the following modification:
xL4L Rev Units =
VAR dmax = CALCULATE ( MAX ( 'DWH DimDate'[DateID] ) , ALL ( 'DWH DimDate' ) )
VAR dmin = CALCULATE ( MIN ( 'DWH DimDate'[DateID] ),ALL ( 'DWH DimDate' ) )
VAR temp = SUMMARIZE (
filter ('DWH FactL4L', 'DWH FactL4L'[L4L_Monthly] = TRUE (),
'DWH FactL4L'[DimDate_ID] <= dmax,
'DWH FactL4L'[DimDate_ID] >= dmin) ,
'DWH FactL4L'[StoreID],
"measure ACT", [Units_SUM],
"measure LY", [Units_LY]
)
RETURN
DIVIDE(
SUMX ( temp, [measure ACT] - [measure LY]) ,
SUMX ( temp, [measure LY] ),
BLANK()
)
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |