Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BratKat
Employee
Employee

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) 
BratKat_0-1681027016150.png

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.

BratKat_1-1681027189332.png
the slider values format is M/D/YYYY in case that may be causing the issue, any suggestions appreciated, thank you. 
 
13 REPLIES 13
BratKat
Employee
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 
NoahLull
Frequent Visitor

@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
Employee
Employee

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

BratKat_0-1681296807266.png

Yes I added the measure to the tooltip for the graph 

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

 

 

Example of column

 

BratKat_1-1681374230678.png

 

 

Hi @BratKat 

Please try to keep the ascending ranking of the [Team Date 01], then create a calculated column

e.g 

Index = COUNTROWS(FILTER('Table',[Team Date 01]<=EARLIER('Table'[Team Date 01])))

vxinruzhumsft_0-1681379012003.png

Then modify the Tooltip measure.

Tooltips = SUM('Table'[Index])
Then put the measure to the tooltip, then select sort by the measure.
 

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.

The MonthWeek item is a measure in my data so does not appear in looking at the data in Transform, tried you method but made it worse. Is there a way I can format the date to appear instead of for example. January Week 1 to appear as 1 Week January so I can sort numerically ? Thank you 

 

Hi  @BratKat 

Modify the Tooltip measure.

Tooltips = COUNTROWS(FILTER(ALLSELECTED('Table'),[Team Date 01]<=SELECTEDVALUE('Table'[Team Date 01])))
 
Then put the measure to the tooltip, then select sort by the measure.

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.

Its possible may be creating the graph wrong. Am using my MonthWeek measure in the Slicer but using the Team Date in the X-Axis. Could that be an issue ? I did try using the Team Date in the Slicer however then I did not have the option of using "between" in the Slicer. 

v-xinruzhu-msft
Community Support
Community Support

Hi @BratKat 

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

vxinruzhumsft_3-1681178632492.png

Then put the  MonthWeek column to the visual

Output

vxinruzhumsft_4-1681178702666.png

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"

vxinruzhumsft_0-1681178122098.png

vxinruzhumsft_1-1681178182743.png

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

Output

vxinruzhumsft_2-1681178270463.png

 

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
Employee
Employee

Additional information:

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

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

BratKat_0-1681291577809.png

Even if I change the sort method, still off. 

BratKat_1-1681291660862.png

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])
 
 

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.

vxinruzhumsft_0-1681292114300.png

 

Best Regards!

Yolo Zhu

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.