Forum Discussion

tolgalogy's avatar
tolgalogy
Frequent Visitor
2 years ago
Solved

Dynamic table for custom date periods

  The core fact table in my data model is the 'Date' table. I would like to add a slicer that includes custom date periods such as YTD, current month, previous month, today, yesterday, etc., to the ...
  • lbendlin's avatar
    lbendlin
    2 years ago

    Your "Date Period Filter"  table is a calculated table. It has no idea what you mean by SELECTEDVALUE, and thus is ineffective.  No need to have it in your data model at all.  Use measures to grab the selected value of the Date Period options and then dynamically apply that filter to the results.

     

    Your "Date Period"  table would only work if you use Import mode and refresh your semantic model daily.  Otherwise "TODAY()"  becomes meaningless.

     

    Your main table visual needs to source the date from the Calendar dimension, not from the Sales fact.  You will also want to normalize  the country, region and item dimensions out of the fact table.