Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
bobby_chowdary
New Contributor III

Total function functionality in linest m function

Hi Team,

-->can we use variable in  in total<> Expression

like :total<$(zCyclic1)>

-->if it is possible then how can i implement in my bellow logic

linest_m(total <$(zCyclic1)> aggr($(mtotalpeople),$(zCyclic1),[Date]),[Date]),

----here $(zCyclic1) contains india--

---$(zCyclic1) --it contains country's list --depend upon users selection country will be change

if the above implementation is not possible then could you please provide different code for same calculation of linest_m

Regards,

Bobby.

12 Replies
MVP
MVP

Re: Total function functionality in linest m function

You should be able to use a field name list with the TOTAL qualifier, but not a field value list.

bobby_chowdary
New Contributor III

Re: Total function functionality in linest m function

Hay swuehl,

i agree that one

Old code is :

linest_m(total <india> aggr($(mtotalpeople),india,[Date]),[Date]),


but i need to implement  like below:

linest_m(total <$(zCyclic1)> aggr($(mtotalpeople),$(zCyclic1),[Date]),[Date]),


is it possible?


not possible can we have any similar functions like above one?(Linest m)


Regards,

Bobby



MVP
MVP

Re: Total function functionality in linest m function

In general, the dollar sign expansion is just a text replacement before the expression even gets evaluated.

So if the DSE is exactely just replaced with india, this should work well.

bobby_chowdary
New Contributor III

Re: Total function functionality in linest m function

Hi Swuehl,

i tired my self since last few days but til now i didn"t get any solution

please look the attached qvw file.

in that i mention my requirement as well as sample data

please look on that and

kind regards,

Bobby

MVP
MVP

Re: Total function functionality in linest m function

Are you sure this is the right sample QVW?

I can't see any dimension groups in your application.

bobby_chowdary
New Contributor III

Re: Total function functionality in linest m function

Hi

MVP
MVP

Re: Total function functionality in linest m function

You can use  GetCurrentField( DimensionGroup ) to retrieve the current active field from your dimension group.

I created a variable to do this vDimGroup1.

Then replace your hard coded dimensions in the linest_m total and aggr() with that variable, as I've done for the first table.

Second table should be quite analogue.

bobby_chowdary
New Contributor III

Re: Total function functionality in linest m function

hi

and

-->dimensionality level2,3 issues i mentioned in QVW file



let me know if you need more information on this


regards,

bob

bobby_chowdary
New Contributor III

Re: Total function functionality in linest m function

hi