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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Combine 2 formula's

In my dashboard i have this formula :

='Debiteuren ' & num(sum(if(Grootboek\Rubriek = '02.02.02',Grootboekmutatie\Bedrag)) /   

                         sum(if(Grootboek\Rubriek = '16.00.10',Grootboekmutatie\Bedrag*-1)),'##,#')

I select a period in my dashboard but for formula above i want all period till the selected period. I know this is te fomula for it :

=sum({< Month = {"<=$(=max(Month))"} >} Amount)

=sum({< Periode = {"<=$(=max(Periode))"} >} Amount)

Now i want combine those formula. How can i do this ? I hope someone can help me

    

Labels (1)
3 Replies
ToniKautto
Employee
Employee

You mean combine into one set expression?

Is this waht you are looking for?

=sum({< Month = {"<=$(=max(Month))", Periode = {"<=$(=max(Periode))"} >} Amount)

This will caluculate the sum of amount on the current selection, with month set to max month value and period set to max period value from within the current selection.

francisvandergr
Partner - Creator II
Partner - Creator II
Author

No this is not the answer for me. What i want is:

When someone for example select period 5 in a listbox then qv must calculate in the formula above with periode 0,1,2,3,4 and 5

ToniKautto
Employee
Employee

Not tried if the exact syntax is correct, but the principle should be something like this.

getfieldselections() - Get the selected values from the list

getselectedcount() - Get the number of selected values, the highest index is assumed to be the max value

subfield() - Find the selected value matching the max index

subfield( getfieldselections( yourfieldname, ';' ), ';', getselectedcount( yourfieldname ) )