Skip to main content
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Set analysis for trend calculation over time


I have a measure that calculates a weighted average as such:




So it calculates the weighted averages of the different channels and aggregates the results according to the company.

The variables are calculated as following:


(sum({<NPSPlus={1}, [Channel1]={1}>}[NPS_count])
sum({<[NPSMinus]={1}, [Channel1]={1}>}[NPS_count]))


I should now have a measure for a line chart showing trend over time with at least month, quarter and year and it should work with the company and channel selections that the users can make freely. The default is 5/5 companies, but you should be able to select any combinations freely. Same with the different channels. The channels have different weights and all 5 companies can select them for themselves and the ChannelWeight is in the data model correct for each company/channel combination.

So my problem is, that I am unsure what to use in my set analysis. There is a master calendar in the app with a key value plus: year, quarter, month selections.

Labels (1)
2 Replies

Is the date range of the trend limited by anything other than user selections?  If not, just make the chart dimension the desired calendar field.  You might use a variable picker drop-down (see bundled extensions) to let the user pick Year|Quarter|Month and populate the variable with the appropriate dimension field name.  Then use the variable in the chart dimension.

Contributor II
Contributor II

Thank you for the reply! However, the trend line shows incorrectly. The values do not match when users make selections. For example, the user selects last month for only one of  the companies and the value on the trend is fine. When more than one company or more than one month is selected, the values on the trend line are not correct.