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

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.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Display only one output/cell in a table from separate, individual parameter input

I am new to PowerBI and Parameter input.

Basically, I am trying to have each parameter for each location (example: CA, CPAC etc..).

Here, I only have two parameters for two locations (for an example), but there will be total 12 parameters for all locations.

 

Depending on what user selects for the parameter value, output should only display for that location only.

Currently, if I use "CA" parameter, calculation adds to all Locations (CA, CPAC, HPHC.. etc.) by adding 20.

I only want 71 + 20 = 91 (for "CA") to be reflected leaving other 11 Output values unchanged.

What I am trying to accomplish is, whenever user changes the value on individual parameter for that specific location, value of Output should change for that location (one cell in a table) only, leaving the Output values for other locations (not changed).

On the bottom case, even though I have addition of 40 for CPAC location, it is 80 instead of 100. 

JustinDoh1_0-1624556227706.png

Bottom is screenshot of output column "Output":

JustinDoh1_2-1624557332608.png

I guess what I am trying to do is make this area dynamic based on each parameter for 12 different locations.

 

I have attached PBIX file on this Google drive link.

Is this (input and output on each text box/cell like a web application) something possible with Power BI? 

Thanks!

 

1 ACCEPTED SOLUTION

You need a way of seeing which location is in the current filter context (or in plain english, which row of the table you're currently calculating), then selecting the appropriate parameter value based on that.

This measure uses SELECTEDVALUE to see which location we're calculating and a SWITCH statement to select which parameter value to add.  You can keep adding lines into the switch statement for each location.

 

Output =
VAR _Base = MAX(MainTable[SUM C1-C3])
VAR _Param =
SWITCH(
SELECTEDVALUE(MainTable[Area]),
"CA", [Parameter Value],
"CPAC", [CPAC Value]
)
RETURN
_Base + _Param

View solution in original post

4 REPLIES 4
JustinDoh1
Post Prodigy
Post Prodigy

@PaulOlding Thanks a lot! Working.

Anonymous
Not applicable

Hello @JustinDoh1 
You can attach the pbix file by using one drive or drive. You can this link 
Please share the expected output with the attached pbix.

@Anonymous  As far as expected output is concerned, I have attached an image on the post. Regards to PBIX file, please try this link. I think it should work. File is called "JustinD.pbix". Thanks.

You need a way of seeing which location is in the current filter context (or in plain english, which row of the table you're currently calculating), then selecting the appropriate parameter value based on that.

This measure uses SELECTEDVALUE to see which location we're calculating and a SWITCH statement to select which parameter value to add.  You can keep adding lines into the switch statement for each location.

 

Output =
VAR _Base = MAX(MainTable[SUM C1-C3])
VAR _Param =
SWITCH(
SELECTEDVALUE(MainTable[Area]),
"CA", [Parameter Value],
"CPAC", [CPAC Value]
)
RETURN
_Base + _Param

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors