Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
fva6937
Frequent Visitor

Return the Value of the Highest Month of Sales

I need to find the best month of sales and return its value (for the max value of the gauge).

 

 

 

Screen Shot 2018-01-30 at 12.04.18 AM.png

 

Anyone :)?

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

HI @fva6937

 

Try this Measure for Highest Month Value

 

HighestMonthValue =
MAXX (
    SUMMARIZE (
        TableName,
        TableName[Date].[Month],
        "Total Sales", SUM ( TableName[Sales] )
    ),
    [Total Sales]
)

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

HI @fva6937

 

Try this Measure for Highest Month Value

 

HighestMonthValue =
MAXX (
    SUMMARIZE (
        TableName,
        TableName[Date].[Month],
        "Total Sales", SUM ( TableName[Sales] )
    ),
    [Total Sales]
)

Thant's Awesome! Thanks!!

 

Is there a way that I could get the value by the Salesperson, when I filter?

 

I tried SUMX, but I still have more to learn Smiley Very Happy

Hi @fva6937

 

Then use this MEASURE for Month with Highest Sales

 

HighestMonth =
VAR mytable =
    SUMMARIZE (
        TableName,
        TableName[Date].[Month],
        "Total Sales", SUM ( TableName[Sales] )
    )
VAR myValue = [HighestMonthValue]
RETURN
    CALCULATE (
        FIRSTNONBLANK ( TableName[Date].[Month], 1 ),
        FILTER ( mytable, [Total Sales] = myValue )
    )

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.