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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vardhan1305
Contributor II
Contributor II

Display Last value.

Hi Experts.

I have a pivot table

ID        Customer          Hours            Bonus                Salary

1          a                        20                    100                  2000

1          a                          20                    500              10000

1          b                        30                    100                3000

1          b                        50                    60                    3000

1          b                        60                  30                    1800

1            c                          50                  100               5000

1            d                        20                  50                    1000

The Salary field  is given in the expression as Hours*Bounus (Column(1)* Column(2))

Now i do have another Pivot table where the Output needs to be displayed as

ID        customer          a          b                c                    d

1                              10000      1800        5000            1000



It should display the last value of each customer.


How should i do it in front end.



Please help me out.

Labels (1)
2 Replies
jyothish8807
Master II
Master II

Try like this:

Load

ID,

Customer,

Hours,

Bonus,

Salary,

Rowno() as Sino

from <>


The in UI create a pivot table.


Dimension;

1. ID

2. Customer --> Drag and birng on top


expression:


firstsortedvalue(Salary,-Sino)


Br,

KC

Best Regards,
KC
shiveshsingh
Master
Master

Hi

Please refer below

T:LOAD * INLINE [

    ID,Customer,Hours,Bonus   

    1,a,20,100    

    1,a,20,500   

    1,b,30,100   

    1,b,50,60   

    1,b,60,30   

    1,c,50,100   

    1,d,20,50

];

F:

load *, Hours*Bonus as Salary,RowNo() as Flag

Resident T;

drop Table T;

Dimension - ID, Customer

Expression - FirstSortedValue((Salary),-Flag)

Capture.PNG