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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DeEviloN
Helper III
Helper III

maximum revenue

help me please. I have a list of organizations from the beginning of the year and their revenue, I need to show the maximum monthly revenue from the selected organization. Let's say I calculated the revenue for the current month, but I want to compare it with the maximum revenue of this organization. For example, in the current month, the revenue is 15, and the maximum revenue they had in February was 30, how to display it?

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @DeEviloN ,

 

Here I create a easy sample to have a test.

RicoZhou_0-1662364442554.png

Revenue by Month = 
CALCULATE(SUM('Table'[Revenue]),ALLEXCEPT('Table','Table'[Year],'Table'[Month]))
Current Month Revenue = 
CALCULATE([Revenue by Month],FILTER(ALL('Table'),'Table'[Year] = YEAR(TODAY())&&'Table'[Month] = MONTH(TODAY())))
Max Month Revenue = 
MAXX(FILTER(ALL('Table'),'Table'[Year] = YEAR(TODAY())),[Revenue by Month])

Result is as below.

RicoZhou_1-1662364507841.png

 

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.

 

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @DeEviloN ,

 

Here I create a easy sample to have a test.

RicoZhou_0-1662364442554.png

Revenue by Month = 
CALCULATE(SUM('Table'[Revenue]),ALLEXCEPT('Table','Table'[Year],'Table'[Month]))
Current Month Revenue = 
CALCULATE([Revenue by Month],FILTER(ALL('Table'),'Table'[Year] = YEAR(TODAY())&&'Table'[Month] = MONTH(TODAY())))
Max Month Revenue = 
MAXX(FILTER(ALL('Table'),'Table'[Year] = YEAR(TODAY())),[Revenue by Month])

Result is as below.

RicoZhou_1-1662364507841.png

 

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.

 

DeEviloN
Helper III
Helper III

DeEviloN_0-1661935550316.png

 

DeEviloN
Helper III
Helper III

Shows this month's revenue, not the maximum

DeEviloN_0-1661933825440.png

 

amitchandak
Super User
Super User

@DeEviloN ,

 

calculate( Maxx(values('Date'[Month Year]) , [Revenue measure]), filter(allselected(Table[Organzation]) , Table[Organzation] = max(Table[Organzation]) ) )

 

or

 


calculate( Maxx(values('Date'[Month Year]) , [Revenue measure]), filter(all(Table[Organzation]) , Table[Organzation] = max(Table[Organzation]) ) )

 

or

 


calculate( Maxx(values('Date'[Month Year]) , [Revenue measure]), filter(allselected(Table) , Table[Organzation] = max(Table[Organzation]) ) )

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.