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
Hello, guys!
Created dynamic date scales
https://www.inkeysolutions.com/blogs/power-bi-dynamic-scales-values/
and got the problem. The x-axis sorted in a wrong way
I created an "index" column in calculated table to fix it:
Tried to sort Value by Range and ... got the system message:
All I need is Sort Value in right ascending order in x-axis (Jan '18, Feb '18 etc).
How could I do this ?
So, the solution is.
add adition column via union - formulae below. (Calendar[Current date] - measure)
and Sort by Sorting column.
Thanks @sayaliredij for idea.
SOLVED
Hello @Anonymous ,
You can create sort column in power query editor. by extracting month and year in two separate column and then create custom column two combine that yearmonth like 20181 and then use that column to sort.
Then you will not have circular depedency issue in report.
#"Inserted Month" = Table.AddColumn(#"Changed Type", "Month", each Date.Month([Date_Added]), Int64.Type),
#"Inserted Year" = Table.AddColumn(#"Inserted Month", "Year", each Date.Year([Date_Added]), Int64.Type),
#"Changed Type1" = Table.TransformColumnTypes(#"Inserted Year",{{"Month", type text}, {"Year", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type1", "Custom", each [Year]&""&[Month])
its caclculated table. i cant use power querty editor unfortunelly.
Hi @Anonymous ,
Create a sorting column in DateSlicer Table like this:
SortOrder = Month ( 'DateSlicer'[Value])
Then Sort Value column by SortOrder column.
This will resolve your issue..
If this helps, please mark this as a solution. Appreciate with Kuddos.
Can`t do this. ''DateSlicer'[Value] has text format.
You can include Year + month as Index and sort accordingly
eg. Jan 18 - 201801
Feb 18 - 201802
Regards,
Sayali
Proud to be a Super User!
Yes, it works with numbers. But i need this month labels - Jan, Feb etc
you can keep the column with the Month name, create an additional column index with not 1 or 2 numbers but 201801, 201802..
you can sort month column using index column
Proud to be a Super User!
Thanks @selimovd for your reply.
I am not sure, if its help. Cause the main problem - Circular dependency. Or, it will definitely help?
Hey @Anonymous ,
the values in the sort by column have to be unique for the same value.
So Jan'18 can be 1, but then Jan'19 cannot be 1.
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 |
---|---|
110 | |
82 | |
62 | |
54 | |
51 |
User | Count |
---|---|
127 | |
118 | |
81 | |
66 | |
65 |