Forum Discussion

kdixon5490's avatar
kdixon5490
Helper III
5 years ago
Solved

Need to add Minimum Values

Currently I have a table that looks something like this

DateLocationAttendanceRevenue
2019-01-01LOC12758.00
2019-01-01LOC21522.00
2019-01-02LOC11442
2019-01-02LOC22937

 

I need to be able to take the minimum value by Date and add it up so I would be like this

15 + 14 = 29

22 + 37 = 59

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  kdixon5490  ,

    Here are the steps you can follow:

    1. Create calculated column.

    Attendance_total =
    var _sum=SUMMARIZE('Table','Table'[Date],"1",MIN('Table'[Attendance]),"2",MIN('Table'[Revenue]))
    return
    SUMX(_sum,[1])
    Revenue_total =
    var _sum=SUMMARIZE('Table','Table'[Date],"1",MIN('Table'[Attendance]),"2",MIN('Table'[Revenue]))
    return
    SUMX(_sum,[2])

    2. Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi kdixon5490 

     

    Here is the formula to find the min value for each date.

    Min Attendance = CALCULATE(MIN(Min_value_in_grp[Attendance]),ALLEXCEPT(Min_value_in_grp,Min_value_in_grp[Date]))
     
    Min Revenue = CALCULATE(MIN(Min_value_in_grp[Revenue]),ALLEXCEPT(Min_value_in_grp,Min_value_in_grp[Date]))

     

    Thanks
    Raj

  • Hi, kdixon5490 

    Please check the below picture and the sample pbix file's link down below.

    All measures are in the sample pbix file.

     

     

     

    https://www.dropbox.com/s/x8rfcewd6lrkldo/kdixon.pbix?dl=0 

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  kdixon5490  ,

    Here are the steps you can follow:

    1. Create calculated column.

    Attendance_total =
    var _sum=SUMMARIZE('Table','Table'[Date],"1",MIN('Table'[Attendance]),"2",MIN('Table'[Revenue]))
    return
    SUMX(_sum,[1])
    Revenue_total =
    var _sum=SUMMARIZE('Table','Table'[Date],"1",MIN('Table'[Attendance]),"2",MIN('Table'[Revenue]))
    return
    SUMX(_sum,[2])

    2. Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.