Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trend line for specific KPI's

Hello Everyone,

my requirement is to show trend line(Line chart) for KPI 2015,2016,2017 when i select 2017 & when i select Year 2018 then it will be trend for KPI 2016,2017,2018.

I am not getting how to write expression, Please help me to find solution.

Thanks.

7 Replies
adityaakshaya
Creator III
Creator III

Hi Prachi,

Attached application can help you to get your desired output. In this scenario, you need use calculated dimension and within expression, you have to use {1} so that you can get the values irrespective of selection

Regards,

Akshaya

Anonymous
Not applicable
Author

sorry but i can't share file.

adityaakshaya
Creator III
Creator III

Hey Prachi,

I am tried to replicate it in test file and shared that with you .You can refer the scenario which you asked for.

Regards,

Akshaya

stabben23
Partner - Master
Partner - Master

Hi prachi,

is Your KPI listbox an dataisland, ex inline table that is not Connected to the datamodel?

Anonymous
Not applicable
Author

Please share screen shot. i am not able to open.

adityaakshaya
Creator III
Creator III

Hi Prachi,

I use inline data load

LOAD * INLINE [

    Year, Value

    2015, 2

    2015, 1

    2015, 2

    2015, 2

    2015, 1

    2016, 2

    2016, 4

    2016, 3

    2016, 2

    2016, 1

    2016, 1

    2016, 2

    2017, 1

    2017, 1

    2017, 2

    2017, 2

    2017, 2

    2017, 2

    2017, 2

    2017, 2

    2017, 2

    2017, 1

    2017, 1

    2017, 1

    2018, 1

    2018, 1

    2018, 2

    2018, 2

    2018, 2

    2018, 1

    2018, 1

    2018, 1

    2018, 2

    2018, 1

    2018, 1

    2018, 1

    2018, 1

    2018, 2

    2018, 2

];

In Dimension, I use calculated dimension -

=If(Year>Year(AddYears(MakeDate(GetFieldSelections(Year),1,1),-3)) and Year<=GetFieldSelections(Year),Year)


Expression

sum({1}Value)

Anonymous
Not applicable
Author

You haven't used KPI in calculated dimension