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.
Hi All - In my PowerBI dashboard, I have two visualization tabs. One tab name is Single Period Data, and another tab is Monthly Data. In the single period data tab, I have added a slicer for a date filter with the relationship of all the visuals from the same tab. Now my requirement is based on this selected date from the single period data tab; I wanted to filter the last 5 years of data in the monthly data tab. How do I create relationships from one tab to another?
I think I need to create a DAX query that will see the date selected from other tab slicers and filter the last 5 years records in the current dashboard. Please note the table is the same for the tabs of visualization created using the same table.
Hi @Bansi008
To view the last 5 years of data from the selected date, you’ll need to use a disconnected table. Using a column from a related table will only display data for the selected value. For example, selecting January 2025 will limit the visible rows to January 2025. Although you can modify the filter context through a measure to show values outside the selected range (e.g., the last 5 years), the visible rows will still be restricted to the selected dates. To resolve this, create measures referencing the disconnected table—one for the selected period and another for the last X periods. Place the column from the disconnected table in a slicer and sync it across the two pages.
Note: that my sample has less than two years worth of data so only last 12 months is shown.
Please see the attached pbix.
Hi , Try these steps please
Thank you, but this DAX query is not providing the desired output. I have provided screenshot where 1 appears to be for more than 5 years month-end dates. I have selected the 12/31/2024 date in the main slicer. My expectation is that based on this date, i.e., 12/31/2024 (which is selected from other tab slicer), the DAX query should calculate and flag those month-end records that fall within the last 5 years and rest flag as 0. but this is not happening.
Any amendments if you could suggest?