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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Stel
Helper I
Helper I

Maxx value returns sum instead of max value

 

Hi,

 

I want to show the max number of movements per hour in a card in the right upper corner.

As you can see, I currently get the value 377 as a result. This is fault because it's the sum of the Max values. 

Below in the table, the last column "max (per uur)" shows the max values. So in this case I want to show 79 as max value instead of 377.

 

I've tried with the following measures:

 

max_movements_per_hour =
MAXX (
SUMMARIZE(fact_location_inventory_transaction;dim_time[time_hour24];
"total";
COUNTROWS(fact_location_inventory_transaction));
[total]
)
 
And a second attempt:
max_movements_per_hour_v2 = MAXX(KEEPFILTERS(VALUES(dim_time[time_hour24])); [sum_movements])
 
But both gave the 377 as value instad of 79.
 

image.png

 

Can someone help me with this?

Thanks

3 REPLIES 3
Anonymous
Not applicable

Hi @Stel,

I'd like to suggest you take a look at the following blog about measure total, it should suitable for your scenario:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Stel 

The use of Summarize and count and max means count till this level(dim_time[time_hour24]) and then take max.

is this correct row context dim_time[time_hour24] ?

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

@amitchandak , I want the max movements per hour. The dim_time is a time table and the column [time_hour24] represents the hours in 24 format. Meaning 1, 2 ...24

So I would like to count all the rows of the fact_location_inventory_transaction in an hour. So number of rows with same value in time_hour24. And take the max of all the values calculated. Independent of from/to date selection.

 

For some reason at a certain point, I get the sum of the max values instead of max of max values.

 

My dim_date table and dim_time table are separate tables, linked to the fact_location_inventory_transaction table. Could that have something to do with it?

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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