Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Bansi008
Helper III
Helper III

How create relationship from one tab to other,

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. 

4 REPLIES 4
Bansi008
Helper III
Helper III

Bansi008_0-1738054988436.png

 

danextian
Super User
Super User

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.

danextian_0-1737976769794.png

danextian_2-1737976888503.png

Note: that my sample has less than two years worth of data so only last 12 months is shown.

Please see the attached pbix.

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Akash_Varuna
Super User
Super User

Hi , Try these steps please

  • Enable Sync Slicers from the View tab and sync the date slicer between both tabs.
  • Create a DAX measure for the last 5 years based on selected date 
    FilteredDate =
    VAR SelectedDate = MAX('Table'[Date]) -- Date selected in the slicer
    RETURN
    IF (
    'Table'[Date] >= DATE(YEAR(SelectedDate) - 5, MONTH(SelectedDate), DAY(SelectedDate)) &&
    'Table'[Date] <= SelectedDate,
    1,
    0
    )
  • Apply FilteredDate = 1 as a visual filter on the Monthly Data tab visuals.
    If this helps please do give a kudos and accept this as a solution
    Thanks in Advance

 

 
 

 

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?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors