Forum Discussion
Last 8 weeks - In order
- 8 years ago
Hi rg72,
Rfranca is correct, this is far easier with a date dimension however using your customised field of "dd/MM" will be problematic as you cannot gurantee that that combination is unique for that week over several years which is typically what you get in a date dimension. For example 26/12-01/01 occurs in 2011 and 2016.
If you are using just a small amount of data not spanning more than a few years you won't get this problem however. Using the last 90 days of my date dimesnion I created a "dummy" dimension table using your format so that it's order correctly.
Create StartDateOfWeek and Custom.2 columns in your original table.
Copy that table as a new table and group the new table as so.
Then join the new table and original table together on start date of week
Then sort your custom column in the new table.
Then you can use the custom2 field as your axis
And it will ordered correctly.
I am not a big fan of date formats like that and I would much prefer to see a date as the start of week in "yyyy-MM-dd" format.
Thanks all.
I must admit to be getting confused by calendar tables etc - as mentioned I'm pulling directly from Service Now, so only have a single table of data in the background.
Rfranca- Thanks for the offer. I have dropped you a PM.
gooranga1- Thanks for the suggestion. I did try this, and may return to it if I can't get any of the others to work.
vanessafvg- I'm much more of a dummy than that :D Again with modelling, I only have 1 table, so I guess this is where my problem is.
rg72 agree calendar table is the way to go, just depends on how much effort you want to put in.
- rg728 years agoFrequent Visitor
No problem with effort :)
- vanessafvg8 years agoCommunity Champion
rg72 so have you got it sorted then?
- rg728 years agoFrequent Visitor
I'm still working my way through the above instructions - I'm a PowerBI novice, so it's taking time :)