Forum Discussion
Need to add Minimum Values
Currently I have a table that looks something like this
| Date | Location | Attendance | Revenue |
| 2019-01-01 | LOC1 | 27 | 58.00 |
| 2019-01-01 | LOC2 | 15 | 22.00 |
| 2019-01-02 | LOC1 | 14 | 42 |
| 2019-01-02 | LOC2 | 29 | 37 |
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
- Anonymous5 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
- AnonymousNot 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 - Jihwan_KimSuper User
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
- AnonymousNot 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.