Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi, I have 4 columns that I will be working with: Type, Mintues, Date and doctor. So we can have an appointment type for many clients and each of them will be in the appointment for different amounts of time. Ex a back appointment for 10 patients and the the minutes they spend there ranges from 20-50. I want to account for each appointment only once for that type, date , and provider. So this appointment will not be counted as the sum of all these 10 patient times but rather just once for 50 minutes.
example of data set
| type | minutes | date | doctor |
| Back | 15 | 1/1/2020 | Jim |
| Back | 20 | 1/1/2020 | Jim |
| Back | 25 | 1/1/2020 | Pam |
| Back | 30 | 1/1/2020 | Pam |
| Neck | 20 | 1/2/2020 | Pam |
| Neck | 22 | 1/2/2020 | Michael |
| Neck | 35 | 1/2/2020 | Michael |
| Neck | 20 | 1/2/2020 | Dwight |
| Back | 40 | 1/2/2020 | Dwight |
| Head | 20 | 1/3/2020 | Dwight |
| Head | 25 | 1/3/2020 | Dwight |
| Head | 20 | 1/3/2020 | Dwight |
| Back | 26 | 1/4/2020 | Michael |
| Back | 20 | 1/4/2020 | Michael |
| Back | 30 | 1/4/2020 | Michael |
| Back | 20 | 1/4/2020 | Michael |
| Head | 20 | 1/5/2020 | Michael |
| Back | 30 | 1/5/2020 | Dwight |
| Neck | 40 | 1/5/2020 | Pam |
| Shoulder | 50 | 1/5/2020 | Sam |
And I want this data set to become essentially this
| type | minutes | date | doctor |
| Back | 20 | 1/1/2020 | Jim |
| Back | 30 | 1/1/2020 | Pam |
| Neck | 35 | 1/2/2020 | Michael |
| Back | 40 | 1/2/2020 | Dwight |
| Head | 25 | 1/3/2020 | Dwight |
| Back | 30 | 1/4/2020 | Michael |
| Head | 20 | 1/5/2020 | Michael |
| Back | 30 | 1/5/2020 | Dwight |
| Neck | 40 | 1/5/2020 | Pam |
| Shoulder | 50 | 1/5/2020 | Sam |
So basically look at the type, the date and doctor and then grab the maximum minutes.
Solved! Go to Solution.
Drag the columns in a table select maximum for minute will do.
If you want to create a column that appears in the data view:
MaxMin/Doc/Type/Date = CALCULATE(MAX([ minutes]),ALLEXCEPT('Table','Table'[date],'Table'[type],'Table'[doctor]))
Community Support Team _ Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
To me, it seems like you are taking the max of the day
Look at this, if you take max(minutes) and drag rest of the stuff on table or matrix it should work.
Hi, thanks for the reply. No I am not just taking the max of the day, but rather the max of the day for each type and doctor.
Drag the columns in a table select maximum for minute will do.
If you want to create a column that appears in the data view:
MaxMin/Doc/Type/Date = CALCULATE(MAX([ minutes]),ALLEXCEPT('Table','Table'[date],'Table'[type],'Table'[doctor]))
Community Support Team _ Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |