Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

Filter on rows in straight table - Qlik Sense

Hi There

I have created Qlik Sense App. I am using straight table and some filters to see data. In my straight table i have dimensions , measures and date field called Maturity Date. 

I want to create filed name called  "Days to Maturity" (integer number 1,2 ... to 30 ).

When user selects any value in "Days to Maturity" (integer number 1,2 ... to 30 ). the data in straight table should change.


i.e data in straight table should show between maturity date + "Days to Maturity"


e.g If Maturity Date is 8/14/2018

       Days to Maturity = 5  

   Straight table should show data of dates 8/14/2018,8/15/2018 , 8/16/2018 ,8/15/2018 ,8/16/2018.


any suggestions how to achieve this?


thanks in advance. 

4 Replies
tomasz_tru
Specialist
Specialist

Is it possible to create flag in the script?

Tomasz

juraj_misina
Luminary Alumni
Luminary Alumni

What you need is The As-Of Table

ashishpalkar
Creator III
Creator III
Author

This is my script

Data:

LOAD

    "ACCOUNT ID",

    "ACCOUNT NAME",  // Report Filter

    "BUSINESS UNIT",    // Report Filter

    "MATURITY DATE",

    "SECURITY ID",

    "INSTRUMENT ID",

    "SECUIRTY NAME",

    InstrumentTypeTier2,

    "Rate",

    Quantity,

    "MARKET VALUE",

    COST,

    "ACCRUED INTEREST",

    PERCENT_of_PORTFOLIO,

    BusinessDate,      // Report Filter

    ExpiryDate   

FROM [lib://$(QVDPath)/Maturity_QVD.qvd]

(qvd);

In report I am using following filters  ->>>>

    "ACCOUNT NAME",  // Report Filter

    "BUSINESS UNIT",    // Report Filter

    BusinessDate,      // Report Filter

    Days To Maturity // Integer Value

Straight table is showing following fields, where maturity date should changes as per Days to maturity and Business Date Selection ->>>>

    "ACCOUNT ID",

    "MATURITY DATE",

    "SECURITY ID",

    "INSTRUMENT ID",

    "SECUIRTY NAME",

    InstrumentTypeTier2,

    "Rate",

    Quantity,

    "MARKET VALUE",

    COST,

    "ACCRUED INTEREST",

    PERCENT_of_PORTFOLIO,

marinadorcassio1
Partner - Creator
Partner - Creator

Hi,

I think the approach is not the best, but not sure I understand what you want to do.


Why don't you just :

- Create a field [End Date], which is [Maturity Date] + [Days to Maturity]


and then, in you straight table, add columns : [Maturity Date], [Days to Maturity] and [End Date], and allow users to filter on theses dates.

Hope it helps anyway,

Good luck,

Marina