Power BI: show the chart until the month selection

With a month filter, when I select the months, my column chart will show the data based on the selection. For instance, to show the first 3 months, I have to select on my slicer: January, February and March but what about if I want to select only March and automatically, I want my chart to display the previous months !!!

I have those 2 tables with no relationship:

Table1 Table2
power bi power bi

I will create a measure with this formula:

IF(MAX('table1'[argument1])<=SELECTEDVALUE('table2'[argument1]),SUM('table1'[argument2]))

power bi

I will create my visuals:

  • My slicer with the month column of the table2
  • My clustered column chart with the month column of the table1 and my measure

For my slicer, I will configure it like that:

power bi

NOTE: in the “style” field, I can also select either as “dropdown” or as “tile”

The result:

power bi

If I select for instance August, automatically, the chart will show all results until the selected month:

power bi

Interesting Topics