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
Niki
Helper III
Helper III

Sum up the maximum per group, in a measure!

Hi, I really need help.

I want to calculate the maximum per group, the slicers in the report will effect the terms of the maximum, zo I need a measure and not a calculated column or table, as they are not effected by the slicers. After I have deterrmined the max, I want to sum it up and show in a visual.

 

Data is about number of meeting rooms in use at a certain moment (year, week, day, time) by a certain team.

I have a visual showing the times on the x-axis and the maximum number of rooms in use as a value. In the slicer, users can select years, weeks, and days of the week. I have the measure: MaxRooms = Max(numberofrooms), which works fine, because it is working with the slicers and everything, just as long as I have only 1 team selected. As soon as I select a second team, I want to sum up the maximum of the first and the second team. (not get the maximum out of the 2 teams) No clue how to do that!!

Teamdateday of weekname dayYearWeekNrStarttijdRoom IDnumber of rooms
13/4/20191ma2019108:0011
13/7/20194do2019108:0011
13/19/20192di2019128:0011
23/4/20191ma2019108:0011
23/5/20192di2019108:0012
23/8/20195vr2019108:0021
13/7/20194do2019108:1511
13/19/20192di2019128:1511
23/4/20191ma2019108:1511

 

Kind regards,

Niki

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Niki try this measure

 

Max Rooms = SUMX ( VALUES ( Room[Team] ), CALCULATE ( MAX ( Room[number of rooms] ) ) )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Niki try this measure

 

Max Rooms = SUMX ( VALUES ( Room[Team] ), CALCULATE ( MAX ( Room[number of rooms] ) ) )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

 

Measure is working great, as it should be!

I have a next level question on this measure, maybe you can help me out, (again :))

 

I now calculate the max value (nr of rooms) per group. I added time of day and day of the week on my X-axis.

Day of the week I only added to my axis to solve my 'problem'.

If I want to show the measure in a KPI box to give the user the max nr of rooms needed in a glance, it is not taking the day of the week into account. (or If I only want to show times of day on my axis and not day of the week)

 

So if I have 2 groups selected, it calculates the max of group 1 and sums it up to the max of group 2.

I would need the max on the same day and time. 

To show on my graph, it would be sufficient to take into account the day of week. To show it in a kpi box I think I also need the time of day int the measure. I have been trying stuff with summarizecolumns, but didn't work.

 

Any ideas?

 

Kind regars, 

Niki

 

Wow, did a quick check, and it seems to work perfectly!

@parry2k 

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.