Forum Discussion
Highest value in a day
I need a measure that shows the largest sum of values obtained in a single day. For example:
| Date | Value |
| 2025/01/01 | 25 |
| 2025/01/02 | 12 |
| 2025/01/01 | 31 |
| 2025/01/03 | 32 |
| 2025/01/03 | 10 |
In this case, the day with the highest sum of values was 2025/01/01, whose result is 56. I need a measure that shows this result.
HI jobf you can try this
Highest Daily = MAXX( CALCULATETABLE( VALUES('Data'[Date]) ), CALCULATE(SUM('Data'[Value])) )Results:
Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!
10 Replies
- Jihwan_Kim
Super User
Hi,
One of ways is to utilize visual calculation.
Please check the below picture and the attached pbix file.Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
- MasonMA
Super User
That would be
MaxDaily =
MAXX (
VALUES ( 'Table'[Date] ),
CALCULATE ( SUM ( 'Table'[Value] ) )
)Use MAXX(VALUES(Date)) to iterate once per distinct date in the current context, and put this measure in a card visual.
- Ashish_Mathur
Super User
Hi,
Write these measures
V = SUM(Data[Value])Measure = MAXX(VALUES('Calendar'[Date]),[V])Hope this helps
- danextian
Super User
Hi jobf
Try the following measures:
Max value in a single day = MAXX ( ALLSELECTED ( 'Table'[Date] ), CALCULATE ( SUM ( 'Table'[Value] ) ) )Day with the max value = MAXX ( TOPN ( 1, ADDCOLUMNS ( SUMMARIZE ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] ), "@value", CALCULATE ( SUM ( 'Table'[Value] ) ) ), [@value], DESC ), [Date] ) -------OR Day with the max value 2 = MAXX ( INDEX ( 1, ADDCOLUMNS ( SUMMARIZE ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] ), "@value", CALCULATE ( SUM ( 'Table'[Value] ) ) ), ORDERBY ( [@value], DESC ) ), [Date] ) - AnonymousNot applicable
Hi jobf
Thank you for reaching out to the Microsoft Fabric Forum Community.
Royel Jihwan_Kim Ashish_Mathur danextian Thanks for the inputs
I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.
- AnonymousNot applicable
Hi jobf
I wanted to check if you had the opportunity to review the information provided by users. Please feel free to contact us if you have any further questions.
- AnonymousNot applicable
Hi jobf
Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.
- srlabhe
Super User
Try below
Max Daily Value =
MAXX (
SUMMARIZE (
Sales,
Sales[Date],
"Total Value", SUM ( Sales[Value] )
),
[Total Value]
)