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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
cgT
Creator
Creator

Set Expression Involving Another Measure

Hello,

I'm currently trying to calculate a value based relatively on two measures:

PerformanceWeekCommencing

TransactionDate

I am unable to work out the expression that returns the sum(SoldValue) for the PerformanceWeekCommencing for transactions sold within that same week. I'm imagining something like this, which of course doesn't work:

Money(max(aggr(
sum({<TransactionDate= {'>=$WeekStart(PerformanceWeekCommencing)'}>}SoldValue),PerformanceWeekCommencing)))

Can anyone help, please?

Thank you in advance. 

Labels (1)
5 Replies
Chanty4u
MVP
MVP

Try this

sum({$<TransactionDate = {">=$(=WeekStart(PerformanceWeekCommencing))<=$(=WeekEnd(PerformanceWeekCommencing))"}>} SoldValue)

 

Kushal_Chawda

@cgT  why you have used max over sum?

cgT
Creator
Creator
Author

So I can find the largest value derived from the sum calculation.

cgT
Creator
Creator
Author

Thanks for this, but it returns only a '0'.

Kushal_Chawda

@cgT  could you prepare sample data in excel to explain the scenario?