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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
PBAEIGuy
Frequent Visitor

Parameter Slicer that dynamically changes values on a chart

I have a rough mock up of a chart on a dashboard with the following formula: 

Adjusted Revenue = SUMX(
    'Test Data',
    SWITCH(
        TRUE(),
        'Test Data'[Type] = "Type A",
        'Test Data'[Values] + (CALCULATE(SUM('Test Data'[Values]),'Test Data'[Type] = "Type C") * 'Shareholding Percentage'[Shareholding Percentage Value]),

        'Test Data'[Type] = "Type C",
        'Test Data'[Values] - ('Test Data'[Values] * 'Shareholding Percentage'[Shareholding Percentage Value]),

        'Test Data'[Values]
    )
)

I want my parameter slicer to simultaeniously reduce Type C and increase Type A depending on the shareholding percentage value, but it only ever seems to decrease Type C and not both A and C.

Can anyone advise? 
3 REPLIES 3
Anonymous
Not applicable

Hi @PBAEIGuy ,

I create two tables as you mentioned.

vyilongmsft_0-1737684742126.png

vyilongmsft_1-1737684769103.png

Then I think you  can create a Parameter.

vyilongmsft_2-1737684881006.png

vyilongmsft_3-1737684977614.png

Next you can create a measure and here is the DAX code.

Measure = 
SUMX(
    'Test Data',
    SWITCH(
        TRUE(),
        'Test Data'[Type] = "Type A",
        'Test Data'[Values] + (CALCULATE(SUM('Test Data'[Values]),'Test Data'[Type] = "Type C") * 'Parameter'[Parameter Value]),

        'Test Data'[Type] = "Type C",
        'Test Data'[Values] - ('Test Data'[Values] * 'Parameter'[Parameter Value]),

        'Test Data'[Values]
    )
)

vyilongmsft_4-1737685113011.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I already tried that DAX, and it only seems to adjust the bars for the Type C as that reduces if the parameter value increases, but Type A doesn't increase with the value of the deduction from Type C. 

Why is this?

PBAEIGuy
Frequent Visitor

The data I have used is a simple excel file that has 3 columns, Business Name, Type and Revenue. 

I use the clustered column chart on PBI with Business Name on the X axis, Type on the legend and the above measure on the y axis. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.