Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, again, friends!
Yesterday i ask you to (Help with expression)
I simplified condition - now i need to take sum of sales on this: BVRPBEDVTZ >= VTRBEGDVTR + 1 year.
And now it looks like this:
Sum(
{<
t35PRDWAER = {'RUB'},
BVRPBEDVTZ = {>=$(AddYears(VTRBEGDVTR,1))}
>}
DECNRPRDEC)
But it still doesn't work , AddYears() function is become gray in code
Please, someone help me
Example in attach
i decided to make new field Flag which contains when payment make
so now i need to thing how to divide this two sum(sales) into 2 KPI in qlik sense: first year payments and next years
upd: and i find the decision
i use
1. Sum({<t35PRDWAER = {'RUB'}, FlagYearPayment = {'next'}>} DECNRPRDEC) for next years payments
2. Sum({<t35PRDWAER = {'RUB'}, FlagYearPayment = {'first'}>} DECNRPRDEC) for first year payments
still search for decision un expressions in qlik sense...
Hi Vasiliy,
I think you should add your script to compare BVRPBEDVTZ and VTRBEGDVTR then you can add it to your set analysis.
If you want to get result
Sum(
{<
t35PRDWAER = {'RUB'},
BVRPBEDVTZ = {>=$(Date(AddYears(max(VTRBEGDVTR),1),'YYYY-MM-DD'))}
>}
DECNRPRDEC)
The value of your set analysis won't return 1 single value so BVRPBEDVTZ return nothing, that's why i adding max so i get 1 single value.
Regards,
Marco
sure i compare this dates now is ssms
i decided to make new field Flag which contains when payment make
so now i need to thing how to divide this two sum(sales) into 2 KPI in qlik sense: first year payments and next years
upd: and i find the decision
i use
1. Sum({<t35PRDWAER = {'RUB'}, FlagYearPayment = {'next'}>} DECNRPRDEC) for next years payments
2. Sum({<t35PRDWAER = {'RUB'}, FlagYearPayment = {'first'}>} DECNRPRDEC) for first year payments
still search for decision un expressions in qlik sense...
Hey, Marco! Youк thoughts about compare this 2 fields with dates hepls me to find the right solution! Cheers!
Hi Vasiliy,
Cheers!
It's better to compare on script level and it's easier rather than we search how set analysis works.
Regards
Marco