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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

How to write set analysis ?

Hi all,

How to write set analysis ?

Capture.PNG

My expression :

sum({$<TranType = {$(vAmountType)}>} Amount)

I need the sales should be calculated on current_date but the results is only displaying for trans Date 20140206 .

Thanks,

11 Replies
avinashelite

Does your data has the current date to compare ? if they add one more condition in the set analysis this

sum({$<TranType = {$(vAmountType)},current_date={$(vCurrentdate)}>} Amount)


set the variable

vCurrentdate= today()


Format the date according to your need

surendraj
Specialist
Specialist

May be this..

sum({1<current_date>}Amount)

sunny_talwar

It seems you have made selection in Trans_Date field... is that something you will be doing in your dashboard or is that by mistake? Can you share your app to look at it?

suvechha_b
Creator III
Creator III
Author

If I select one [Trans Date]  like '20140206' , I will have three current_date like 20140206 , 20150206 and 20170206.

how to do the sum of sales depending on current_date.

My expression :

sum({$<TranType = {$(vAmountType)}>} Amount)

My [Trans Date] and current_date are dynamic.

sunny_talwar

So you want to see where Trans Date = Current Date?

suvechha_b
Creator III
Creator III
Author

No , all the three urrent_date like 20140206 , 20150206 and 20170206 with three different sales value.

sunny_talwar

But you mentioned:

"how to do the sum of sales depending on current_date"

What does the above mean?

suvechha_b
Creator III
Creator III
Author

For example ,

If I select one [Trans Date]  like '20140206' ,

I will get  three current_date like 20140206 , 20150206 and 20170206

how to write the expression of getting sales.

My expression :

sum({$<TranType = {$(vAmountType)}>} Amount)

According to my expression , the results is only showing sales for [Trans Date]  and current_date '20140206'

My req :

The  sales value should change on the last two current date  in the screen shot.

Capture1.PNG

sunny_talwar

Okay, I sort of understand what you want, but have no idea about your data model and it would be difficult for me to suggest anything without looking at how things are. Would you be able to share a sample?

Preparing examples for Upload - Reduction and Data Scrambling