Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |