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.
Hi,
Can anyone help. I'm unable to display month over month change for my sales data. i've used an invoked fiscal calendar due to sales starting in October however when trying to visualise the mom change it doesn't show it in the fiscal order.
Solved! Go to Solution.
Hi @Anonymous ,
I suggest you to create a Dimdate table with Fiscal Year and sort you need.
Date =
VAR _BASIC =
ADDCOLUMNS (
CALENDAR ( DATE ( 2020, 10, 01 ), DATE ( 2022, 09, 30 ) ),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"MonthName", FORMAT ( [Date], "mmmm" ),
"YearMonth",
YEAR ( [Date] ) * 100
+ MONTH ( [Date] )
)
VAR _ADD =
ADDCOLUMNS ( _BASIC, "Fiscal Year", IF ( [Month] >= 10, [Year] + 1, [Year] ) )
VAR _ADDRANK =
ADDCOLUMNS (
_ADD,
"Rank",
RANKX (
FILTER ( _ADD, [Fiscal Year] = EARLIER ( [Fiscal Year] ) ),
[YearMonth],
,
ASC,
DENSE
)
)
RETURN
_ADDRANK
Create a relationship between Date columns.
Sort MonthName column by Rank and add rank into Tooltip, then sort visual by rank.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amitchandak
That's correct. The line graph is being sorted by the fiscal calendar as i'd like however the bar chart is being sorted chronologically despite the month order being sorted fiscally.
I think it may be due to the mom change calculation but not sure how to rectify it.
@Anonymous , You have to create order column for your month
Month Order =
if(month([Date]) >9 , month([Date]) -9 , month([Date]) +3 )
mark this column as a sort column for the month
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
Hi @amitchandak
Many thanks for your help. I've used one of these that has helped me with the attached image however whenever i try to do a month to month sales change it automatically reverts to chronological order instead of fiscal order.
Any ideas would be greatly appreciated.
@Anonymous , I think you talking about bar visual, make sure you sort on month using three dots
Hi @amitchandak
That's correct. The line graph is being sorted by the fiscal calendar as i'd like however the bar chart is being sorted chronologically despite the month order being sorted fiscally.
I think it may be due to the mom change calculation but not sure how to rectify it.
Hi @Anonymous ,
I suggest you to create a Dimdate table with Fiscal Year and sort you need.
Date =
VAR _BASIC =
ADDCOLUMNS (
CALENDAR ( DATE ( 2020, 10, 01 ), DATE ( 2022, 09, 30 ) ),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"MonthName", FORMAT ( [Date], "mmmm" ),
"YearMonth",
YEAR ( [Date] ) * 100
+ MONTH ( [Date] )
)
VAR _ADD =
ADDCOLUMNS ( _BASIC, "Fiscal Year", IF ( [Month] >= 10, [Year] + 1, [Year] ) )
VAR _ADDRANK =
ADDCOLUMNS (
_ADD,
"Rank",
RANKX (
FILTER ( _ADD, [Fiscal Year] = EARLIER ( [Fiscal Year] ) ),
[YearMonth],
,
ASC,
DENSE
)
)
RETURN
_ADDRANK
Create a relationship between Date columns.
Sort MonthName column by Rank and add rank into Tooltip, then sort visual by rank.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |