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


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking 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! 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.