The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello, in my PowerBi file, I have two slicers where the user can select a current month and previous month. Each slicer is built from two separate disconnected tables. These two slicers pair with measures to create one column chart visual on my page. The tables must be disconnected to create the visual properly.
I have two additional slicers on that same page. One additional slicer to select the current month and another slicer to select the previous month. These two slicers are built from one column in my main table with month data as text. These slicers run other visuals on the same page.
I would like to figure out how to connect these slicers so I can have only one slicer for current month and one slicer for previous month. I tried making relationships and creating helper tables 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?
Disconnected Tables:
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.
Hi! Is there a reason you are using two separate tables instead of just having two measures? Like, if you have a measure for Sales and a measure for Sales PM then when a user filters to whatever month the Sales measure will show that amount and the prior month measure will show the amount for the month prior to the one the user selected.
For example, I have a measure for order qty and order qty ly. In my visual I have both of these measures added and then I am filtering to FY2020. So, this shows 2020 and 2019 in the chart:
Proud to be a Super User! | |
Hi @char23 ,
If you want to filter table B using table A without relationship, please try selectedValue and filter functions.
Measure =
CALCULATE (
SUM(TableB[ValueColumn]),
FILTER (
TableB,
TableB[Month] = SELECTEDVALUE(TableA[Month])
)
)
Best Regards,
Wearsky
Hi @char23 ,
If you want to filter table B using table A without relationship, please try selectedValue and filter functions.
Measure =
CALCULATE (
SUM(TableB[ValueColumn]),
FILTER (
TableB,
TableB[Month] = SELECTEDVALUE(TableA[Month])
)
)
Best Regards,
Wearsky
Hi! Is there a reason you are using two separate tables instead of just having two measures? Like, if you have a measure for Sales and a measure for Sales PM then when a user filters to whatever month the Sales measure will show that amount and the prior month measure will show the amount for the month prior to the one the user selected.
For example, I have a measure for order qty and order qty ly. In my visual I have both of these measures added and then I am filtering to FY2020. So, this shows 2020 and 2019 in the chart:
Proud to be a Super User! | |