Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello, in my PowerBi file, I have four slicers (two for previous month as text and two for current month as text). Two of the slicers (1 current and 1 previous) come from the same month column in my main table. These slicer run multiple visuals on my page with collaboration of editing interactions so only the current month's slicer affects the current month visuals. The other two slicers each come from two separate disconnected tables. They run one visual that uses two different slicers to plot on the same chart. I would like to figure out how to connect these items so I can have one slicer for current month and one slicer for previous month. I tried making relationships and creating helper table that only filter in one direction, but this usually messes up my chart, and won't allow you to plot both current and previous month, only one or the other. What is the best approach to take on this?
SlicerTablePrevious
Month |
JAN |
FEB |
MAR |
APR |
SlicerTableCurrent
Month |
JAN |
FEB |
MAR |
APR |
MainTable
Month |
JAN |
JAN |
JAN |
JAN |
FEB |
FEB |
FEB |
FEB |
FEB |
MAR |
MAR |
MAR |
MAR |
MAR |
APR |
APR |
APR |
APR |
APR |
Solved! Go to Solution.
Thank you parry2k , I have the following additions:
Hi, @char23
According to your description, you have two separate slicers, and the fields of the slicers are from two tables. You want both slicers to draw their own curves or bar charts in the same visual object at the same time.
In this case, you need to create two measures for this visual object, and use the fields of these two slicers to filter data and then calculate the results. These two slicers do not need to establish a relationship with your main table.
Below, I demonstrate based on the sample data provided by Power BI:
First, I created two calculated tables using the following DAX expressions:
SlicerTableCurrent = VALUES(financials[Month Name])
SlicerTablePrevious = VALUES(financials[Month Name])
Create a slicer using the fields of these two calculated tables:
Use the following DAX expressions to create two measures:
CurrentMeasure =
CALCULATE (
SUM ( financials[ Sales] ),
FILTER (
'financials',
'financials'[Month Name] IN VALUES ( SlicerTableCurrent[Month Name] )
)
)
PreviousMeasure = CALCULATE (
SUM ( financials[ Sales] ),
FILTER (
'financials',
'financials'[Month Name] IN VALUES ( 'SlicerTablePrevious'[Month Name] )
)
)
In the visual object, use the fields of the main table as the X-axis and the two measure values as the Y-axis:
When I change the current slicer, the curve corresponding to the previous slicer does not change:
Basically, you need to modify the external context and filter you need to calculate according to your actual needs by using measures and utilizing the calculate engine. In this way, your corresponding slicer can draw the corresponding chart.
I have included the PBIX file used for this tutorial below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you parry2k , I have the following additions:
Hi, @char23
According to your description, you have two separate slicers, and the fields of the slicers are from two tables. You want both slicers to draw their own curves or bar charts in the same visual object at the same time.
In this case, you need to create two measures for this visual object, and use the fields of these two slicers to filter data and then calculate the results. These two slicers do not need to establish a relationship with your main table.
Below, I demonstrate based on the sample data provided by Power BI:
First, I created two calculated tables using the following DAX expressions:
SlicerTableCurrent = VALUES(financials[Month Name])
SlicerTablePrevious = VALUES(financials[Month Name])
Create a slicer using the fields of these two calculated tables:
Use the following DAX expressions to create two measures:
CurrentMeasure =
CALCULATE (
SUM ( financials[ Sales] ),
FILTER (
'financials',
'financials'[Month Name] IN VALUES ( SlicerTableCurrent[Month Name] )
)
)
PreviousMeasure = CALCULATE (
SUM ( financials[ Sales] ),
FILTER (
'financials',
'financials'[Month Name] IN VALUES ( 'SlicerTablePrevious'[Month Name] )
)
)
In the visual object, use the fields of the main table as the X-axis and the two measure values as the Y-axis:
When I change the current slicer, the curve corresponding to the previous slicer does not change:
Basically, you need to modify the external context and filter you need to calculate according to your actual needs by using measures and utilizing the calculate engine. In this way, your corresponding slicer can draw the corresponding chart.
I have included the PBIX file used for this tutorial below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your response! So I already had disconnected tables and a working column chart that uses those two tables. My problem is that I was trying to connect those slicers/tables to my main table because I have other visuals on the same sheet that use the main table, but I want all visuals to work on just two slicers.
@char23 could you please provide a bit more details on what output you are looking for?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
97 | |
73 | |
69 | |
43 | |
23 |