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! Request now

Reply
blazko
Helper III
Helper III

Daily max calculation, by months

Hi,

I have a problem with calculating max daily sum. Somehow it calculates it monthly. Here's how it looks like:

max.jpg

 

I have tried with solution from this topic:

Desktop/MAX-of-SUM-values

 

And can't get diffrent result than simple monthly sum.

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @blazko,

In the given thread, the week column and Amount are in one table. While based on your DAX formula, your data and value in different table. You want to create a measure or calculated column? What do your resource table look like? 


Based on my understanding, you'd better get the amount in 'relacje_data' table using the formula:
amount=SUM(RELATED(tabela_linie[amount]))

Then create a measure use the formula bolow. 

result=MAXX(SUMMARIZE(relacje_data,relacje_data[Date].[day]),"Amount",SUM(relacje_data[amount])),[Amount])


Finally, you can create a table visual, add the relacje_data[Date] and [result] as value fields.

Best Regards,
Angelia


View solution in original post

5 REPLIES 5
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @blazko,

In the given thread, the week column and Amount are in one table. While based on your DAX formula, your data and value in different table. You want to create a measure or calculated column? What do your resource table look like? 


Based on my understanding, you'd better get the amount in 'relacje_data' table using the formula:
amount=SUM(RELATED(tabela_linie[amount]))

Then create a measure use the formula bolow. 

result=MAXX(SUMMARIZE(relacje_data,relacje_data[Date].[day]),"Amount",SUM(relacje_data[amount])),[Amount])


Finally, you can create a table visual, add the relacje_data[Date] and [result] as value fields.

Best Regards,
Angelia


Hi Angelia

I think you have a ) in the wrong place here - after .[day]. Should be:

result=MAXX(SUMMARIZE(relacje_data,relacje_data[Date].[day],"Amount",SUM(relacje_data[amount])),[Amount])

Regards

Julian 

finally got it. Thanks 🙂

Hi, thank You for your response, but I'm not quite getting this one:


Based on my understanding, you'd better get the amount in 'relacje_data' table using the formula:
amount=SUM(RELATED(tabela_linie[amount]))



Yes these are two separate tables. Is this: amount=SUM(RELATED(tabela_linie[amount])) a measure? Can't do SUM(RELATED...

Instead of 'RELATED' it wants me to give a certain table

Hi @blazko

amount=SUM(RELATED(tabela_linie[amount])) a calculated column. My purpose is that leat the amount and data in sample table. Based on my understanding, there might be mutiple amount record for each date, so I use sum() function. If the amount is single, you can just use RELATED(tabela_linie[amount]). Related  function is used to another related table.

Besides, you can post sample table if you still have problem. I really understand your data is private. You can create simple similar data like yours. So that I can post solution closed to your requirement.

Thanks,
Angelia

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors