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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis using more than one condition

I have the following fields

1. Date

2. Entry type

3. Customer type

4. Amount

i want the sum of Amount where entry type =0, Customer Type = Third party and amount should be YTD.

i also want the above forMTD.

if select June, it should be jan to Jun and for the month of June with the above conditions.

4 Replies
PrashantSangle

Hi,

Try like

YTD=

Sum({<Customer_Type={"Third party"},Entry_type={"0"},Date={">$(=date(Yearstart(max(date))))<=(date(max(date)))"}>}Amount)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

it is not working.

alkesh_sharma
Creator III
Creator III

Make two variables, for Max of date and Year start and use the following expression:

Variable YearStart = YearStart(Date#(Max(Date));

Variable MaxDate =  Date#(Max(Date))

Hi,

Try like

YTD=Sum({<Customer_Type={"Third party"},Entry_type={"0"},Date={">$(YeartStart)<=(MaxDate)"}>}Amount)

Not applicable
Author

Thanks a lot.

but i want both YTD and MTD.

When i select a month, it is showing only for that month.

how do i get data for both YTD and MTD.

please help.