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.
Dear All,
I have a table with transaction date and groups, i need bar chart month wise (different years), but i am unable to sort the month year. I tried all the ways mentioned on web. but nothing works. Kindly help.
Thanks,
Jesly Thomas
Solved! Go to Solution.
@jesly_ajin I believe you have date dimension in your model. Add following two column in it.
Month = FORMAT( YourDateTable[Date], "MMM, yy" ) Month Sort = FORMAT( YourDateTable[Date], "YYYY-MM" )
Select Month column, go to modelling tab, on drop down by Sort By Column choose, Month Sort
In your visual, use Month column from date dimension and everything will work.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@jesly_ajin I believe you have date dimension in your model. Add following two column in it.
Month = FORMAT( YourDateTable[Date], "MMM, yy" ) Month Sort = FORMAT( YourDateTable[Date], "YYYY-MM" )
Select Month column, go to modelling tab, on drop down by Sort By Column choose, Month Sort
In your visual, use Month column from date dimension and everything will work.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
I have used the below formulas. But still i get the above mentioned error.
Hi @parry2k ,
Now the error went, i changed one of ur formula to Month = FORMAT(LTEQUIPMENTALLOCATIONHISTORY[TRANSDATE], "MMM, yyyy" ). But, still the sort is not working.
NOw my formulas are:
When you say the sort is not working, do you mean that you're still getting the same error when using the Sort By Another Column feature, or that the order is wrong in the visual? What (incorrect) order are they in now? I ask because this looks like it should be working.
If you're still getting the error message that tells you that you can't sort because there's more than one value, double check for nulls or blanks in your data.
You can also create a measure to test the uniqueness of each "MMM, yyyy"/"yyyy-MM" pairing. If you put this measure into a card, it should display zero. If not, it should be a count of [Months] that have multiple [Month Sort]s, which is preventing your Sort By Another Column.
TestForUniquePairs = COUNTROWS(FILTER(SUMMARIZE( VALUES(LTEEQUIPMENTALLOCATIONHISTORY[Month], "Pairs", DISTINCTCOUNT(LTEEQUIPMENTALLOCATIONHISTORY[Month Sort])), [Pairs]>1))
The error - Sort by another is gone.
But, still the order is incorrect.
I tried the measure formula - it is giving the result as one on the card.
Kindly help.
Huh. The fact that it's giving you a result of one is weird, but if the Sort By Another Column is working, we can ignore that.
What order is it currently being displayed in? Can you take a picture of the visual?
@jesly_ajin at this point I would highly recommend to share pbix file with sample data and remove any sensitive information before sharing. It is pretty straight forward task and should work. Can you share file?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@jesly_ajin can you share expression of new columns you added
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |