cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HabibAdil
Helper IV
Helper IV

Linking Multiple Different Bar Charts to Different Selections in filter

Hi Everyone,

 

Can someone please help how to achieve the following?

 

I am trying to compare two planning/scheduling scenarios side by side to see which scenario is better. I have a filter from which I can select multiple/two scenarios.

Thanks in advance!!!Schedule Comparison.png

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @HabibAdil ,

 

Due to I don't know your data model, here I will show you two workarounds to achieve your goal.

1. If your calculation logic could be producting Constants from Fact table with Constants from Scenario table, you can try this way.

RicoZhou_0-1667971639930.png

RicoZhou_1-1667971650042.png

Measure = 
VAR _CONSTANT1 = CALCULATE(SUM(Scenario[Value]),FILTER(Scenario,Scenario[Scenario] = MIN(Scenario[Scenario])))
VAR _CONSTANT2 = CALCULATE(SUM(Sample1[Constants]))
RETURN
_CONSTANT1 * _CONSTANT2
Measure2 = 
VAR _CONSTANT1 = CALCULATE(SUM(Scenario[Value]),FILTER(Scenario,Scenario[Scenario] = MAX(Scenario[Scenario])))
VAR _CONSTANT2 = CALCULATE(SUM(Sample1[Constants]))
RETURN
_CONSTANT1 * _CONSTANT2

Result is as below.

RicoZhou_2-1667971868905.png

2. You can create a Fact table with all data from each Scenario.

RicoZhou_3-1667972104261.png

RicoZhou_4-1667972113562.png

RicoZhou_5-1667972134991.png

Measure 2 = CALCULATE(SUM(Sample2[Value]),FILTER(Sample2,Sample2[Scenario] = MIN(Scenario[Scenario])))
Measure 3 = CALCULATE(SUM(Sample2[Value]),FILTER(Sample2,Sample2[Scenario] = MAX(Scenario[Scenario])))

Result is as below.

RicoZhou_6-1667972152372.png

 

Best Regards,
Rico Zhou

 

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

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @HabibAdil ,

 

Due to I don't know your data model, here I will show you two workarounds to achieve your goal.

1. If your calculation logic could be producting Constants from Fact table with Constants from Scenario table, you can try this way.

RicoZhou_0-1667971639930.png

RicoZhou_1-1667971650042.png

Measure = 
VAR _CONSTANT1 = CALCULATE(SUM(Scenario[Value]),FILTER(Scenario,Scenario[Scenario] = MIN(Scenario[Scenario])))
VAR _CONSTANT2 = CALCULATE(SUM(Sample1[Constants]))
RETURN
_CONSTANT1 * _CONSTANT2
Measure2 = 
VAR _CONSTANT1 = CALCULATE(SUM(Scenario[Value]),FILTER(Scenario,Scenario[Scenario] = MAX(Scenario[Scenario])))
VAR _CONSTANT2 = CALCULATE(SUM(Sample1[Constants]))
RETURN
_CONSTANT1 * _CONSTANT2

Result is as below.

RicoZhou_2-1667971868905.png

2. You can create a Fact table with all data from each Scenario.

RicoZhou_3-1667972104261.png

RicoZhou_4-1667972113562.png

RicoZhou_5-1667972134991.png

Measure 2 = CALCULATE(SUM(Sample2[Value]),FILTER(Sample2,Sample2[Scenario] = MIN(Scenario[Scenario])))
Measure 3 = CALCULATE(SUM(Sample2[Value]),FILTER(Sample2,Sample2[Scenario] = MAX(Scenario[Scenario])))

Result is as below.

RicoZhou_6-1667972152372.png

 

Best Regards,
Rico Zhou

 

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

 

Thank you so much, the 2nd suggestion worked!!!!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors