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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alucas85
Regular Visitor

Indicate MAX value in time series

Good morning

I have a lot of data like this:

Datelot numbermanufactured (kg)
01/01/20201200
01/01/20202400
01/01/20203300
01/01/20204100
02/01/20205100
02/01/20206200
02/01/20207100
03/01/20208300
03/01/20209300
03/01/202010300
03/01/202011500
03/01/202012300

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

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@alucas85

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])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@alucas85

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])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

 

And if I want it the same but instead the day, indicate the month?

 

Thank you again

@alucas85 

if you want to show the max month or min month, you can try to create a month column and use the similar DAX.

month = year('Table'[Date])&month('Table'[Date])

MAX = MAXX('Table',CALCULATE(sum('Table'[manufactured (kg)]),ALLEXCEPT('Table','Table'[month])))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Perfect. Thank you!

Greg_Deckler
Super User
Super User

@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]
  )

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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