In Power BI, you can apply a date slicer's selection to filter an unrelated table without explicitly establishing relationships by simulating the impact of a relationship between the slicer and the unrelated table using DAX measures and TREATAS.
Steps: Use TREATAS to create a DAX Measure that applies the slicer's context to the unrelated table.
For instance:
Filtered Measure =
CALCULATE(
SUM('UnrelatedTable'[Value]),
TREATAS(VALUES('DateTable'[Date]), 'UnrelatedTable'[Date])
)
This example uses the TREATAS function to "simulate" a relationship between the unrelated table (UnrelatedTable[Date]) and the date column in the slicer (DateTable[Date]), filtering the unrelated table using the slicer's context.
To the visual, add the measure:
Any visual connected to the irrelevant table should use the measure. The date selection will now determine how the slicer affects this image.
Make sure the slicer is linked correctly:
The DateTable or any other date-related column should serve as the foundation for the slicer. Applying the slicer's context to the unrelated table is handled by the TREATAS function.