Forum Discussion

bob57's avatar
bob57
Helper IV
5 years ago
Solved

Date filter does not propagate through data model.

I find myself once again leaning on this community, for which I am grateful.

The "Weekly Status" table (shown below) performs as expected, when I select a week start date from the Date filter, but the date filter is not propagating through the model and has no affect on the "Details" table. I need the "Details" table to show entries for only the week selected by the Date filter. The data model appears below the tables.There seems to be no relationship between 'Weekly Status'[Week Starting] and the "Dates" table. Here is a link to the .pbix: https://1drv.ms/u/s!Agkx6hQs0NiX2yFJoBn23MoOEibS?e=xwSnZM. I hope I have provided adequate information for your understanding.

Thank you,

Bob

 

 

  • Hi bob57 ,

     

    As there are 2 many-1 relationships between table Project,Time sheets and Dates,it is difficult to identify the relationships among the 3 tables:

     

    That is why when you filter data among the 3 tables,you see nothing changed.

    You need to create a measure as below:

    _log date = 
    var _table=CALCULATETABLE(VALUES(Dates[Date]),FILTER(ALL('Dates'),'Dates'[Week Start Date]=SELECTEDVALUE('Weekly Status'[Week Starting])))
    Return
    IF(MAX('Time Sheets'[Logged Date]) in _table,MAX('Time Sheets'[Logged Date]),BLANK())

    Finally you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

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

3 Replies

  • This did not appear in the original post. Sorry.

    • v-kelly-msft's avatar
      v-kelly-msft
      Community Support

      Hi bob57 ,

       

      As there are 2 many-1 relationships between table Project,Time sheets and Dates,it is difficult to identify the relationships among the 3 tables:

       

      That is why when you filter data among the 3 tables,you see nothing changed.

      You need to create a measure as below:

      _log date = 
      var _table=CALCULATETABLE(VALUES(Dates[Date]),FILTER(ALL('Dates'),'Dates'[Week Start Date]=SELECTEDVALUE('Weekly Status'[Week Starting])))
      Return
      IF(MAX('Time Sheets'[Logged Date]) in _table,MAX('Time Sheets'[Logged Date]),BLANK())

      Finally you will see:

      For the related .pbix file,pls see attached.

       

      Best Regards,
      Kelly

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

      • bob57's avatar
        bob57
        Helper IV

        Kelly,

        This worked for me and I learned something new about relationships. Thank you for your time and effort.

        Bob