cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
berinrichard
New Member

dynamic column selection based on slicer

Hi All,

 

I have a scenario where i need to select column (not measure) based on the slicer. 

Example:

Table1:

I have a table with country and state level sales and profit

 

Capture.PNG 

 

 

 


Table2: 

I will have a slicer where it says 

Country

State

 

Now if i select country in slicer, i need the sales in country level and if i select state in slicer i need sales in state level. 

 

I know this kind of selection is possible with measures as below,

 

Val selection = IF(HASONEVALUE(Table3[Col_selection]), SWITCH(VALUES(Table3[Col_selection]),"Profit",SUM(Table1[Profit]),"Sales",SUM(Table1[Sales])),0)

//Here profit or sales gets selected based on slicer(table3). 

 

I'm looking for something similar, but with columns.  

 

Thanks in Advance,

Berin.

 

4 REPLIES 4
v-yulgu-msft
Microsoft
Microsoft

Hi @berinrichard,

 

You can refer to the solutions provided in below links:

Dynamic Column Based on Slicer Selection

Dynamic column based on slicer selection

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 Thank you for the reply,

 

I have checked these solutions already but couldn't succeed with them. 😞 

 

 

Does any one have a solution for this? For now i have been creating book marks and hiding/showing the table viusals for each slicer selected. But ideally can we do something like in SSRS to hide or show the fields on same table visual based on slicer selection?

 

Thanks

Manoj

Hi Manoj,

I'm in the same boat - hoping to use a Slicer to determine which column to use in a table visual.  As you have, we're also using bookmarks (and buttons for selections) to show/hide visuals.  But we wish to use a slicer so the selection can be sync'd across pages.

Have you come across any solutions?

Thanks,

Greg

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors