Forum Discussion

WillEyedowin's avatar
WillEyedowin
Frequent Visitor
7 years ago
Solved

WEEKNUM Relative Date Filtering

Hello All,

 

I would like to filter my entire report to include all dates(weeknum's) up until the week before current.

 

E.g. I want my report to include WEEKNUMS 1 through 45 but not week 46 if that was our current week.

 

I have various graphs which need to report what has sold versus what has been dispatched for the weeks prior to this week.

 

The reason for weeks is that is the best way to group the data.

 

Information which may be helpful:

The sold table's Sold Date includes the latest date(& weeknum) which should be used in the report.

 

Ideally would like it to not be hardcoded and would filter the whole report based on the latest date which something sold.

 

Or just based on the NOW() time and go back one week as the report will only be relevant for that week until new data is imported.

 

This is only my second post here so please let me know if you need any more information to help me out.

 

Thank you :smileyhappy:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For example - I would like this to exclude those last 100%'s by only using the weeknum with sales data

 

 

  • Ashish_Mathur's avatar
    Ashish_Mathur
    7 years ago

    Hi,

     

    Does this measure work?

     

    Measure = if(ISBLANK(SUM(sold[Quantity Sold])),BLANK(),1-DIVIDE(SUMX(RELATEDTABLE('sold'),[Quantity Sold]),SUMX(RELATEDTABLE('Dispatched'),[Quantity Delivered]),0))

11 Replies

    • WillEyedowin's avatar
      WillEyedowin
      Frequent Visitor

      Hi,

       

      Appreciate the offer - However, unfortunately, there is some sensitive data in the report.

       

      Is there an easy way to anonymize/de-sensitize or limit your access to this data?

       

      Further, how would you recommend I upload the file for you to download it? 

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

         

        Create a dummy dataset and upload the file to Google Drive or any such similar service.  Share the download link.