Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
chriscools
Creator II
Creator II

where to place "distinct" in set analysis

Hello,

Here below i have i formula to calculate the average daily sales of 2012.

i want to show it in a graph with the week as a dimension.

in the first part i use 1<> to make it independant of current selections, so allways the total year would be showing.

but in the second part i don't know where to  include it.

i would like to use set analysis instead of the if,  but i'm not sure where to place the distinct then...

could someone advise me?

thanx!!!

sum  ({1<Shop= {'Pomax Store Wijnegem'}, Year = {'2012'}   >} LineSalesAmount) / count ( distinct if ( Shop='Pomax Store Wijnegem',  Date))

chris

1 Solution

Accepted Solutions
Not applicable

Hi, see if this helps:

http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=

Maybe something like this:

Count({1<Date=P({1<Shop={$(='Pomax Store Wijnegem')}>}Date)>}Date)


Select records in "Date" but only for those records matching the condition [equal to "'Pomax Store Wijnegem'"] in field "Shop"


View solution in original post

2 Replies
Not applicable

Hi, see if this helps:

http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=

Maybe something like this:

Count({1<Date=P({1<Shop={$(='Pomax Store Wijnegem')}>}Date)>}Date)


Select records in "Date" but only for those records matching the condition [equal to "'Pomax Store Wijnegem'"] in field "Shop"


Not applicable