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,
I Need Help as I want to display the top selling month. In the image given below as it displays top country (Country with highest selling amount).
In the same manner i want to display month with highest selling amount.
I have used the below mentioned DAX but it didn't worked.
TOP Month= RANKX(ALL(Date-Field),CALCULATE(SUM(Amount Field)))
Hi @afaque03. We could probably help more directly with sample data or a little understanding of your data model (tables, relationships, etc.). I'm not sure of the way you're returning the top country, or why modifying that formula for returning the month won't work, but I'm assuming there's a reason.
That being said, you want to return the month for which monthly sales were at their highest? I just did something similar that could probably help.
Let's make some building block measures that will simplify things.
Calculate sales totals:
Sales = SUM(TableName[Sales])
Rank sales by month:
Monthly Sales Rank = RANKX(ALL(Calendar[Month], [Sales], , DESC, DENSE)
Identify the monthly sales amount where sales were highest:
Peak Monthly Sales = MAXX(ALLSELECTED(Calendar[Month]), [Monthly Sales Rank])
Determine the month where monthly sales are equal to the peak monthly sales:
Peak Month by Sales Rank = CALCULATE(
FIRSTNONBLANK(Calendar[Month], 1),
FILTER(VALUES(Calendar[Month]),
[Monthly Sales Rank]=CALCULATE(
[Peak Monthly Sales], VALUES(Calendar[Month])
)
)
)
If this is on the right track, you can find other examples and more info on powerpivotpro.
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 |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |