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,
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
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 |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |