Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I would like to build a stacked column chart and use a slicer to control the range of the x-axis without changing the value of the axis. (Just like changing the minumum and maximum number in Format - X-axis, but with a slicer).
For example, the chart shows the cumulative amount of products sold since year 2005. (The data source is additional products sold each year, so I used a running total measure to let the chart display the cumulative amount of products.)
2005:5,
2006:14 (9 products sold in year 2006, so a total of 5+9=14 products are sold)
2007: 21
2008:23.....
when slicer is: year : 2005 - 2023, the chart should have 19 columns ( 2005 : 5, 2006 : 14, 2007 : 21, 2008 : 23,..., 2023 : 900)
when slicer is: year : 2007 - 2023, the chart should have 17 columns ( 2007 : 21, 2008 : 23,..., 2023 : 900).
I have tried to use a slicer directly, but this when slicer is year: 2007 - 2023, the chart gives me ( 2007 : 7, 2008 : 9,..., 2023 : 886), which is not what I want.
Thanks in advance for your help!
Solved! Go to Solution.
Hi @Anonymous ,
How are you calculating the running total value it seems to me that you are using the values only for the selected period making the values to restart when you select each of the values.
You need to have a measure similar to this one:
Running sum = CALCULATE(SUM('Table'[Sold]), 'Table'[Year] <= MAX('Table'[Year]))
Has you can see in the image below the values that are filtered continue to have the cumulative amounts.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
How are you calculating the running total value it seems to me that you are using the values only for the selected period making the values to restart when you select each of the values.
You need to have a measure similar to this one:
Running sum = CALCULATE(SUM('Table'[Sold]), 'Table'[Year] <= MAX('Table'[Year]))
Has you can see in the image below the values that are filtered continue to have the cumulative amounts.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix ,
Thanks for your help! I modified my measure according to the example you gave, and it works for me right now!
Your quick response really helped me a lot! Thanks again!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.