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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Max Total

Hi All,

 

I want to have grand total of Max values

Max Util.PNG

 

Here is how data set looks like

 

Data set sampleData set sample

sometimes i have 2 dates, sometimes 3 dates, but target needs to be same, hence Iam struggling to use "x" functions, like sumx and maxx.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@msksenthil 

 

dont know if this is bloated, i kinda got it working with this

i forgot about summarise earlier

 

Measure =
Var MaxTarget = maxx('Staff Daily Utilisation','Staff Daily Utilisation'[Target Max As per current working Days])
Var MaxTargetTotal = SUMMARIZE('Staff Daily Utilisation','Staff Daily Utilisation'[Staff Name],"Max Total",MaxTarget)
Return
if(HASONEVALUE('Staff Daily Utilisation'[Staff Name]),
MaxTarget,
SUMX(MaxTargetTotal,[Max Total]))

View solution in original post

8 REPLIES 8
msksenthil
Helper III
Helper III

@luisClive I used Measure to calculate the numbers

msksenthil_0-1604491584135.png

msksenthil
Helper III
Helper III

@luisClive Sure 👍

Anonymous
Not applicable

@msksenthil 

 

dont know if this is bloated, i kinda got it working with this

i forgot about summarise earlier

 

Measure =
Var MaxTarget = maxx('Staff Daily Utilisation','Staff Daily Utilisation'[Target Max As per current working Days])
Var MaxTargetTotal = SUMMARIZE('Staff Daily Utilisation','Staff Daily Utilisation'[Staff Name],"Max Total",MaxTarget)
Return
if(HASONEVALUE('Staff Daily Utilisation'[Staff Name]),
MaxTarget,
SUMX(MaxTargetTotal,[Max Total]))
msksenthil
Helper III
Helper III

@luisClive Thanks,

I believe you have many fields with different values on each record, in this case, we have calculated by not considering the other fields except the required fields like 'date' & 'Target Hours'

SUMX (
SUMMARIZE ( Maxhours, Maxhours[Date], "Hours", MAX ( Maxhours[Target hours] ) ),
[Hours]
)

Hope this helps,

MS

Anonymous
Not applicable

@msksenthil tnks let me try Summarize function, let me check it out

@FrankAT thanks, i havent used inscope before, i check this too

FrankAT
Community Champion
Community Champion

Hi @Anonymous 

you can do it like this:

 

04-11-_2020_11-59-54.png

 

Sum of Distinct Target Hours = 
VAR _Sum = SUM('Table'[Target Hours])
VAR _Table = DISTINCT('Table'[Target Hours])
RETURN
    IF(ISINSCOPE('Table'[Date]),_Sum, SUMX(_Table,'Table'[Target Hours]))

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

msksenthil
Helper III
Helper III

@Anonymous  can you try the below


SUMX ( DISTINCT ( 'TableName' ), 'TableName'[FieldName] )
Anonymous
Not applicable

@msksenthil 

tnks

I have tried this before,  since all values are distinct, just that some data is missing everyday and i want to put max regardless

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.