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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Set Expression Help

Hi Folks ...

Here i want to show the Avg Days between collection and Bill days for three months where there is a flag for them

below is the expression i'm trying to achieve the result can some one help me to come out of this issue

avg ( aggr ( Max (

{<

tran_date={"$(=DATE(AddMonths(Max(tran_date),-2),'MMM YYYY'))"}

,fact_type={'COL'}

>}

tran_date

)

-

Max

(

{<

tran_date={"$(=DATE(AddMonths(Max(tran_date),-2),'MMM YYYY'))"}

,fact_type={'INVD'}

>}

tran_date

)

,sales_pk

))

6 Replies
sunny_talwar

trans_date is in MMM YYYY format?

kakani87
Specialist
Specialist
Author

No Sunny ...

let me show you something i found in back end

convert(numeric,datediff(day,receipt_bill_date , isnull(h.d_chq_dt, h.d_rec_date))) as receipt_age

using these two fields

receipt_bill_date and d_rec_date they calculated Receipt age

but i need to display avg of this in front end as Avg Days

d_rec_date is considered as tran_date

Here in script while fetching  h.d_rec_date as tran_date,

kakani87
Specialist
Specialist
Author

This receipt_age field can we display for three months

sunny_talwar

Not able to follow you entirely... is there a sample you can share?

kakani87
Specialist
Specialist
Author

Not Able to share the sample Sunny but some thing based on the back end Calculated field i have considered

so let me check the feedback then i can tell you clearly my issue. 

Thank you for the response

sunny_talwar

Sure thing