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.
Hello All,
I have sitiation where i have to caliculate the diffrence
Category | Substation | Project phase | Planned Cost |
Grid Automation | Ardmore | PLAN | 515972.7981 |
Grid Resiliency | Ardmore | PLAN | 1137192.94 |
Grid Automation | Bellcow | MODEL | 1114147.5 |
Grid Automation | Bellcow | PLAN | 1174533.554 |
Grid Resiliency | Bellcow | MODEL | 2500330 |
Grid Resiliency | Bellcow | PLAN | 2157894.014 |
Grid Automation | Belle Isle Sta | MODEL | 1657040 |
Grid Automation | Belle Isle Sta | PLAN | 1550595.136 |
Grid Resiliency | Belle Isle Sta | MODEL | 1538123.351 |
Grid Resiliency | Belle Isle Sta | PLAN | 1631975.692 |
now I have to caluclate the diffrence between plan and model for each Category and Substation
Example
for Category : Grid Automation = (sum of cost of plan ) - (sum of cost of model )
and also for Subsation: Bellcow = (sum of cost of plan ) - (sum of cost of model )
but now the Subsation Ardmore has no MODEL so the difference will be just sum of cost of plan
Thanks
RP
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can do some steps as follows。
index =
RANKX (
FILTER (
CASE,
EARLIER ( CASE3[Category] ) = CASE[Category]&&EARLIER('CASE'[Substation])='CASE'[Substation]
),
'CASE'[Project phase],
,
DESC
)
Measure =
var x1 = CALCULATE(MAX('CASE'[Planned Cost]),FILTER(ALLEXCEPT('CASE',CASE[Category],CASE[Substation]),[index]=1))
var x2 = CALCULATE(MAX('CASE'[Planned Cost]),FILTER(ALLEXCEPT('CASE',CASE[Category],CASE[Substation]),[index]=2))
return
x1-x2
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can do some steps as follows。
index =
RANKX (
FILTER (
CASE,
EARLIER ( CASE3[Category] ) = CASE[Category]&&EARLIER('CASE'[Substation])='CASE'[Substation]
),
'CASE'[Project phase],
,
DESC
)
Measure =
var x1 = CALCULATE(MAX('CASE'[Planned Cost]),FILTER(ALLEXCEPT('CASE',CASE[Category],CASE[Substation]),[index]=1))
var x2 = CALCULATE(MAX('CASE'[Planned Cost]),FILTER(ALLEXCEPT('CASE',CASE[Category],CASE[Substation]),[index]=2))
return
x1-x2
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try measure like
sumx(filter(Table[Project phase] = "PLAN"),Table[Planned Cost]) -sumx(filter(Table[Project phase] = "MODEL"),Table[Planned Cost])
or
sumx(Table, if( Table[Project phase] = "PLAN" , Table[Planned Cost] , -1 *Table[Planned Cost]))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
92 | |
82 | |
63 | |
62 | |
58 |
User | Count |
---|---|
159 | |
115 | |
103 | |
75 | |
66 |