Forum Discussion

stribor45's avatar
stribor45
Icon for Post Prodigy rankPost Prodigy
3 years ago

Showing Data Based on weeks, months

I was wondering what is the best way to work out showing data based on weeks and months. So for example, if the user selects dates between date A and date B but wants to see the data grouped by month but also has an option to see the data grouped by weeks.

 

Thanks

 

6 Replies

    • stribor45's avatar
      stribor45
      Icon for Post Prodigy rankPost Prodigy

      This looks like a great solution for me but it doesn't have step-by-step instructions on how to accomplish this. I was able to manage plugging in my own data but was hoping to have step by step for better understanding

    • stribor45's avatar
      stribor45
      Icon for Post Prodigy rankPost Prodigy

      I was able to make some progress so I will post here once when I am done. 

    • stribor45's avatar
      stribor45
      Icon for Post Prodigy rankPost Prodigy

      How is the Calendar table and Sales tables one to many relationship when in each table there is only one date? 

  • mlsx4's avatar
    mlsx4
    Icon for Memorable Member rankMemorable Member

    If you use a matrix you can go deeper or not as you need:

    For instance, here you can see Month and day, but you can keep it closed with +/- buttons.

     

  • I watched tutorial video  Slicer  about this and I am very confused about DATESMTD function. In the video, he has a slicer with "YTD", "MTD" and so on. He is using the measure to find whether the dates in the table contain dates that are in the current month.  How does this line of code know (true/false) dates that are in the current month?

     

    dim_Date is the custom table for the dates, weeks etc

    New Date table is the table that contains unique values from dim_Date table

     

    VAR _mtd = MAX(dim_Date[Date]) in DATESMTD('New date'[Date])

     Any help would be much appreciated