Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mgomezlor
New Contributor III

Return field from one calculated in chart

Hello,


I have a simple table with the program field, the date and the difference in months between the date of each program and the date filtered in the reporting end date. On the other hand I have an inline that returns, depending on the difference in months calculated in the table, its time factor.

I need to take the time factor for each program and I have tried with only ({<N_MONTHS = {$ (vDifDates)}>} N_TIME_FACTOR) and IF but it does not return the Time Factor corresponding to each program.



This is the table that sh
ould exit for Reporting End Date without any filtered date (today by default)

PROGRAMDATEDif dateTime Factor
P12015-01-01373
P22015-07-21303
P32015-12-25253
P42016-06-18203
P52017-03-15112
P62017-04-10102
P72018-10-31-90
P82018-11-04-90




Thank you very much in advance.

1 Solution

Accepted Solutions

Re: Return field from one calculated in chart

Set analysis isn't going to work... but if can...

Sum(If(N_MONTHS = $(vDifDates), N_TIME_FACTOR))


Capture.PNG

9 Replies
zebhashmi
Valued Contributor

Re: Return field from one calculated in chart

I think you need to use apply map in script

mgomezlor
New Contributor III

Re: Return field from one calculated in chart

That is not valid because I need the difference between the dates depending on the user selection in filter reporting end date

zebhashmi
Valued Contributor

Re: Return field from one calculated in chart

something like that

I am trying to change 4 as column value but it is giving me error try on your own

=FieldValue('N_TIME_FACTOR',fieldindex('N_MONTHS','4'))

JustinDallas
Valued Contributor II

Re: Return field from one calculated in chart

I'm confused about your goal.

Digvijay_Singh
Honored Contributor III

Re: Return field from one calculated in chart

Your Island table(having N_MONTHS) and PROGRAM table are not associated in data model so I think it is not possible to Time factor in your current chart. On what basis chart dimensions (PROGRAM,DATE) will link to the values of Time factor/N_MONTHS without any association.

You may need to think of change in data model.

Histalwar1‌ , Do you think its possible to show columns from un-associated table thru set analysis, could be a new learning for me if its possible.

Re: Return field from one calculated in chart

Set analysis isn't going to work... but if can...

Sum(If(N_MONTHS = $(vDifDates), N_TIME_FACTOR))


Capture.PNG

mgomezlor
New Contributor III

Re: Return field from one calculated in chart

That´s perfect !!.Thank you Sunny Talwar

Digvijay_Singh
Honored Contributor III

Re: Return field from one calculated in chart

Great!

zebhashmi
Valued Contributor

Re: Return field from one calculated in chart

wow

Community Browser