Forum Discussion

Fern_21's avatar
Fern_21
Helper V
1 year ago
Solved

Remove interaction between two visual elements

Hi all! I am using DirectQuery mode and have a revision filter coming from the items table.   On a line chart, the X-axis has the same revision field from items, while the Y-axis has other colum...
  • pankajnamekar25's avatar
    1 year ago

    Hello Fern_21 

     

    try with measure

    Total Sales Ignore Slicer =

    CALCULATE(

        SUM(Items[Sales]),

        REMOVEFILTERS(Items[Revision])

    )

     

    Thanks,
     Pankaj Namekar | LinkedIn

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated

  • v-veshwara-msft's avatar
    1 year ago

    Hi Fern_21  ,

    Thanks for using Microsoft Fabric Community,

    Just checking in to see if your issue has been resolved.

    As mentioned earlier by pankajnamekar25  , using REMOVEFILTERS(Items[Revision]) in your measure is a valid way to prevent the slicer from affecting the line chart:

    Total Sales Ignore Slicer =
    CALCULATE(
    SUM(Items[Sales]),
    REMOVEFILTERS(Items[Revision])
    )

    Alternatively, if you want complete separation between the slicer and the chart (including the X-axis), you can create a disconnected revision table:

    Revisions = DISTINCT(Items[Revision])

    Then use this measure:

    Total Sales Ignore Slicer =
    CALCULATE(
        SUM(Items[Sales]),
        FILTER(
            ALL(Items),
            Items[Revision] = SELECTEDVALUE(Revisions[Revision])
        )
    )


    Use Revisions[Revision] on the X-axis of your line chart. This ensures the slicer will not influence the chart at all.

     

    Let us know if this helps or if you're still facing any issues.

     

    Please consider marking the helpful reply as Accepted Solution to assist others with similar issues.

    Thank you.