Forum Discussion
harib
Post Patron
7 years agoDefine Categories
Hi I have a Department column with diffrent sections. i would like to know the Ratio of attendence of the employees. Ex : Lets take Department (Administration) I have created measures and calc...
- 7 years ago
Hi Hari,
I created a solution based on your sample data. Please don't share anything confidential here.
Please download the demo from the attachment.
Measure = VAR tempTable = SUMMARIZE ( Attendence, Attendence[Department], 'Calendar'[Year], 'Calendar'[Month], "ratio", [Compliance Ratio] ) RETURN SWITCH ( MIN ( Categories[Name] ), "Mild", COUNTROWS ( FILTER ( tempTable, [ratio] < 0.15 ) ), "Major", COUNTROWS ( FILTER ( tempTable, [ratio] >= 0.15 && [ratio] <= 0.3 ) ), "Chronic", COUNTROWS ( FILTER ( tempTable, [ratio] > 0.3 ) ) )
Best Regards,
v-jiascu-msft
Microsoft Employee
7 years agoHi Hari,
I created a solution based on your sample data. Please don't share anything confidential here.
Please download the demo from the attachment.
Measure = VAR tempTable = SUMMARIZE ( Attendence, Attendence[Department], 'Calendar'[Year], 'Calendar'[Month], "ratio", [Compliance Ratio] ) RETURN SWITCH ( MIN ( Categories[Name] ), "Mild", COUNTROWS ( FILTER ( tempTable, [ratio] < 0.15 ) ), "Major", COUNTROWS ( FILTER ( tempTable, [ratio] >= 0.15 && [ratio] <= 0.3 ) ), "Chronic", COUNTROWS ( FILTER ( tempTable, [ratio] > 0.3 ) ) )
Best Regards,
- harib7 years ago
Post Patron