Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

the last actual value via set expression

Hi Folk,

i got a Question regarding set Expression,

my environment does look like:

Year, Month, Sales

2019, Jan, 2

2019, Feb, 4

2019, Mrz, 6

2019, Apr, 8

my issue is, to create 2 columns where i have:  1-cumul.value and 2- column: depend on Selektion allways the value of last month from my selektion (i mean: if i select Jan, Feb, Mrz so i want to see the  value of the Month: Mrz = 6)

1- Column: i create the simple Expression: RangeSum(Above( Total Sum(Sales),0,Rowno(Total))) 

2 - Colum: here i have some Problems (if i select the months: jan, feb, mrz) so i see only the value of apr. my issue is , to Show only the last month from the selection.

 

Does anybody have any idea?

Thanks a lot

Labels (1)
5 Replies
saminea_ANZ
Creator
Creator

Perhaps this?

If(GetSelectedCount(Month)>0, RangeSum(Above(Total Sum({<Month={$(=Max(Month))}>} Sales),0,Rowno(Total))), RangeSum(Above( Total Sum(Sales),0,Rowno(Total))))

beck_bakytbek
Master
Master
Author

Hi Saminea,

thanks a lot for your Feedback, but it does not work, if i select the value, it Shows me only the cumul.value

saminea_ANZ
Creator
Creator

I don't see any wrong in the expression of my measure.

What is this do. If you select one or more than one month it will display Max Month of cumulative data else show all data as per dimension.

beck_bakytbek
Master
Master
Author

Hi Saminea,

 my issue is, if i select the 3 Month: Jan, Feb, Mrz, so i want see only the value of Month: Mrz (non cumulative, as normal)

beck_bakytbek
Master
Master
Author

Hi Saminea,

another Question, i found the solution, i can solve my issue by using of Expression: 

Sum({<MonthID = {"$(=max(MonthID))"}>}Sales)

What is best way to build the MonthID on base of Month? i create in script an additional field: Recno() as MonthID, do you have any idea how to create the Field: MonthID by another way?