Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter same dimensions together on chart

Hi all,

 

I have a scenerio like below.

 

I have a 2 filter for same dimension. I want to calculate [Dim2 value - Dim1 Value]  - It is working.
Filtering column chart, this is what I can't do. I want to show only F&D dimensions on chart for this selections.. 
If you want to check here is my pbix
Is there anyone have idea ?

  • Hi Anonymous ,

     

    Create a measure like this

     

    __Measure = 
    CALCULATE(
        SUM('Table'[Measure]),
        FILTER(
            'Table',
            'Table'[Dim] = SELECTEDVALUE(Dim1[Dim]) || 'Table'[Dim] = SELECTEDVALUE(Dim2[Dim])
        )
    )

     

     

    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.

6 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    Create a measure like this

     

    __Measure = 
    CALCULATE(
        SUM('Table'[Measure]),
        FILTER(
            'Table',
            'Table'[Dim] = SELECTEDVALUE(Dim1[Dim]) || 'Table'[Dim] = SELECTEDVALUE(Dim2[Dim])
        )
    )

     

     

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi vanessafvg 
      I don't want to make static selection. I want to do it dynamically

  • HI Anonymous ,

     

    Why are you using DIM1 and DIM2 as filters? You can directly use DIM column from yout table to filter the chart.

    Please detail your requirement.

     

    Thanks,

    Pragati

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Pragati11 
      I want to subtract selected values each other.
      How can I do this if I use only DIM filter.
      In my example F selected in dim 1 and D selected in dim 2 then F value 50 D value 30 50-30 = 20. That is the point which i want to reach