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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression

So I have a few measures that I would like to, I guess, merge to create a new one.  Basically I have a measure that gives total of all sales based on expression:

sum(aggr(sum(distinct(quantity*unit_price)), order_product_id)) +

SUM(aggr(sum({$<order_type={'refund'}>}distinct (refunded_product_discount_total/refunded_quantity*-1)*quantity), order_product_id))

I also have a date dimension that retrieves dates within last 60 days, with expression as follows:

if(floor([completed_date.autoCalendar.Date])>=num(today())-60 and floor([completed_date.autoCalendar.Date])<= num(today()),[completed_date.autoCalendar.Date],null())

I need to create a few of these, so any help or examples of set analysis with a time frame is appreciated.  Thanks in advance.

0 Replies