Forum Discussion
Different behaviour with Table and Slicer Visuals
- 5 years ago
Just out of curiosity, is there a reason you don't have a relationship between the Date Table and the D_seller table and have a separate Dimension table for D_Seller? (to avoid a potential relationship conflict). Something like this:
Hi D4imi0n ,
Would you mind providing a sample .pbix file?
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- D4imi0n5 years ago
Helper I
Hi Chen,
thanks for the reply. I try to append a sample pbix.
Cheers Jeffrey
- D4imi0n5 years ago
Helper I
Hi Chen,
sry for the delay. I was able to rebuild the problem with a import model.
If you start the sample you will see two tables.
Please change the tables to Slicers to see the problem.
Hopefully you can download the sample.
Thanks
- PaulDBrown5 years ago
Community Champion
You cannot create hierarchies from tables which are not directly related. A solution to including the Geography Table is to place two slicers in the page: one for year and one for country (from your geography table.
Here is an example using a sample dataset. First the model:
To avoid having to make the direction of the relationships between the fact table and the dim tables "Both", create two measures to filter the other slicer based on what is selected in the slicer:
1) To filter the year based on the selection made in the country slicer:
Filtered Year = VAR FilteredYears = CALCULATETABLE ( VALUES ( 'Dim Year'[Year] ), RELATEDTABLE ( FactTable ) ) RETURN COUNTROWS ( FilteredYears )2) To filter the country based on the year selected:
Filtered Country = VAR FilteredCOuntries = CALCULATETABLE ( VALUES ( 'Dim Country'[Country] ), RELATEDTABLE ( FactTable ) ) RETURN COUNTROWS ( FilteredCOuntries )Add each measures to the "filters on this visual" in the filter pane to the corresponding slicer:
and you will get this: