Search code examples
filterchartspowerbimultiple-columnsslicers

PowerBI: How to remove filter on specific column in chart


I'm working with specific columns from a table. I have a "data" column for each month of the year and a "data_last_month" column for December + percentages. I have a chart filtered by slicer (year slicer, quarter slicer - last month of the quarter). I want to filter only the "data" column and "percentages". I dont want to filter the "data_last_month" column. However, I need to keep this column in one chart to see the differences between the month at the end of the quarter and the month at the end of the year. My visualisation

You can see how it looks, but when I click on the quarter slicer (1,2,3), the data_last_month column is removed because it only shows data for December. So how can I simply turn off the slicer for this column?


Solution

  • Sorry to confuse you earlier. I played a little bit, and I found a solution that worked.

    1. I created a true/false column in Calendar table, that is true when month is December:

      IsDecember Flag = IF('Dim Date'[Date].[Month] = "December", TRUE())

    (My dataset has limited date table, you can use other columns like Monthnumber, Monthname,etc.)

    1. Created a measure as follows:

      Amount December = CALCULATE( SUM('Fact Table'[data_last_month]), ALL('Dim Date'[Date].[Month]), ALL('Dim Date'[Date].[Quarter]) , 'Dim Date'[IsDecember Flag] = TRUE())

    2. Added this measure to the visual. I apply a screenshot. You can see I have selected Jan, Feb, Mar in the slicer, however December value remains a constant.

    Click here to see screenshot.

    I hope this helps! I am sure this is a workaround tho. Probably there are much more efficient ways for this to be resolved with only a measure. Until then, you can present this as a solution.