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.
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] )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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] )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
111 | |
109 | |
89 | |
76 | |
66 |
User | Count |
---|---|
125 | |
111 | |
100 | |
83 | |
71 |