Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Tables not filtering correctly the data

Hey all, I`m having a issue. I got a table that has 3 different dates (Start, Disconnected and Created) I created a Date table with a active relationship with Created Date and inactive with Start a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous

     

    Your issue arises from the fact that Power BI, by default, filters based on the active relationship in your data model. Since your active relationship is with the 'Created Date', filtering by date in your report will primarily affect visuals that are related to this date. However, for visuals related to 'Start Date' and 'Disconnected Date', you need to use DAX to leverage the inactive relationships.

     

    The USERELATIONSHIP function in your DAX queries is correctly used to activate these inactive relationships for specific calculations. However, if you want your visuals to respond to date filters based on these inactive relationships, you need to modify your approach slightly.

     

    Please try the following:

     

    Create Separate Measures for Each Relationship:You've already done this with your Sales Made and Total Disconnect measures.

     

    When you select dates, use a slicer or the filter pane on your report page. This will allow you to control which visuals are affected by the date selection.

     

    Edit Interaction Between Slicer and Visuals:

    For each visual, you can control how it interacts with the slicers on your page.

    Click on your date slicer, then click on the visual you want to modify.

    Go to the "Format" tab in the Visualizations pane, then under "Edit Interactions," choose how the slicer affects the visual. You can opt to have the slicer not affect certain visuals if needed.

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.