Forum Discussion

BratKat's avatar
BratKat
Icon for Microsoft Employee rankMicrosoft Employee
3 years ago

Weekly data and slicer

Have a graph that uses a Slicer (using between) and a measure to get each week per a column of the dates we reference. 

MonthWeek = 'Work Items'[Team Date 01].[Month] & " Week " & WEEKNUM('Work Items'[Team Date 01])add 
Works to grab data by week and moving the slider adds or subtracts weeks fron the graph, however once you move to another month, the weeks are out of order and haven't found a way to keep it correctly in the measure or graph. '
 
For example displaying January data the weeks are correct (sorted ascending) 

If you move the slider to another month the weeks become out of order, even if you resort the axis it may not correct the issue.

the slider values format is M/D/YYYY in case that may be causing the issue, any suggestions appreciated, thank you. 
 

13 Replies

  • BratKat's avatar
    BratKat
    Icon for Microsoft Employee rankMicrosoft Employee

    Additional information:

    The Team Date is from AzDo Work Items as the date of the task per item. 

    • BratKat's avatar
      BratKat
      Icon for Microsoft Employee rankMicrosoft Employee

      Thank you, I tried this however it didn't resolve - 

      Even if I change the sort method, still off. 

      Measure created = 

      Tooltip = SUM('Work Items'[Team Date 01])
      Using this measure in prevous screenshots to sort by weeks 
      MonthWeek = 'Work Items'[Team Date 01].[Month] & " Week " & WEEKNUM('Work Items'[Team Date 01])
       
       
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi BratKat 

        Did you put the measure to the tooltip, and you can try the first method  I have offered, after testing, it can be work.

         

        Best Regards!

        Yolo Zhu

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BratKat 

    1.Click the MonthWeek column, then select sort by [Team Date 01] column

    Then put the  MonthWeek column to the visual

    Output

    2.You can create a measure

    e.g 

     

    Tooltip=SUM('Work Items'[Team Date 01])

     

    Then put it to the tooltips, and select "..." of the visual and select sort by "Tooltips" and "ascending"

    Then, no matter how you filter the slicer, it can appear in increasing order.

    Output

     

    Best Regards!

    Yolo Zhu

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

     

     

  • BratKat's avatar
    BratKat
    Icon for Microsoft Employee rankMicrosoft Employee

    Tried the first method (Click the MonthWeek column, then select sort by [Team Date 01] column) and recieved this message 

    Yes I added the measure to the tooltip for the graph 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi BratKat 

      Can you show me some sample data of the [Team Date 01] column? Because the two ways can work on my pbix file.

       

      Best Regards!

      Yolo Zhu

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    BratKat, changing your analysis to the week of the year would give you better results as week of month analysis is fundamentally flawed for comparable analysis.

     

    If you are slicing by month & week, you will get strange and incomparable results in your visualizations.  I would suggest not going about it this way. For example, if the first or last week of the month had anything other than 7 days in them (which they always do), then they would not be comparable to anything and would give misleading results.

     

     

     

     

  • BratKat's avatar
    BratKat
    Icon for Microsoft Employee rankMicrosoft Employee

    MonthWeek column does not appear in Transform Data, unfortunately cannot share my pbix file as it is proprietary as it is FED data. Is there a way to rewrite my current column 

    MonthWeek = 'Work Items'[Team Date 01].[Month] & " Week " & WEEKNUM('Work Items'[Team Date 01])
    per Noah's suggestion ? Thank you