Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
kishorepanduran
Creator III
Creator III

Getting Particular dates using firstsortedvalue

Hi,

Consider 3 fields from a table.

NameDateProfit
a11/26/2016100
a11/21/2016200
a11/19/2016230
b11/26/2016454
b11/19/2016690
b11/12/2016500
c11/21/2016123
c11/19/2016333
c11/12/2016140

from this table, i need to get the Names which are on saturday's (26,19,12).

Like below, can we achieve this using firstsortedvalue function.? or with something else?

What i want is like below, It should pick only saturday on max Date and Previous Date and those corresponding values.

Namemax DateProfitPrevious DateProfit
a11/26/201610011/19/2016230
b11/26/2016454
11/19/2016

690
c11/19/201633311/12/2016140

Thanks..

5 Replies
tresesco
MVP
MVP

PFA

Anil_Babu_Samineni

You may use this for calculated Dim and use Name

If(WeekDay(Date) = 'Sat', Date)

Then Expresssion could be Sum(Profit)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
nitin_01
Creator
Creator

Hi Kishore,

         This might help you :

                                              =FirstSortedValue(Profit,if(WeekDay(Sort_Date)='Sat',Sort_Date))


Regards,

Nitin

kishorepanduran
Creator III
Creator III
Author

Hi ill change my requirement.

NameDateProfit
a11/26/2016100
a11/21/2016200
a11/19/2016230
a11/14/2016150
b11/26/2016454
b11/19/2016690
b11/12/2016500
c11/21/2016123
c11/19/2016333
c11/12/2016140

What i want is like below, It should pick only saturday on max Date and Previous Date and those corresponding values.

Name max DateProfitPrevious DateProfit
a11/26/201610011/19/2016230
b11/26/2016454
11/19/2016

690
c11/19/201633311/12/2016140

Can you please help me.

kishorepanduran
Creator III
Creator III
Author

Hi ill change my requirement.

NameDateProfit
a11/26/2016100
a11/21/2016200
a11/19/2016230
a11/14/2016150
b11/26/2016454
b11/19/2016690
b11/12/2016500
c11/21/2016123
c11/19/2016333
c11/12/2016140

What i want is like below, It should pick only saturday on max Date and Previous Date and those corresponding values.

Namemax DateProfitPrevious DateProfit
a11/26/201610011/19/2016230
b11/26/2016454
11/19/2016

690
c11/19/201633311/12/2016140