PatrickCox
New Member
- Joined
- Jan 13, 2019
- Messages
- 1
I have the following data that I need to summarize and then create a measure against and I am having trouble. I am doing this in Excel Power Pivot, NOT Power BI... Here is a similar data set to mine...
Columns:
Patient
Gender
Year
Procedure
Example Records...
Patient A, Female, 2017, Procedure A
Patient A, Female, 2018, Procedure B
Patient A, Female, 2018, Procedure C
Patient A, Female, 2019, Procedure D
Patient B, Male, 2017, Procedure E
Patient B, Male, 2017, Procedure F
Patient C, Male, 2019, Procedure G
Patient C, Male, 2020, Procedure H
Patient C, Male, 2020, Procedure I
Patient D, Female, 2018, Procedure J
Patent D, Female, 2018, Procedure K
Patient D, Female, 2019, Procedure L
The final Measure I want to create is to show in how many years Males and Females had procedures on average. So for the above, Females had procedures in 3 years for Patient A and 2 years for Patient D for an average of 2.5 years and Males had procedures in 1 year for Patient B & 2 years for Patient C for an average of 1.5 years.
I was thinking that a pivot table would take care of Male / Female split and then I just need to create a formula that will average the count of years for each patient. I was thinking something with Group By for Summarize but I can't figure out how to use this within Excel Power Pivot. All of the examples seem to be in Power BI.
Again, this data is in the Power Pivot Data Model.
thanks for any help!
Columns:
Patient
Gender
Year
Procedure
Example Records...
Patient A, Female, 2017, Procedure A
Patient A, Female, 2018, Procedure B
Patient A, Female, 2018, Procedure C
Patient A, Female, 2019, Procedure D
Patient B, Male, 2017, Procedure E
Patient B, Male, 2017, Procedure F
Patient C, Male, 2019, Procedure G
Patient C, Male, 2020, Procedure H
Patient C, Male, 2020, Procedure I
Patient D, Female, 2018, Procedure J
Patent D, Female, 2018, Procedure K
Patient D, Female, 2019, Procedure L
The final Measure I want to create is to show in how many years Males and Females had procedures on average. So for the above, Females had procedures in 3 years for Patient A and 2 years for Patient D for an average of 2.5 years and Males had procedures in 1 year for Patient B & 2 years for Patient C for an average of 1.5 years.
I was thinking that a pivot table would take care of Male / Female split and then I just need to create a formula that will average the count of years for each patient. I was thinking something with Group By for Summarize but I can't figure out how to use this within Excel Power Pivot. All of the examples seem to be in Power BI.
Again, this data is in the Power Pivot Data Model.
thanks for any help!