Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
1 year ago
Solved

SUM MAXIMUM VALUES

Hello community, I need help with a report.

I have a table where I want to add maximum values from a table, but instead of adding the values it results in the maximum value of what I'm filtering. For example: I need to get 390 in planned and not 378 as it currently appears. I need to add up the maximum values for each area by filtering the zone and date.

.pbix download link:

https://drive.google.com/file/d/1hJ3tDbJm2Yr0anitt86J75qk-wToIZ9d/view

  • Hi there!

     

    If I understand correctly, you want to sum the maximum values for each area, considering the zone and date filters instead of just adding all the values.

     

    Here's what you can try: Sum_Max_Planned =
    SUMX(
    SUMMARIZE(
    'YourTable',
    'YourTable'[Date],
    'YourTable'[Zone],
    "MaxValue", MAX('YourTable'[Planned])
    ),
    [MaxValue]
    )

    This formula will group your data by Date and Zone, and calculate the maximum "Planned" value for each Zone per Date.

    Don't forget to replace 'YourTable' with your actual table name. Also ensure your table contains 'Date' and 'Zone' columns to apply the filter correctly. With this formula, instead of summing all values, Power BI will only sum the maximum values per Zone per Date.

     

    Hope this helps!

    😁😁

2 Replies

  • freginier's avatar
    freginier
    Solution Sage

    Hi there!

     

    If I understand correctly, you want to sum the maximum values for each area, considering the zone and date filters instead of just adding all the values.

     

    Here's what you can try: Sum_Max_Planned =
    SUMX(
    SUMMARIZE(
    'YourTable',
    'YourTable'[Date],
    'YourTable'[Zone],
    "MaxValue", MAX('YourTable'[Planned])
    ),
    [MaxValue]
    )

    This formula will group your data by Date and Zone, and calculate the maximum "Planned" value for each Zone per Date.

    Don't forget to replace 'YourTable' with your actual table name. Also ensure your table contains 'Date' and 'Zone' columns to apply the filter correctly. With this formula, instead of summing all values, Power BI will only sum the maximum values per Zone per Date.

     

    Hope this helps!

    😁😁