Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
After digesting so much information, I still struggle to gets the totals right.
Here is the problem
The actual sum is = 55,01,802
While if I have year filtered to 2019, I shows exact values
Here are all the measures I have coded
loadability savings corrected =
SUMX(
SUMMARIZE(
dDate,dDate[Month],"_2",
IF(
[Shipments Saved_corrected]=0||BLANK(),BLANK(),
DIVIDE(
SUMX('Prototype Modeling_Freight','Prototype Modeling_Freight'[Load Charge]),
[Shipments],BLANK())*[Shipments Saved_corrected])
),
[_2])
Shipments Saved_corrected =
VAR last_M_Shipments = DIVIDE([Volume],CALCULATE([Loadability volumetric],DATEADD(dDate[Date],-1,MONTH)),BLANK())
return
IF(
last_M_Shipments=BLANK(),BLANK(),SUMX(SUMMARIZE(dDate,dDate[Month],"_1",last_M_Shipments-[Shipments]),[_1]))
Shipments = SUMX('Prototype Modeling_Freight','Prototype Modeling_Freight'[# Shipments])
Loadability volumetric = DIVIDE([Volume],[Shipments],BLANK())
Solved! Go to Solution.
Try this
loadability savings corrected =
SUMX (
SUMMARIZE (
dDate,
dDate[Year],
dDate[Month],
"_2", IF (
[Shipments Saved_corrected] = 0
|| BLANK (),
BLANK (),
DIVIDE (
SUMX (
'Prototype Modeling_Freight',
'Prototype Modeling_Freight'[Load Charge]
),
[Shipments],
BLANK ()
) * [Shipments Saved_corrected]
)
),
[_2]
)
Shipments Saved_corrected =
VAR last_M_Shipments =
DIVIDE (
[Volume],
CALCULATE (
[Loadability volumetric],
DATEADD (
dDate[Date].[Date],
-1,
MONTH
)
),
BLANK ()
)
RETURN
IF (
last_M_Shipments
= BLANK (),
BLANK (),
SUMX (
SUMMARIZE (
dDate,
dDate[Year],
dDate[Month],
"_1", last_M_Shipments - [Shipments]
),
[_1]
)
)
If this is not working, create a sample dataset and replicate your issue. Then share those tables and expected outputs.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Try this
loadability savings corrected =
SUMX (
SUMMARIZE (
dDate,
dDate[Year],
dDate[Month],
"_2", IF (
[Shipments Saved_corrected] = 0
|| BLANK (),
BLANK (),
DIVIDE (
SUMX (
'Prototype Modeling_Freight',
'Prototype Modeling_Freight'[Load Charge]
),
[Shipments],
BLANK ()
) * [Shipments Saved_corrected]
)
),
[_2]
)
Shipments Saved_corrected =
VAR last_M_Shipments =
DIVIDE (
[Volume],
CALCULATE (
[Loadability volumetric],
DATEADD (
dDate[Date].[Date],
-1,
MONTH
)
),
BLANK ()
)
RETURN
IF (
last_M_Shipments
= BLANK (),
BLANK (),
SUMX (
SUMMARIZE (
dDate,
dDate[Year],
dDate[Month],
"_1", last_M_Shipments - [Shipments]
),
[_1]
)
)
If this is not working, create a sample dataset and replicate your issue. Then share those tables and expected outputs.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |