Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate link relative ratio?

Dear all,

I have a table named test_tb with structure below: ID, Supplier, Trade_name, Price, Date(8 string format such as 20080104,not in data format)

I want to calculate link relative ratio monthly. such as sum(price) of Oct is $100 , and Nov is $80, then the result will be (80-100)/100=-20%

I use expression Sum ({$<year={$(max_year)},month={11}>}price)-Sum ({$<year={$(max_year)},month={10}>}priceSum ({$<year={$(max_year)},month={10}>}price)) for 1 month.

Now I want to calculate 12months' link relative ratio? How can I do this? It's difficult to get Jan's data,because it will campare with Dec. of last year.

1 Reply
Miguel_Angel_Baeyens

Hello,

Depending on how you have drawed your chart, it can be done using inter-record functions. Say that dimension is Client and Month, and that Month is pivoted to the top, so for each client you see the twelve months of this year. Then, create a new expression with

Sum(price)


And label it as "Monthly". To get what you want, you may use as expression

([Monthly] - before([Monthly])) / before([Monthly])


Hope that helps.