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.
I'm new to Power BI. I need some help to create a measure to sum up the max "ORADailyPreTotal" of each client in the table below. I would like to sum up only the maximium of each client daily sum which is 6877.909871 + 6675.3583845. Thanks a lot in advance.
Solved! Go to Solution.
Hi @tanj1 ,
Try the following measure. The idea is to create a virtual table, filter out the maximum values from the virtual table, and then add them together.
Result =
VAR _table =
ADDCOLUMNS (
'Table',
"max",
CALCULATE (
MAX ( 'Table'[ORADailyPreTotal] ),
FILTER ( ALLSELECTED ( 'Table' ), [client] = EARLIER ( 'Table'[client] ) )
)
)
RETURN
SUMX ( FILTER ( _table, [max] = [ORADailyPreTotal] ), [ORADailyPreTotal] )
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Stephen & Pete, apprecaite all your help.
Somehow I'm not able to get it work for the last few days.
I tried using the above formular but somehow still can't get it work.
I would like to get the result of 14802.74685 from this CSV file.
Thanks a lot Stephen Tao 😉
Thanks a lot Stephen Tao!😉
Hi Stephen & Pete, apprecaite all your help.
Somehow I'm not able to get it work for the last few days.
I tried using the above formular but somehow still can't get it work.
I would like to get the result of 14802.74685 from this CSV file.
Hi @tanj1 ,
Create a daily measure.
Daily =
CALCULATE (
SUM ( data[Pre GB] ),
FILTER (
ALLSELECTED ( data ),
[Year] = MAX ( 'data'[Year] )
&& [client] = MAX ( 'data'[client] )
&& [Day] = MAX ( 'data'[Day] )
&& [Month] = MAX ( 'data'[Month] )
)
)
Then create another measure to filter the max value.
Max =
IF (
MAXX (
FILTER (
ALLSELECTED ( data ),
[Year] = MAX ( 'data'[Year] )
&& [Month] = MAX ( 'data'[Month] )
&& [client] = MAX ( 'data'[client] )
),
[Daily]
) = [Daily],
[Daily],
BLANK ()
)
There is also a max value in March, but your expected result is 14802.75. Do you want to calculate the sum of the maximum values only in February?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Stephen. Almost getting there 😀.
I would like to get the max of any date for BBB and AAA and sum them together.
Hi @tanj1 ,
OK. To add them up. Try
Total=SUMX('DATA', [Max])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @tanj1 ,
Try the following measure. The idea is to create a virtual table, filter out the maximum values from the virtual table, and then add them together.
Result =
VAR _table =
ADDCOLUMNS (
'Table',
"max",
CALCULATE (
MAX ( 'Table'[ORADailyPreTotal] ),
FILTER ( ALLSELECTED ( 'Table' ), [client] = EARLIER ( 'Table'[client] ) )
)
)
RETURN
SUMX ( FILTER ( _table, [max] = [ORADailyPreTotal] ), [ORADailyPreTotal] )
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.