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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Dynamic column value based on slicer selection

Hi,

 

Have searched the previous posts on Dynamic selected, but cannot find solution to my scenario.

Below are the tables I have.

 

Table: Material Type
 
Mat Type Key
Mat Type Text
AAAA
BBBB
CCCC

 

Table: Material      
Material KeyMaterial TextMat TypeHier L1Hier L2Hier L3Material Group
M1 AH11H21H31MG1
M2 AH12H22H32MG3
M3 BH13H23H33MG3
M4 CH14H24H34MG4
M5 CH14H25H25MG4

 

Fact table: Stock 
Material KeyStock 
M1100
M2200
M3300
M4400
M5500

 

In the datamodel, below are the relationships:

Stock.MaterialKey = Material.MaterialKey (many to 1)

Material.Mat Type = Mat Type.Mat Type Key (many to 1)

 

In the report, I have slicer on Mat Type.Mat Type Key. Based on what is selected, I need to show Stock either by Hier L1 or Hier L2 or Material Group.

 

Slicer on Mat Type
A B C


When A is selected, I need to show Stock by Hier L1
Type Stock
H11 100
H12 200

When B is selected, I need to show Stock by Hier L2
Type Stock
H23 300


When C is selected, I need to show Stock by Material Group
Type Stock
MG4 900

 

Please help how to achieve this.

 

Regards.

 

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

HI  @Anonymous 

When A is selected, I need to show Stock by Hier L1
Type Stock
H11 100
H12 200

Why it shows Hier L1 but not Hier L2 or Hier L3 or Material Group?

 

When B is selected, I need to show Stock by Hier L2
Type Stock
H23 300

Why it shows Hier L2 but not Hier L1 or Hier L3 or Material Group?

 

When C is selected, I need to show Stock by Material Group
Type Stock
MG4 900

Why you need it show Material Group but not Hier L1 or Hier L2 or Hier L3?

 

What is the logic/rules for it?

 

Regards,

Lin

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

@Anonymous great explanation but it is not clear by selecting mat key why different Hier will show up, like in this case, what is the logic to show stock by Hier L2?

 

When B is selected, I need to show Stock by Hier L2
Type Stock
H23 300

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks @parry2k. That is my business requirement. The report should show different column values based on what is selected. Are you able to help how do I achieve this?

 

When B is selected, I need to show Stock by Hier L2
Type Stock
H23 300 

@Anonymous ok, so you will never see stock for mat type B by any other Hier. Are these fixed business rule or it is dynamic?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks for the reply @parry2k . 

Correct these are fixed rules. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.