Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
michielvandegoo
Valued Contributor

First numeric value in table

Hi, I need to find the first value in a table:

The table consists of these dimensions:

  • ProductID
  • reporting month
  • country

Fact:

  • Amount

And the values are a running sum where the first value is the start value.

I want to calculate the monthly difference which is easy but I do not get the starting value for each ProductID, reporting month etc. right. I keep on finding the first value of the total table or the last value of the previous product etc.

I tried previous functions, min(reporting month) in group by, peek etc but no luck so far.

Tags (2)
1 Solution

Accepted Solutions
gardenierbi
Contributor

Re: First numeric value in table

Did you try with FIRSTSORTEDVALUE ?

2 Replies

Re: First numeric value in table

Better to provide Sample data

Use something like below

=FirstSortedValue(Amount, -Aggr(Sum(Amount),ProductID))

Life is so rich, and we need to respect to the life !!!
gardenierbi
Contributor

Re: First numeric value in table

Did you try with FIRSTSORTEDVALUE ?

Community Browser