Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sijojoseph22
Creator II
Creator II

Graph based on increase and decrease

Hi All,

 

Buyer1 Date Decision Made Increase Rating
Buyer107/04/2017 6
Buyer108/04/2018D4
Buyer219/06/2017 2
Buyer218/02/2018I7
Buyer216/04/2018D1
Buyer217/04/2018I3
Buyer317/07/2017 5
Buyer321/10/2017D2

Above given is the sample data used in my projects. I want to create a graph based on the Increase or decrease of Rating.

If I am applying the filter of Date Decision Made>= 01/01/2018, the I want to get the two rows highlighted in yellow. i.e the max date decision made for the change for my pie chart. I want to do this in UT. The date selection can vary.

Attached the QVW with this raw data.

Let me know if any points needs more clarity

Thanks,

Sijo

1 Solution

Accepted Solutions
sunny_talwar

May be with two expressions and no dimension

Capture.PNG

Expression for I

=Sum(Aggr(If(FirstSortedValue(Increase, -[Date Decision Made1]) = 'I', 1), Buyer1))

Expression for D

=Sum(Aggr(If(FirstSortedValue(Increase, -[Date Decision Made1]) = 'D', 1), Buyer1))

View solution in original post

8 Replies
sunny_talwar

What is the logic behind only seeing the two yellow rows? Buyer 2 had increase and decrease in 2018, why are they not part of the required output

sijojoseph22
Creator II
Creator II
Author

Hi Sunny,

For Buyer2 there are multiple changes happened from 01/01/2018.  The filter applied is Date Decision Made >= "01/01/2018". The requirement is to take the latest position , i.e max of Date Decision Made (17/04/2018). Hence the row required will be the one highlighted in yellow.

Thanks,

Sijo

sunny_talwar

Like this?

Capture.PNG

sijojoseph22
Creator II
Creator II
Author

Thanks for that.

The problem is I don't have buyer in my dimension. The requirement want to create a pie chart with "1"  value as Increase and "1" value as Decrease.

Thanks.

sunny_talwar

May be with two expressions and no dimension

Capture.PNG

Expression for I

=Sum(Aggr(If(FirstSortedValue(Increase, -[Date Decision Made1]) = 'I', 1), Buyer1))

Expression for D

=Sum(Aggr(If(FirstSortedValue(Increase, -[Date Decision Made1]) = 'D', 1), Buyer1))

sijojoseph22
Creator II
Creator II
Author

Thanks Let me try this

sunny_talwar

Sounds good

sijojoseph22
Creator II
Creator II
Author

thanks finally it worked. Done slight changes also to suits the exact requirement.