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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nish18_1990
Helper II
Helper II

Parameter Value selection

Hi ,

 

How can i link two parameters together :

 

 

I created two clustered chart one on the left and one on the right .

 

I created two parameter to show Loss and Sales on the left chart and Quantity and Profit on right chart .

 

What i want is only one parameter for both charts for selection :

 

For example : If i select Sales in Parameter it should show Sales on the left chart and Quantity on the right chart . 

If i select Loss in Parameter then it should show loss on left chart and profit on right chart . 

 

Can this be done in Power BI ? 

 

nish18_1990_1-1748591406932.png

 

 

 

Data :

 

 

CategorySub CategoryProfitLossSalesQuantity Q2countryCreated date
FurnitureChairs102010010China22/05/204
FurnitureTables102010020China23/05/2025
AutomobileCars122010030China21/01/2025
AutomobileBikes101070040China21/03/2025
FurnitureChairs102010013India21/01/2025
FurnitureTables32050022India21/02/2025
AutomobileCars103010054India21/01/2025
AutomobileBikes102010060India30/01/2025
FurnitureChairs102010030China22/01/2025
FurnitureTables92030029China23/05/2025
AutomobileCars104020088China21/03/2025
AutomobileBikes102010022China21/04/2025
FurnitureChairs102050021India12/1/2025
FurnitureTables102010033India12/1/2025
AutomobileCars205060054India21/01/2025
AutomobileBikes102010060India30/01/2025
FurnitureChairs102010030China22/01/2025
FurnitureTables102010029China23/05/2025
FurnitureSofa102010088China21/03/2025
FurnitureBed102010022China21/04/2025
FurnitureDining102010021India12/1/2025
FurnitureTables102010033India12/1/2025
FurnitureTables102010054India21/01/2025
FurnitureSofa152010060India30/01/2025
AutomobileCars1030100054India21/04/2025
AutomobileBikes102010060India30/06/2025
FurnitureChairs52010030China22/07/2025
FurnitureTables101020029China23/07/2025
FurnitureSofa102010088China21/03/2025
FurnitureBed102010022China21/04/2025
FurnitureDining202010021India12/1/2025
FurnitureTables102040033India12/11/2024
FurnitureTables102080054India12/10/2024
FurnitureSofa101010060India12/11/2024

 

 

1 ACCEPTED SOLUTION
mdaatifraza5556
Super User
Super User

Hi @nish18_1990 

Can you please try the below steps to get your results.

1. First Create a table as below.
Screenshot 2025-05-30 135436.png

 

2. Create these four measures.
            

                         Total Loss = SUM(Data[Loss])
                        Total Profit = SUM(Data[Profit])
                        Total Quantity = SUM(Data[Quantity Q2])
                        Total Sales = SUM(Data[Sales])
 
3. Now create two measures for the results.
 
For left
-----------------
Selected Left Metric =
SWITCH(
    SELECTEDVALUE(ForSelection[Column1]),
    "Sales", [Total Sales],
    "Loss", [Total Loss],
    BLANK()
)
 
For right
 ---------------
Selected Right Metric =
SWITCH(
    SELECTEDVALUE(ForSelection[Column1]),
    "Sales", [Total Quantity],
    "Loss", [Total Profit],
    BLANK()
)
Now use it in the chart 

 

Screenshot 2025-05-30 140434.png

 

Screenshot 2025-05-30 140445.png

 

If this answers your questions, kindly accept it as a solution and give kudos.

View solution in original post

4 REPLIES 4
v-dineshya
Community Support
Community Support

Hi @nish18_1990 ,

Thank you for reaching out to the Microsoft Community Forum.

 

Hi @mdaatifraza5556 , Thank you for posting response in Community.

 

Hi @nish18_1990 ,

please follow below steps.

1. Created a Table(MeasureSelector) for Parameter Selection

Parameter
Loss
Sales

2. Create a Slicer Using this Table, Use MeasureSelector[Parameter] in a slicer

vdineshya_0-1748609670152.png

1. Created a Table(MeasureSelector) for Parameter Selection

Parameter
Loss
Sales

2. Create a Slicer Using this Table, Use MeasureSelector[Parameter] in a slicer

3. Create the Left Chart Measure

Measure_Left =
VAR SelectedMeasure = SELECTEDVALUE(MeasureSelector[Parameter])
RETURN
SWITCH(
    SelectedMeasure,
    "Sales", SUM('Table'[Sales]),
    "Loss",  SUM('Table'[Loss]),
    BLANK()
)

4. Create the Right Chart Measure

Measure_Right =
VAR SelectedMeasure = SELECTEDVALUE(MeasureSelector[Parameter])
RETURN
SWITCH(
    SelectedMeasure,
    "Sales", SUM('Table'[Quantity Q2]),
    "Loss",  SUM('Table'[Profit]),
    BLANK()
)

5. select two bar charts.

For the Left Chart, use Sub Category on axis and Measure_Left as value.

For the Right Chart, use Sub Category on axis and Measure_Right as value.

 

Selecting Sales in slicer → Left: Sales count | Right: Quantity

Selecting Loss in slicer → Left: Loss count | Right: Profit

 

output:

select the left chart and in Visual settings-> format option-> X-axis-> select "Invert range" set to "ON"

 

please refer output snap and PBIX file.

vdineshya_1-1748609924495.png

 

If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.

Thank you

Hi @nish18_1990 ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

 

Thank you.

mdaatifraza5556
Super User
Super User

Hi @nish18_1990 

Can you please try the below steps to get your results.

1. First Create a table as below.
Screenshot 2025-05-30 135436.png

 

2. Create these four measures.
            

                         Total Loss = SUM(Data[Loss])
                        Total Profit = SUM(Data[Profit])
                        Total Quantity = SUM(Data[Quantity Q2])
                        Total Sales = SUM(Data[Sales])
 
3. Now create two measures for the results.
 
For left
-----------------
Selected Left Metric =
SWITCH(
    SELECTEDVALUE(ForSelection[Column1]),
    "Sales", [Total Sales],
    "Loss", [Total Loss],
    BLANK()
)
 
For right
 ---------------
Selected Right Metric =
SWITCH(
    SELECTEDVALUE(ForSelection[Column1]),
    "Sales", [Total Quantity],
    "Loss", [Total Profit],
    BLANK()
)
Now use it in the chart 

 

Screenshot 2025-05-30 140434.png

 

Screenshot 2025-05-30 140445.png

 

If this answers your questions, kindly accept it as a solution and give kudos.

Thanks !

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.