Forum Discussion

MiguelSaldana77's avatar
MiguelSaldana77
Resolver I
9 years ago

Timeline slicer Problems

I have Problems with the Visual "Timeline"  when I select a specific week, this display the next week.

This is the first problem, but I need to show in a table something like the next image.  This table show begining ballance Monthly  and I need the same but Weekly.

 

 

The formula for Saldo Inicial is :

 

Saldo Inicial = CALCULATE (  SUM('Indicadores Bancos'[Total_Bancos]),
    FILTER(ALL('Indicadores Bancos'[Fecha].[Date]),DATEADD('Indicadores Bancos'[Fecha].[Date],1,MONTH) <= MAX ('Indicadores Bancos'[fecha].[Date])))  

 

This formula is working Ok , but I try to do the same with the week an It doesn't work. Other question,  what is beter work with the timeline visual or a HierarchySlicer about the week period.

 

Thanks

  

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Its likely to do with how each component is calculating what a Week is.  So to make sure you are comparing Apples to Apples, check how you are getting the weeknumber in the matrix/table.  Also check your timeline slicers options and see what you have set under "First Day of Week".  Something as simple as having Sunday being the first day here, but Monday in the other one could change the outcome of what is classed as "Week 1".

    • MiguelSaldana77's avatar
      MiguelSaldana77
      Resolver I

      This is the formula

       

      Semana-Año = CONCATENATE( CONCATENATE(YEAR('Indicadores Bancos'[Fecha].[Date]),"-"),
                     IF(WEEKNUM('Indicadores Bancos'[Fecha].[Date])<10
                          ,CONCATENATE("0",WEEKNUM('Indicadores Bancos'[Fecha].[Date]))
                          ,WEEKNUM('Indicadores Bancos'[Fecha].[Date])))

       

      I had to concatenate a cero when a week is lower than 10,  in order to sort the weeks

      • Anonymous's avatar
        Anonymous
        Not applicable

        Ok i've cleaned up your formula, this should do the exact same thing as your longer one:

        Semana-Año = YEAR('Indicadores Bancos'[Fecha].[Date]) & "-" & FORMAT(WEEKNUM('Indicadores Bancos'[Fecha].[Date], 1), "00")

        I've explicitly stated to start your WEEKNUM calculation where the Week begins on Sunday.  if you change the ", 1" to a ", 2" in the WEEKNUM formula, you can change this to Monday if you like.

         

        Now just check your setting for your Timeline Slicer, click on it and check in the Format section (looks like a paint roller).  There is a section called "First Day of the Week"

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi MiguelSaldana77,

     

    How did you generate the week number in your scenario? Did it match the calendar week number?

     

    There is a known issue with the old version of TimeLine slicer that it always display the first day of the next period. So, please remove the existing timeline slicer and import the latest version from Office store for a test.

     

    Regards,
    Yuliana Gu