Forum Discussion

ncielek's avatar
ncielek
New Member
4 years ago
Solved

Dynamicly change numbers based on date

Hello,

 

I am trying to update the count based on where the date slider is positioned. 

 

Additionally, we need to calculate the count based on how many weeks until the desired date.

So, we would need to calculate weeks left based on where the slider is positioned

 

For example, the count starts off as 320. 

I would like a slicer to change the count based on how many weeks are left and give a breakdown week by week.

 

 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi ncielek,

     

    You could create a calendar table and then get the week numbers. Add a relationship to the main table and non-repeatedly count weeknumbers.

     

    Calendar = ADDCOLUMNS(CALENDAR(DATE(2019,1,1),DATE(2022,12,31)),"WN",YEAR([Date])*100+WEEKNUM([Date],2))

     

    Count = DISTINCTCOUNT('Calendar'[WN])

     

    If you're still confused, please Please share some dummy data, and the expected results.

     

    Best Regards,

    Stephen Tao

     

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

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ncielek,

     

    You could create a calendar table and then get the week numbers. Add a relationship to the main table and non-repeatedly count weeknumbers.

     

    Calendar = ADDCOLUMNS(CALENDAR(DATE(2019,1,1),DATE(2022,12,31)),"WN",YEAR([Date])*100+WEEKNUM([Date],2))

     

    Count = DISTINCTCOUNT('Calendar'[WN])

     

    If you're still confused, please Please share some dummy data, and the expected results.

     

    Best Regards,

    Stephen Tao

     

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