Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

create povit table using 3 dimensions and 1 metric for trend values

Hi team,

Good day

i am facing some issue on Slope values

i need to create pivot table

for that  i have 3 dimensions and one metric

3 Dimensions are







using above metric i need to create one povit table that table is drill down

when i click on state it will show country list with revenue and Slope value

when i click county it will show state with revenue and Slope value

using Trendm i create some code using that Code i am not getting exact values when i compare to my reference report

my code:

LINEST_M(aggr(sum(Revenue), Week),aggr(Week,Week))--using this code i am getting Exact Grand total values .i used for this code as  a grand total slope variable but when i am apply this code in pivot table i am getting same slope value in all dimensions

linest_m(total <[country]>aggr(sum(Revenue),[country],[Week]),Week)--using this code in pivot table i am getting exact value what i had in my reference report

but using above code i didnt get slope values when i am going dril down

like linest_m(total <[country]>aggr(sum(Revenue),[country],[Week]),Week) using this code i am getting state code but when i am going to country i am not getting exact slope values in pivot table

so i want to create linest m for dril down optation

linest_m(total <[state]>aggr(sum(Revenue),[country],[state],[Week]),[Week])


linest_m(total <[country],[state],[Week]>aggr(sum(Revenue),[country],[state],[Week]),[Week])


aggr( linest_m(aggr(sum(Revenue),[country],[state],[Week]),[Week]),[country],[state])

i tired above code in povit table but i am not getting exact slope values

can any one suggest best example for that

please refer  thread Falling Trendlines/Sales | Qlik Community