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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
LizK75
Frequent Visitor

Max Revenue by Month Issue

I have two tables:

  1. IN for Invoice (contains amount and date columns) - date column is in format of Year Month 
  2. Date (contains Year, Year Month, Month, and date columns)

I’ve created a relationship between IN and Date on the Year Month column (many-to-many relationship). I’ve also defined a measure (Total Revenue):

 

 

 

TotRev = SUM('IN'[amount])

 

 

 

I’m trying to create a table visualization with the following columns:

  • Month (from the Date table)
  • MaxRevenue: This should display the maximum revenue globally.

 

 

MaxRevenue = MAXX(ALLSELECTED('Date'[month]), [TotRev])

 

 

 

What I have

Janv23300
Feb20500
Mar24900
Apr18900
May11235
Jun9000
Jul6500
Aug22750
Sep33000
Oct33000
Nov26750
Dec22125

 

What I want 

Janv33000
Feb33000
Mar33000
Apr33000
May33000
Jun33000
Jul33000
Aug33000
Sep33000
Oct33000
Nov33000
Dec33000

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

Jihwan_Kim_1-1738688397219.png

 

 

Jihwan_Kim_0-1738688356652.png

 

Amount measure: = 
SUM('IN'[amount])

 

 

expected result measure: = 
MAXX (
    ALL (
        'Date'[Year],
        'Date'[Year-Month sort],
        'Date'[Year-Month],
        'Date'[Month name],
        'Date'[Month number]
    ),
    [Amount measure:]
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
LizK75
Frequent Visitor

Thanks it works.
I forgot to add 'Date'[Month name] which is crucial.

 

Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

Jihwan_Kim_1-1738688397219.png

 

 

Jihwan_Kim_0-1738688356652.png

 

Amount measure: = 
SUM('IN'[amount])

 

 

expected result measure: = 
MAXX (
    ALL (
        'Date'[Year],
        'Date'[Year-Month sort],
        'Date'[Year-Month],
        'Date'[Month name],
        'Date'[Month number]
    ),
    [Amount measure:]
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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