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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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]
)

Regards
Zubair

Please try my custom visuals

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]
)

Regards
Zubair

Please try my custom visuals

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 )
    )

Regards
Zubair

Please try my custom visuals

@fva6937

 

HighestSales.png


Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.