Forum Discussion
leinad13
10 years agoAdvocate I
Help With Grouping By Multiple Columns
I need to establish what percentage of a group of staff have a particular software title installed. I have all the required data and have related it in PowerBI but I just cant work out how to group /...
- 10 years ago
In this scenario, you can create several calculated columns in the Installs table. Please refer to following steps:
- Create a calculated column to store the Discipline name.
Discipline = RELATED ( Staff[DisciplineName] )
- Create a calculated column to store the total installs per application per discipline.
Total_Installs_PerApp_PerDiscipline = CALCULATE ( COUNTROWS ( Installs ), FILTER ( Installs, Installs[Discipline] = EARLIER ( Installs[Discipline] ) && Installs[SoftwareTitle] = EARLIER ( Installs[SoftwareTitle] ) ) ) - Create a calculated column to store the total installs per application in all disciplines.
Total_Installs_Per_App = CALCULATE ( COUNTROWS ( Installs ), ALLEXCEPT ( Installs, Installs[SoftwareTitle] ) ) - Create a calculated column to store the percent of install per staff discipline.
Percentage_PerApp_PerDiscipline = Installs[Total_Installs_PerApp_PerDiscipline] / Installs[Total_Installs_Per_App]
- Drag the Table chart into your canvas as below.
Regards,
- Create a calculated column to store the Discipline name.
v-sihou-msft
10 years agoMicrosoft Employee
In this scenario, you can create several calculated columns in the Installs table. Please refer to following steps:
- Create a calculated column to store the Discipline name.
Discipline = RELATED ( Staff[DisciplineName] )
- Create a calculated column to store the total installs per application per discipline.
Total_Installs_PerApp_PerDiscipline = CALCULATE ( COUNTROWS ( Installs ), FILTER ( Installs, Installs[Discipline] = EARLIER ( Installs[Discipline] ) && Installs[SoftwareTitle] = EARLIER ( Installs[SoftwareTitle] ) ) ) - Create a calculated column to store the total installs per application in all disciplines.
Total_Installs_Per_App = CALCULATE ( COUNTROWS ( Installs ), ALLEXCEPT ( Installs, Installs[SoftwareTitle] ) ) - Create a calculated column to store the percent of install per staff discipline.
Percentage_PerApp_PerDiscipline = Installs[Total_Installs_PerApp_PerDiscipline] / Installs[Total_Installs_Per_App]
- Drag the Table chart into your canvas as below.
Regards,
leinad13
10 years agoAdvocate I
v-sihou-msft Many thanks for your detailed an accurate response. It was exactly what i needed.