Forum Discussion
Islam
5 years agoHelper V
help on getting a complex index
Hello Everyone
I'm having a trouble creating the following steps measure of indexing a table to get then the top values
1- first we must filter out any employee who had a vacation during the last three years or got a punishment during the same period or got a court punishment during those threeyears also
2- then first sort will be based on assigning dates or modified assigning date if there is a period add decision for any employee
3- the next sorting will be those who had a secret report grade of Excellent in two previous years and then those who got in one of the two previous years from today a report grade of excellent and efficient and then both previous years are efficient
4- next sort will be place all employees which never had a previous encouragment add along there careers in the company
5- next sorting will be those who haven't got an encouragment add within current sub degree level
6- last step after applying all those sorting stages we should get an index column measure which i'll sort the matrix or table based on it
I'll attach the fact table and the pbix sample file for making everything clear
this help is not gonna be paid but it's an excellent excersice for making a full HR system dashboard
Any help would be highly appreciated .Thanks in advance
17 Replies
- IslamHelper V
Any help gentlemen
as a start i want a measure to only filter out any employee who had a vacation during the last three years over than one year or got a punishment during the same period or got a court punishment during those three years also
- AnonymousNot applicable
Hi Islam ,
You can create a measure as below and apply a visual-type filter (Flag=1) to get it. Please find the attachment for the details.
Flag = VAR _vacation = CALCULATE ( MAX ( 'dEmpBasicInfo'[EmpID] ), FILTER ( 'fTransactions', 'fTransactions'[EmpID] = SELECTEDVALUE ( 'dEmpBasicInfo'[EmpID] ) && 'fTransactions'[VacationID] <> BLANK () ) ) VAR _courtpunish = CALCULATE ( MAX ( 'dEmpBasicInfo'[EmpID] ), FILTER ( 'fTransactions', 'fTransactions'[EmpID] = SELECTEDVALUE ( 'dEmpBasicInfo'[EmpID] ) && 'fTransactions'[CourtPunishmentDecID] <> BLANK () ) ) VAR _daypunish = CALCULATE ( MAX ( 'dEmpBasicInfo'[EmpID] ), FILTER ( 'fTransactions', 'fTransactions'[EmpID] = SELECTEDVALUE ( 'dEmpBasicInfo'[EmpID] ) && 'fTransactions'[PunishmedDecID] <> BLANK () ) ) VAR _flagvacation = IF ( NOT ( ISBLANK ( _vacation ) ), 1, 0 ) VAR _flagcourtpunish = IF ( NOT ( ISBLANK ( _courtpunish ) ), 1, 0 ) VAR _flagdaypunish = IF ( NOT ( ISBLANK ( _daypunish ) ), 1, 0 ) RETURN IF ( _flagvacation = 1 || _flagcourtpunish = 1 || _flagdaypunish = 1, 1, BLANK () )And please provide more details (examples and expected result with screenshots) if you want to get help about the left requirements.
Islam wrote:
2- then first sort will be based on assigning dates or modified assigning date if there is a period add decision for any employee3- the next sorting will be those who had a secret report grade of Excellent in two previous years and then those who got in one of the two previous years from today a report grade of excellent and efficient and then both previous years are efficient4- next sort will be place all employees which never had a previous encouragment add along there careers in the company5- next sorting will be those who haven't got an encouragment add within current sub degree level6- last step after applying all those sorting stages we should get an index column measure which i'll sort the matrix or table based on itBest Regards
- IslamHelper V
really appreciate it sir and i'll test it out and inform you with results