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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
raksone
Frequent Visitor

SUM of MAX Values GROUPED BY Month

Hello,

 

I am trying to sum all max values from Type column by number of Month, but I do not where to include the latter.

 

How can I make this formula to sum only values of type and also for same month, and only then get the max of values?

 

 

 

=SUMX (
FILTER (
GROUPBY (
'Table114',
'Table114'[Type],
"Max", MAXX ( CURRENTGROUP (), 'Table114'[Charge3] ),
"Count", COUNTX ( CURRENTGROUP (), 1 )
),
[Count] >= 1
),
[Max]
)

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@raksone , Try

 

=SUMX (
FILTER (
GROUPBY (
'Table114',
'Table114'[Type],
'Table114'[Month Year],
"Max", MAXX ( CURRENTGROUP (), 'Table114'[Charge3] ),
"Count", COUNTX ( CURRENTGROUP (), 1 )
),
[Count] >= 1
),
[Max]
)


or


=SUMX (
FILTER (
Summarize (
'Table114',
'Table114'[Type],
'Table114'[Month Year],
"Max", MAXX ( CURRENTGROUP (), 'Table114'[Charge3] ),
"Count", COUNTX ( CURRENTGROUP (), 1 )
),
[Count] >= 1
),
[Max]
)

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@raksone , Try

 

=SUMX (
FILTER (
GROUPBY (
'Table114',
'Table114'[Type],
'Table114'[Month Year],
"Max", MAXX ( CURRENTGROUP (), 'Table114'[Charge3] ),
"Count", COUNTX ( CURRENTGROUP (), 1 )
),
[Count] >= 1
),
[Max]
)


or


=SUMX (
FILTER (
Summarize (
'Table114',
'Table114'[Type],
'Table114'[Month Year],
"Max", MAXX ( CURRENTGROUP (), 'Table114'[Charge3] ),
"Count", COUNTX ( CURRENTGROUP (), 1 )
),
[Count] >= 1
),
[Max]
)

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors