Forum Discussion
How to sort Month in Dynamic Change Axis ? Sorting Month name
- 8 years ago
Thanks a lot for helping me but For Dynamic change Axis Month to QTR / QTR to Month switch with sorting by Month name I have wrote below dax query:
DimTable =
ADDCOLUMNS(
UNION ( CROSSJOIN(DISTINCT('Month'[Month Period]), DATATABLE("AxisDimension", STRING, { {"Month"}}), DISTINCT(Quarter[Quarter Period])),
CROSSJOIN(DISTINCT('Month'[Month Period]),DATATABLE("AxisDimension", STRING,{ {"QTR"}}), DISTINCT('Quarter'[Quarter Period])))
,"AxisValue", SWITCH([AxisDimension], "QTR", FORMAT(Quarter[Quarter Period], "0000"),"Month", 'Month'[Month Period])
,"AxisSort", SWITCH([AxisDimension], "QTR", CONCATENATE( RIGHT(Quarter[Quarter Period],4), CONCATENATE("0", RIGHT(LEFT(Quarter[Quarter Period],2),1))) ,"Month", CONCATENATE( RIGHT('Month'[Month Period],4), SWITCH(LEFT('Month'[Month Period],3), "Jan", "01", "Feb", "02", "Mar", "03", "Apr", "04", "May", "05", "Jun", "06", "Jul", "07", "Aug", "08", "Sep", "09", "Oct", "10", "Nov", "11", "Dec", "12")))
)
Hi mdaamirkhan,
I typed this message on my mobile phone so I am affraid I can't do that, my advice is to create a new PBIX and try to get it to work there following the steps from the article. If you can make it work with some sample data in a new PBIX you can do it to your own more advanced PBIX too with that knowledge.
Plus the added value is that after this you yourself knows how to do it, you won't achieve that if you let someone else do it for you.
Regards,
L.Meijdam
How Sort number created if it has 3 years data
- Anonymous8 years agoNot applicable
Hi mdaamirkhan,
I just looked at your PBIX file
I think you can just make a column next to it that goes from 1-36 after that you can sort on that column that should probably give what you want.
Regards,
L.Meijdam
- mdaamirkhan8 years agoPost Prodigy
Can you please please help me on this on my pbix file it will be great
- Anonymous8 years agoNot applicable
Hi mdaamirkhan,
If you add a column like this:
You can configure your visual like this:
If you follow these 2 steps it should work fine in your situation, I believe you can do that yourself.
Regards,
L.Meijdam