Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Discussion Board for collaboration related to QlikView App Development.

- Qlik Community
- :
- All Forums
- :
- QlikView App Dev
- :
- Values in a variables

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Not applicable

2015-12-28
11:27 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Values in a variables

Dear all,

Does anyone knows if it is possible to obtain in a variable a value calculated in a chart?

I have a tricky nexted aggr exprenssion in a chart combine with multiple calculated dimensions and I cannot put this computation directly in a variables. So, I must take this value and put in a variables.

I cannot use a macro because this value must be a mandatory parameter (in the same dashboard) of another chart (with different dimensions) and it can be changed with different selections during users analysis via access point.

Kind regards

Emanuele

370 Views

5 Replies

sunny_talwar

MVP

2015-12-28
11:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Do you have a sample you can share to help us understand better what exactly you are trying to do?

227 Views

Peter_Cammaert

Partner - Champion III

2015-12-28
11:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

No.

You'll probably have to duplicate your expressions (and at the same time embed your dimensions in set analysis) in a variable assignment action that is triggered whenever a user changes some particular (or any) field selections.

Peter

227 Views

Not applicable

2015-12-29
03:36 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Dear Sunny,

I Try to semplificate my case, using one dimension and two expression.

Reload: hourly.

Dimension: Day: From 1 to 31 (for example)

Exprenssion

First exp:

if(Day<Num(Day(Today()),'00'),sum( {$<YearMonth= >} CurrentValueLiq),

(linest_m(total aggr(if(sum( {$<YearMonth= >} ForecastValueLiq),sum( {$<YearMonth= >} ForecastValueLiq)),Day),Day) // Pendiente

*Day // Mes a predecir

+LINEST_B(total aggr(if(sum( {$<YearMonth= >} ForecastValueLiq),sum( {$<YearMonth= >} ForecastValueLiq)),Day),Day) //Intercepto)

// +LINEST_SEB(total aggr(if(sum(Liquidato),sum(Liquidato)),Day),Day))

))/1000000

Second exp:

if(Day<Num(Day(Today()),'00'),sum( {$<YearMonth= >} CurrentValueCar),

(linest_m(total aggr(if(sum( {$<YearMonth= >}ForecastValueCar ),sum( {$<YearMonth= >} ForecastValueCar )),Day),Day) // Pendiente

*Day // Mes a predecir

+LINEST_B(total aggr(if(sum( {$<YearMonth= >} ForecastValueCar ),sum( {$<YearMonth= >} ForecastValueCar )),Day),Day) //Intercepto)

// +LINEST_SEB(total aggr(if(sum(Liquidato),sum(Liquidato)),Day),Day))

))/1000000

where:

CurrentValueLiq: is a value day by day from the first day of the month to the last day with a consolidated value

CurrentValueCar: is a value day by day from the first day of the month to the last day with a consolidated value

ForecastValueLiq: is a previsionary value from 1 to 31;

ForecastValueCar: is a previsionary value from 1 to 31;

With this expression, I obtain the chart below:

I want to catch only the two last value and put it in a variables. In your opinion Is it possible?

Kind Regards

Emanuele

227 Views

petter

Partner - Champion III

2015-12-29
04:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

It is possible to make a variable that contains your "tricky nested aggr". What you will have to do is to further develop the expression that you have in the variable so it also includes the same logic that your dimensions does in the chart. To do that you will have to use Set Expressions and possibly $-sign expansions and maybe parameters like $1, $2. A variable in QlikView is able to act as a function due to parameters and parameter substitution.

Not applicable

2015-12-29
06:14 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Dear Petter,

Yes, I found a solution.

In this case I wrote one aggr more ( on Day ) in the variable using the expression That I wrote previously in my post , and It Seems correct.

Then I'll try with the " tricky" ones , but I think That there will be no problem , as you said

Thanks a lot

Emanuele

227 Views