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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
gggar
Helper I
Helper I

Calculate MAX from a measure presented, across all rows, with multiple group by

Hello,

 

I have a question to calculate MAX from all values here.

 

gggar_0-1621539440398.png

 

"Date Unit" is coming from a table, called "Calendar"

"Satisfaction" is coming from another table, called "Opinion"

"Score" is a measure, which is SUM(Opinion[Value])


These 2 tables Calendar and Opinion have relationship between them, based on date column.

 

As you can see I have 2 group by here, by Date Unit and Satisfaction

 

I have 2 questions:

  1. How to create a measure that will return 503 for all rows?
  2. What is the correct measure to calculate Score divided by the above measure? So each row will have (from the top) 503/503, 160/503, 45/503, and so on, which is basically percent of max.

 

Anyone have the answer? Any help will be greatly appreciated! Thank you

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@gggar , Create a new measure like this and  use

 

maxx(summarize(Opinion, Calendar[Date Unit], Opinion[satisfaction], "_1", [Score]),[Score])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi @gggar ,

 

You could take a look at ALL() and ALLEXCEPT() function.

https://docs.microsoft.com/en-us/dax/all-function-dax 

https://docs.microsoft.com/en-us/dax/allexcept-function-dax 

Measure = MAXX(ALL(Opinion),[score])

Measure 2 = MAXX(ALLEXCEPT('Opinion','Calendar'[date unit]),[score])

12.PNG

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @gggar ,

 

You could take a look at ALL() and ALLEXCEPT() function.

https://docs.microsoft.com/en-us/dax/all-function-dax 

https://docs.microsoft.com/en-us/dax/allexcept-function-dax 

Measure = MAXX(ALL(Opinion),[score])

Measure 2 = MAXX(ALLEXCEPT('Opinion','Calendar'[date unit]),[score])

12.PNG

 

Best Regards,

Jay

gggar
Helper I
Helper I

Hi @amitchandak ,

 

Thank you for the reply.

 

  1. Could you let me know what is "_1" here in the DAX?
  2. It seems that we can tune this DAX a little bit
    gggar_0-1621572870678.png

    The Total is correct, which is 503. Is it possible to return the Total (this 503) to each row?

Thank you!

 

 

amitchandak
Super User
Super User

@gggar , Create a new measure like this and  use

 

maxx(summarize(Opinion, Calendar[Date Unit], Opinion[satisfaction], "_1", [Score]),[Score])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors