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
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
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.