Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • 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

     

    • Anonymous's avatar
      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 

      • parry2k's avatar
        parry2k
        Super User

        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?

  • v-lili6-msft's avatar
    v-lili6-msft
    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