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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Naseebah-RJH
New Member

use slicer to change between 2 tables with 1 chart

Hello dears..

I have 2 defferint tables with same colume that means - i have 5 citys and deiffernt value- (1 st table i have AVG , 2nd MEAN).

 

So,i want to present this tables on 1 chart 1 slicer with(AVG,MEAN).

 

Is it possible ?or if u have any easy idea?

Naseebah-RJH_0-1616485604132.png

 Thanks .

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

Hi @Naseebah-RJH ,

 

Maybe you can do like this. Please refer to my .pbix file.

let
    Source = Table.NestedJoin(#"Table 1", {"City"}, #"Table 2", {"City"}, "Table 2", JoinKind.Inner),
    #"Expanded Table 2" = Table.ExpandTableColumn(Source, "Table 2", {"City", "Mean"}, {"Table 2.City", "Table 2.Mean"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Table 2",{"Table 2.City"}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"City"}, "Attribute", "Value"),
    #"Sorted Rows" = Table.Sort(#"Unpivoted Columns",{{"Attribute", Order.Ascending}})
in
    #"Sorted Rows"

v-lionel-msft_0-1616648493042.png

 

Best regards,
Lionel Chen

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

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Naseebah-RJH ,

 

Maybe you can do like this. Please refer to my .pbix file.

let
    Source = Table.NestedJoin(#"Table 1", {"City"}, #"Table 2", {"City"}, "Table 2", JoinKind.Inner),
    #"Expanded Table 2" = Table.ExpandTableColumn(Source, "Table 2", {"City", "Mean"}, {"Table 2.City", "Table 2.Mean"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Table 2",{"Table 2.City"}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Removed Columns", {"City"}, "Attribute", "Value"),
    #"Sorted Rows" = Table.Sort(#"Unpivoted Columns",{{"Attribute", Order.Ascending}})
in
    #"Sorted Rows"

v-lionel-msft_0-1616648493042.png

 

Best regards,
Lionel Chen

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

 

amitchandak
Super User
Super User

@Naseebah-RJH , Not very clear. You need to have a common dimension city between these two tables. using that you can plot both of them together https://youtu.be/Bkf35Roman8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank u

My idea i want=> 1 chart with +1 slicer (to navigate between AVG & MEAN) for same cities

                      =>this chart in first time present to me AVG valuse for 5 city.

                      =>then i can change chart from slicer  to present MEAN value for same 5 city.

*I make 2 tables 1 for AVG another for MEAN

Naseebah-RJH_0-1616489533286.png

 I already make 1 chart for MEAN present 3 quarters Value for each city is it possible to make slicer here to change values to be AVG values.

 

Hope it is clear!

Thank u again.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors