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.
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
Solved! Go to Solution.
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])))
Proud to be a 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])))
Proud to be a Super User!
Hi,
And if I want it the same but instead the day, indicate the month?
Thank you again
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])))
Proud to be a Super User!
Perfect. Thank you!
@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]
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |