Forum Discussion
Indicate MAX value in time series
Good morning
I have a lot of data like this:
| Date | lot number | manufactured (kg) |
| 01/01/2020 | 1 | 200 |
| 01/01/2020 | 2 | 400 |
| 01/01/2020 | 3 | 300 |
| 01/01/2020 | 4 | 100 |
| 02/01/2020 | 5 | 100 |
| 02/01/2020 | 6 | 200 |
| 02/01/2020 | 7 | 100 |
| 03/01/2020 | 8 | 300 |
| 03/01/2020 | 9 | 300 |
| 03/01/2020 | 10 | 300 |
| 03/01/2020 | 11 | 500 |
| 03/01/2020 | 12 | 300 |
and so to this day. I want to get on a card the maximum or minimum value that has been manufactured in a day. In this case, you should say the MAX card: 1700kg, and MIN: 400kg
I can't find it. Thank you
you can also try to create two measures as below.
MAX = MAXX('Table',CALCULATE(sum('Table'[manufactured (kg)]),ALLEXCEPT('Table','Table'[Date]))) MIN = MINX('Table',CALCULATE(sum('Table'[manufactured (kg)]),ALLEXCEPT('Table','Table'[Date])))
5 Replies
- Greg_Deckler
Community Champion
alucas85 This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.In your case:
Measure = MINX( SUMMARIZE( 'Table', [Date], "Sum",SUM([manufactured (kg)] ), [Sum] ) - ryan_mayu
Super User
you can also try to create two measures as below.
MAX = MAXX('Table',CALCULATE(sum('Table'[manufactured (kg)]),ALLEXCEPT('Table','Table'[Date]))) MIN = MINX('Table',CALCULATE(sum('Table'[manufactured (kg)]),ALLEXCEPT('Table','Table'[Date])))