The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
Is there a way we could bring in a field to a format 'dd-mmm-yyyy' and still be able to sort. (I understand the Format function will help me with the format but it wouldnt let me sort as it would it be a text.)
Thanks in Advance.
Solved! Go to Solution.
Sorry. I'm not quite sure I understand you.
These two are calculated columns:
format_Date = FORMAT(Query1[Date], "dd-mmm-yyyy") date_Sort = RANKX(Query1, [Date],,ASC, Dense)
Sort Ascending by date_Sort
Change Header options:
hide date_Sort:
You can use this method:
In a calculated column:
date_Sort = RANKX(Query1, [Date],,ASC, Dense)
Next, put your formatted date and the sort into a visual. In the Format Property under Column Headers, turn both off "Auto-size column width" and "Word Wrap". Sort your date and then "hide" your date_Sort field.
Thank you for your suggestion. There is one issue .. the RANKX function would order text output ( which is from the format function for'dd-mmm-yyyy') only in the alphabetical order first..
example (choose ascending)
05-Apr-2016
05-Apr-2017
05-Aug-2016
05-Aug-2017
06-Apr-2018
06-Aug-2018
30-Dec-2016
Sorry. I'm not quite sure I understand you.
These two are calculated columns:
format_Date = FORMAT(Query1[Date], "dd-mmm-yyyy") date_Sort = RANKX(Query1, [Date],,ASC, Dense)
Sort Ascending by date_Sort
Change Header options:
hide date_Sort:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
73 | |
52 | |
50 |
User | Count |
---|---|
132 | |
124 | |
78 | |
64 | |
61 |