March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I'm trying to create a model to analyse costs of our IT Service Desk using the new What If functionality to input hourly costs via sliders. I therefore need to calculate either [Time Taken] x [1st Line Support WhatIf Value] [Measure 1] or [Time Taken] x [2nd Line Support WhatIf Value] [Measure 2] depending upon which tier of support dealt with the request.
Measures [1] and [2] work fine in isolation however I am struggling as soon as I introduce an IF statement to conditionally select the WhatIf value. I've tried adding a calculated column onthe original data source which looks like this:
Cost = IF(Data[Position] = "1st Line", WhatIf_1stLineCost[WhatIfParam1 Value], WhatIf_2ndLineCost[WhatIfParam2 Value])
As soon as I do this the values are blank.
Any suggestions on how to achieve this? It seems like such a simple problem. See below for an example of what I need the data to display like, the values in red is what I am trying to achieve.
Solved! Go to Solution.
Hi @AspireAlex,
You can refer to below sample to use position to switch the line value.
Measure = var currentPosition=LASTNONBLANK(Table1[Position],[Position]) return MAX(Table1[Time Token])*SWITCH(currentPosition,"Line 1",MAXX(VALUES('Select 1'[Line 1]),[Line 1]),"Line 2",MAXX(VALUES('Select 2'[Line 2]),[Line 2]))
Regards,
Xiaoxin Sheng
Hi @AspireAlex,
You can refer to below sample to use position to switch the line value.
Measure = var currentPosition=LASTNONBLANK(Table1[Position],[Position]) return MAX(Table1[Time Token])*SWITCH(currentPosition,"Line 1",MAXX(VALUES('Select 1'[Line 1]),[Line 1]),"Line 2",MAXX(VALUES('Select 2'[Line 2]),[Line 2]))
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
Thanks for your advice, I've managed to get it working now that I've created the CurrentPosition measure.
Alex
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |