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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jdean1012
Contributor III
Contributor III

Trend Line WITH Set Analysis

I have a functional Trend line as follows:

linest_m(total aggr(avg([Fare]),[Booking Date]),[Booking Date])*[Booking Date] +
linest_b(total aggr(avg([Fare]),[Booking Date]),[Booking Date])

I'd like to restrict the Trend line measure to [Domestic/International] = 'Domestic'.  But, I cannot seem to quite work out the syntax.

Has anyone done this before?

THANKS

Labels (2)
1 Reply
Anil_Babu_Samineni

Perhaps this?

linest_m(total aggr(avg({<[Domestic/International] = {'Domestic'}>} [Fare]),[Booking Date]),[Booking Date])*[Booking Date] +linest_b(total aggr(avg({<[Domestic/International] = {'Domestic'}>} [Fare]),[Booking Date]),[Booking Date])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful