Forum Discussion
help with arranging trading weeks continuously instead of categorically
- 5 years ago
cmckernan93 you have to use sort by column to sort this column so that it is in the correct order. Check sort by column documentation here
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Hi cmckernan93 ,
According to my understanding, since there is no data between the 3rd week and the 50th week, for the sake of beauty, you want to arrange the 1st &2rd weeks after the 50th week on the X-axis,right?
You could use the following formula to add a Rank column and apply it to Tooltip pane ,then set the X-axis type as Categorical and sort the visual by Rank ascending:
Rank =
IF (
[Value] <> 0,
RANKX (
SUMMARIZE (
FILTER ( 'Date', 'Date'[Value] <> 0 ),
[Date],
'Date'[Week],
[Value]
),
[Week],
,
DESC,
DENSE
),
0
)
Please take a look at the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous thanks, yes it has to look like that to allow continuous analysis
i have added a rank column to my data like below,
but when i added the rank to the tooltips area it was right only weeks 39,42 and 43 where in the wrong ara and bunched together, all other weeks were correct