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

use where in expression

HI

I have a voucher_date field  and fiscal year date field

                                     

Voucher_date
01/jan/2012
01/feb/2012
01/Nov/2013
01/jan/2013
01/feb/2014


FISCAL_YEAR_DATE      OPENING_ BALNACE
01/jul/20111050000
01/Jul/20122460000
01/jul/20131500000
01/jul/20148500000

MY FISCAL YEAR START FROM JULY OF EVERY MONTH ABOVE TABLE SHOW THE OPENING BALANCE AT THE START OF

EACH FISCAL YEAR.

NOW I WANT TO SHOW THE SUM OF OPENING BALANCE IN TABLE

i.e if the user select the voucher_date let say 01/Jan/2014 which lies in fiscal year 2013-2014 so table must show

the opening balance of 2013-2014

reult

datebalnce
01/Jul/201315000000

i am using expression in table is ,

=SUM({$date(yearstart(voucher_date,0,7),'YYYY')=date(YEARSTART(FISCAL_YEAR_DATE,'YYYY'),OPENING_BALANCE)

I AM TRYING TO CONVERT BOTH DATE IN FISCAL YEAR '2013' THEN TRYING TO MATCH

ANY IDEA???

NOTE VOUCHER DATE IS IN VARIABLE.....

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

=SUM({$date(yearstart(voucher_date,0,7),'YYYY')=date(YEARSTART(FISCAL_YEAR_DATE,'YYYY'),OPENING_BALANCE)

That's not a valid QlikView expression at all :

  • The left hand side of a set modifier should be a field name, nothing else
  • The right hand side should specify a set of values surrounded by curly braces.
  • Count or balance all punctuation marks. If one of them is missing, the expression will fall apart.

Read the help on Set Analysis in QlikView Desktop, especially the topic on Set Modifiers. It's a very good and concise summary.

For a working solution to your problem, check the document in attachment.

Peter

View solution in original post

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

=SUM({$date(yearstart(voucher_date,0,7),'YYYY')=date(YEARSTART(FISCAL_YEAR_DATE,'YYYY'),OPENING_BALANCE)

That's not a valid QlikView expression at all :

  • The left hand side of a set modifier should be a field name, nothing else
  • The right hand side should specify a set of values surrounded by curly braces.
  • Count or balance all punctuation marks. If one of them is missing, the expression will fall apart.

Read the help on Set Analysis in QlikView Desktop, especially the topic on Set Modifiers. It's a very good and concise summary.

For a working solution to your problem, check the document in attachment.

Peter

Not applicable
Author

OK ...

Thanks for advice actually I am short of knowledge about the usage of braces , dollar sign, etc in set analysis I will defiantly go through you advice.

Also thanks for the solution....it perfect