Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Selected Value to dynamically change rows in visual

Hello Community,

 

I have a question that I dont even know if its possible to do in Power Bi

 

I have a table with a "group selected field". The requirement is that when you select " Option 1" the matrix shows the count of values by one column and if I select Option 2. The matrix shows the count of same field by another column. Is this even possible to do ?

 

 

Filter Visual:

 

"group selected field" = 1

 

Matrix Visual

 

Row

Option 1 field

 

Value

Count of Value

 

"group selected field" = 2

 

Matrix

 

Row

Option 2 field

 

Value

Count of Value

 

Any help if much appreciated

 

 

 

 

  • Hi,  Anonymous 

    According to your picture, I guess that you want to use Matrix chart to achieve using slicers to filter columns .

    However, if you use Matrix chart. You may need to place both [option 1] and [option 2] into the row field, which leads to ‘Drill down on row headers’ ,like this:

     

    Therefore, I guess that maybe it’s not possible for Matrix chart to achieve this function. 

    If possible, you can create a matrix chart for both [Curve Category] and [Zema Price Type].

     

    Here’s some documents about Martix chart and “Drill down” in power bi, you can take a look:

    https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual

     

    Best Regards,

    Community Support Team _Robert Qin

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

3 Replies

  • v-robertq-msft's avatar
    v-robertq-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    I suggest you to use the card chart to the count of values instead of the Matrix chart, you can follow my steps:

    1. create an auxiliary table ‘Filter’ as below used in the slicer:

     

    2.You can try this measure:

     

    Count of value =
    
    var _selectedvalue=SELECTEDVALUE('Filter'[Group Selected Field])
    
    var _count=
    
    SWITCH(_selectedvalue,
    
    "Option 1",COUNT('Option Field'[Option 1]),
    
    "Option 2",COUNT('Option Field'[Option 2]))
    
    return _count

     

     

    3.Create a card chart and a slicer, and you can get what you want, like this:

     

    If this is not what you want, please reply to me.

     

    Best Regards,

    Community Support Team _Robert Qin

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

  • Anonymous's avatar
    Anonymous
    Not applicable

     

     

    Hi The problem is that I need the visual to display the field types

     

    • v-robertq-msft's avatar
      v-robertq-msft
      Icon for Community Support rankCommunity Support

      Hi,  Anonymous 

      According to your picture, I guess that you want to use Matrix chart to achieve using slicers to filter columns .

      However, if you use Matrix chart. You may need to place both [option 1] and [option 2] into the row field, which leads to ‘Drill down on row headers’ ,like this:

       

      Therefore, I guess that maybe it’s not possible for Matrix chart to achieve this function. 

      If possible, you can create a matrix chart for both [Curve Category] and [Zema Price Type].

       

      Here’s some documents about Martix chart and “Drill down” in power bi, you can take a look:

      https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual

       

      Best Regards,

      Community Support Team _Robert Qin

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