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.
Hi all
I am using a measure as follows:
Fixed cost var filters =
SWITCH(
TRUE(),
ISFILTERED(dDate[Year]),
DIVIDE(
CALCULATE(
SUM('Fixed Cost per Month'[fixed Cost]),
ALL('Fixed Cost per Month'[fixed Cost])
)
*MAX(dDate[Month Number]),
[Dedicated Shipments]
),
ISFILTERED(dDate[Month]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
)
)
This when fed to visualization gives the below:
for only [Year] filtered
For [Months] filtered
What I actually want from the measure is to give the "Actual Required" column values which is [Sum fixed cost / Dedicated Shipment]
Month | Dedicated Shipments | Sum fixed cost | Fixed cost var filters | Actual required |
Jan | 1800 | 910000 | 505.56 | 505.56 |
Feb | 3288 | 910000 | 553.53 | 276.76 |
Mar | 3553 | 910000 | 768.36 | 256.12 |
Apr | 3726 | 910000 | 976.92 | 244.23 |
May | 4397 | 910000 | 1034.8 | 206.96 |
Jun | 3965 | 910000 | 1377.05 | 229.51 |
Jul | 3381 | 910000 | 1884.06 | 269.15 |
Aug | 5502 | 910000 | 1323.16 | 165.39 |
Sep | 6396 | 910000 | 1280.49 | 142.28 |
Oct | 6602 | 910000 | 1378.37 | 137.84 |
Nov | 7656 | 910000 | 1307.47 | 118.86 |
Dec | 5928 | 910000 | 1842.11 | 153.51 |
Here,
Dedicated Shipments = CALCULATE([Shipments],'Prototype Modeling_Freight'[Transporter Type]="DEDICATED")
Please let me know if any additional info is required here for you to arrive to a conclusion.
All your comments and suggestions are greatly appreciated
Solved! Go to Solution.
Using INSCOPE instead of ISFILTER does the job
Fixed cost var filters =
SWITCH(
TRUE(),
ISINSCOPE(dDate[Year]),
DIVIDE(
CALCULATE(
SUM('Fixed Cost per Month'[fixed Cost]),
ALL('Fixed Cost per Month'[fixed Cost])
)
*MAX(dDate[Month Number]),
[Dedicated Shipments]
),
ISINSCOPE(dDate[Month]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Prototype Modeling_Freight'[Plant Cluster]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Equipment Master'[Max Loadability in Tonns]),
DIVIDE(VALUES('Fixed Cost per Month'[fixed Cost]),[Dedicated Shipments]),BLANK()
)
Using INSCOPE instead of ISFILTER does the job
Fixed cost var filters =
SWITCH(
TRUE(),
ISINSCOPE(dDate[Year]),
DIVIDE(
CALCULATE(
SUM('Fixed Cost per Month'[fixed Cost]),
ALL('Fixed Cost per Month'[fixed Cost])
)
*MAX(dDate[Month Number]),
[Dedicated Shipments]
),
ISINSCOPE(dDate[Month]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Prototype Modeling_Freight'[Plant Cluster]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Equipment Master'[Max Loadability in Tonns]),
DIVIDE(VALUES('Fixed Cost per Month'[fixed Cost]),[Dedicated Shipments]),BLANK()
)
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 |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
46 | |
31 | |
30 | |
18 | |
18 |