Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello, I'm encountering a problem while attempting to create a sorting column using the SWITCH function. After creating the column, I am unable to sort the month names using this newly created sort column due to a dependency error message. Could anyone advise on the optimal solution to this issue within the Data View (not in the Power Query view)?
Thanks in advance..
Solved! Go to Solution.
Hi @CupidC ,
If there are not many categories(fruit field) and they will not continue to grow, consider creating the input table as a Dim table (and sort) and then connect to the fact table.
Best practice continues to be to take this calculation downwards: dax --> power query m --> data source.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @CupidC
You can parse the month directly from the "Date " column with
Month_num = month ('your table[date])
Or just create a date table with all needed columns with a script like :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Ritaf1983
Thanks. What if the column isn't related to months, as in the example below? Are there any methods to create a sorting column in such cases? thanks...
Hi @CupidC ,
If there are not many categories(fruit field) and they will not continue to grow, consider creating the input table as a Dim table (and sort) and then connect to the fact table.
Best practice continues to be to take this calculation downwards: dax --> power query m --> data source.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
94 | |
88 | |
35 | |
32 |
User | Count |
---|---|
153 | |
101 | |
82 | |
63 | |
52 |