Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Rabia_Taimur
Contributor III
Contributor III

pcking selected values from a table

I have table with salary details, new record is maintained for all salary/grade changes. I need to pick only the records where the grade has changed.

Its SAP HCM infotype PA0008

Labels (4)
1 Solution

Accepted Solutions
Kushal_Chawda

@Rabia_Taimur  Script solution

 

Data:
LOAD Emp_No,
     Start_Date,
     End_Date,
     Grade,
     Salary
FROM Table;

left join(Data)
LOAD Emp_No,
     Grade,
     min(End_Date) as End_Date,
     1 as grade_change_flag
resident Data
group by Emp_No,
     Grade;

 

 

Then try below measure in chart

=sum({<grade_change_flag={1}>}Salary)

View solution in original post

5 Replies
Kushal_Chawda

@Rabia_Taimur What exactly you want to do with that records? Do you want to create any measure or you want to filter those records? Could you provide more details?

Rabia_Taimur
Contributor III
Contributor III
Author

I have data in below format. I need to pick the highlighted records only to show the promotions and time spent in each grade.

Rabia_Taimur_0-1728382713179.png

 

 

 

 

Kushal_Chawda

@Rabia_Taimur  Create table chart with Dimensions Emp_no, Start_Date,End_Date,Grade. Create below measure for salary.

sum(aggr(if(End_Date = min(total <Emp_No,Grade>End_Date),Salary), Emp_No, End_Date,Grade))

 

Note: Uncheck "Show Zero Values" option from properties ->Add-ons

Kushal_Chawda

@Rabia_Taimur  Script solution

 

Data:
LOAD Emp_No,
     Start_Date,
     End_Date,
     Grade,
     Salary
FROM Table;

left join(Data)
LOAD Emp_No,
     Grade,
     min(End_Date) as End_Date,
     1 as grade_change_flag
resident Data
group by Emp_No,
     Grade;

 

 

Then try below measure in chart

=sum({<grade_change_flag={1}>}Salary)

Rabia_Taimur
Contributor III
Contributor III
Author

Thank you for the quick support and solution, appreciate your Qlik understanding!!!