Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi everyone,
I've got this table:
that contains, for each "MOId" and for each Item, the list of operations done (with their timestart and time stop) and the number of pieces produced.
Then I've got a simple calendar table:
My intent is to create a calculated column in the Calendar table, that contains the sum of the maximum values of the column "Pcs produced" for each MOId, Item and date (intended as TimeStart[Date]).
The ideal result would be:
| Date | Sum of Maximums |
| 10/11/2021 | 2818,90 |
| 11/11/2021 | 2447,17 |
Here are the .csv and .pbix files: https://www.dropbox.com/s/l7u31huv1fp3a5d/SUM%20of%20MAX.zip?dl=0
Thank you so much.
Solved! Go to Solution.
Hi,
I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Sum of Maximums CC =
VAR currentdate = 'Calendar'[Date]
VAR filterbycurrentdate_table =
FILTER ( 'SUM of MAX', 'SUM of MAX'[TimeStart - dateonly] = currentdate )
VAR groupby_max =
GROUPBY (
filterbycurrentdate_table,
'SUM of MAX'[MOId],
'SUM of MAX'[Item],
"@maxvalue", MAXX ( CURRENTGROUP (), 'SUM of MAX'[Pcs produced] )
)
RETURN
SUMX ( groupby_max, [@maxvalue] )
Hi,
I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Sum of Maximums CC =
VAR currentdate = 'Calendar'[Date]
VAR filterbycurrentdate_table =
FILTER ( 'SUM of MAX', 'SUM of MAX'[TimeStart - dateonly] = currentdate )
VAR groupby_max =
GROUPBY (
filterbycurrentdate_table,
'SUM of MAX'[MOId],
'SUM of MAX'[Item],
"@maxvalue", MAXX ( CURRENTGROUP (), 'SUM of MAX'[Pcs produced] )
)
RETURN
SUMX ( groupby_max, [@maxvalue] )