Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert to set analysis

can anybody convert this expression to set analysis??

if(if(WeekDay(row_date)='Mon',row_date-2,row_date-1),agentacdcalls)

7 Replies
robert_mika
Master III
Master III

Could you post the data behind this task?

sunny_talwar

I understand your first if statement here If(WeekDay(row_date) = 'Mon', row_date-2, row_date-1. But what exactly is your first if statement checking for??? If(If(WeekDay(row_date) = 'Mon', row_date-2, row_date-1) >=<???

Please clarify.

Best,

S

Anonymous
Not applicable
Author

actually am looking for previous day data, if Monday comes am getting Sunday data but instead of Sunday i need Friday data...

how can we write set analysis for above requirement??

AbhijitBansode
Specialist
Specialist

assign a numeric counter to your date column say.PeriodID

Now, if(WeekDay(row_date)='Mon',

               sum({"$(=max(PeriodID)-2)"}MetricField),

                sum({"$(=max(PeriodID))"}MetricField),

          )

timanshu
Creator III
Creator III

But why you want this expression in set analysis, as if that expression is working for you ??

Anonymous
Not applicable
Author

Unless i select the date filter i want display default last working date data...

timanshu
Creator III
Creator III

I think you can sort the Data by Date and  use previous function to  get the last working day , as previous record will be the last working day. And you can exclude the functionality on any Date Selection.

Can you attach your app , So that I can apply functionality on that.