cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

Anyone :)?

1 ACCEPTED SOLUTION
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

4 REPLIES 4
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

Frequent Visitor

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

Community Champion

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

Community Champion

@fva6937

Regards
Zubair