Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AliceW
Impactful Individual
Impactful Individual

About 'New Parameter: Fields'. Can I do one minus another?

Hi ladies and gents,

I would love to use this recent feature, 'New Parameter: Fields', BUT I would need to deduct one Parameter from another. Is this possible?

E.g.

Prm Switch 1 = {
("Sales", NAMEOF('Measures Table'[Sales]), 0),
("Budget", NAMEOF('Measures Table'[Budget]), 1),
("Sales Last Year", NAMEOF('Measures Table'[Sales Last Year]), 2)
}
 
Prm Switch 2 = {
("Sales", NAMEOF('Measures Table'[Sales]), 0),
("Budget", NAMEOF('Measures Table'[Budget]), 1),
("Sales Last Year", NAMEOF('Measures Table'[Sales Last Year]), 2)
}
 
I would build a table with, say, the Regions on rows, and Parameter 1 as column 1 and Parameter 2 as column 2.
Then add 'Delta' between the one value selected in Parameter 1 and the one value selected in Parameter 2.
Would this work, please?
Huge thanks,
Alice
1 ACCEPTED SOLUTION
AliceW
Impactful Individual
Impactful Individual

Ok, I figured it out. Leaving it here because it's such an awesome topic.

Step 1 - create one measure per Parameter like this (careful, based on the ORDER column, otherwise it does not work):

 

Amount Switch 1 =
var InSwitch =
SELECTEDVALUE('Prm Switch 1'[Prm Switch 1 Order])

var Result =
switch(
InSwitch,
0, 'Measures Table'[Sales],
1, 'Measures Table'[Budget],
2, 'Measures Table'[Sales Last Year]
)

return
Result
 
Step 2 - create the Delta measure as a simple
Delta = Amount Switch 1 - Amount Switch 2
 
Step 3 - enjoy the report displaying the columns names!

View solution in original post

1 REPLY 1
AliceW
Impactful Individual
Impactful Individual

Ok, I figured it out. Leaving it here because it's such an awesome topic.

Step 1 - create one measure per Parameter like this (careful, based on the ORDER column, otherwise it does not work):

 

Amount Switch 1 =
var InSwitch =
SELECTEDVALUE('Prm Switch 1'[Prm Switch 1 Order])

var Result =
switch(
InSwitch,
0, 'Measures Table'[Sales],
1, 'Measures Table'[Budget],
2, 'Measures Table'[Sales Last Year]
)

return
Result
 
Step 2 - create the Delta measure as a simple
Delta = Amount Switch 1 - Amount Switch 2
 
Step 3 - enjoy the report displaying the columns names!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.