Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

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.

1 Solution

Accepted Solutions
gardenierbi
Creator II
Creator II

Did you try with FIRSTSORTEDVALUE ?

View solution in original post

2 Replies
Anil_Babu_Samineni

Better to provide Sample data

Use something like below

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
gardenierbi
Creator II
Creator II

Did you try with FIRSTSORTEDVALUE ?