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.
Dear all,
I currently have an issue calculating the max of sum values per day. I would like to be able to create the red line on the graphic below taking into account the filters on the left.
The source table looks as follow - DateTime is every minute :
I have tried many formulas with SUMX, SUMMARIZE and FILTER but I cannot get the right result.
Ex : SumMax = SUMX(SUMMARIZE(Sheet1, Sheet1[Date],Sheet1[Type],Sheet1[Activité], "sum of Max", MAX(Sheet1[Nb])),[sum of Max])
But I get the following result - which is not what I am looking for :
Thank you in advance for your support
Solved! Go to Solution.
@FL , Not sure on , but this should first sum and then take max
measure =
calculate(maxX(values(Table[Datetime]),calculate(sum(Table[Nb]))), filter(allselected(Table), Table[date] = max(Table[date])))
@FL , Try a measure like
measure =
calculate(max(Table[Nb]), allexcept(Table, Table[date]))
like
measure =
calculate(maxX(values(Table[Datetime]),[Nb]), allexcept(Table, Table[date]))
Thank you for the reply.
Unfortunately it does not work.
The first measure gives the following result:
And the second one neither.
@FL , Please make sure date does have timestamp.
Try like
measure =
calculate(max(Table[Nb]), filter(allselected(Table), Table[date] = max(Table[date])))
It works when there is only one type and one activity selected :
When I have more than one it goes wrong (it gives the maximum of one type/activitie) - it does not sum the activities below :
@FL , Not sure on , but this should first sum and then take max
measure =
calculate(maxX(values(Table[Datetime]),calculate(sum(Table[Nb]))), filter(allselected(Table), Table[date] = max(Table[date])))
Thank you :
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |