I have a main fact table which has a dd mmmm yy Date format, and a full Date table (with hierarchy) which I use as my date filter.
I also have a secondary table which has an unusual date format that I've had to massage into the Period.Formatted column shown. I've added the Month and Year columns using Power Query.
There is a relationship between the two using the Brand column. PBI will only let me use Many-to-many as there are multiple rows per month in the secondary table due to the Confidence and Type columns. Using a slicer on Brand works to filter both tables so that's something.
In this example, the Value column is ignoring the slicer and showing the sum all available data. In this example, I have added a further slicer on the Month column from the secondary table, which then shows the correct value.
How can I get the secondary table to filter correctly based on my original slicer (top-right in screenshots, showing "between" for January)? I feel like it's a relationship issue but if I move the relationship to Date instead, my test measure (Theoretical Income) is showing incorrect figures.
GI from Forecast = CALCULATE(
SUM('GI from Forecast 2020 sheet'[Value]),
'GI from Forecast 2020 sheet'[Year],
'GI from Forecast 2020 sheet'[MonthNumber]
I still have the bridge table for the client name, but the Date bridge didn't work as it created too many filter paths for my setup. However, passing the filter context to the secondary table using Treatas worked... a treat.
@catnapwat Yes. Correct. Let me know if you need assistance creating the bridge table, sometimes to be safe, you want to right click both of your queries and create references. Remove everything but brand column. Append these two columns together using an Append query as new. Remove duplicates. Right-click your two intermediate queries and disable data load.
@Greg_DecklerI used the formula from @amitchandak as my main table has the Friendly Client Name as a calculated column which I couldn't use for the bridge (as it doesn't appear in Power Query), so it ended up being:
Bridge = DISTINCT(UNION(ALL('Timesheet Data'[FriendlyClientName]),all('GI from Forecast 2020 sheet'[Brand])))
This generated the bridge and I've added relationships as 1-to-many from the Bridge to the main and secondary tables with filter direction as Single.
However, the same problem occurs - and I also have all Client names from all time appearing in the slicer, rather than those with data logged in January. Some clients are old (data goes back to 2016) and don't need to appear.
The incorrect Value column is the main issue though.