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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

set analysis expression

hi,

i have this expression-

=Sum({<BU_Year_Quarte>={">=(num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)

it not working!!

this is working-

=Sum({<BU_Year_Quarte>={"=(num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)

whats wrong?

adi

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

create a variable

vCurrentQuarter=num(year(today())&'0'&ceil(month(Today())/3))

=Sum({<BU_Year_Quarte{">=$(=vCurrentQuarter)"}>}BudgetCurrentBook)

OR

if you have datefield in your data model then you can use

=Sum({<DateField{">=$(=QuarterStart(Today()))"}>}BudgetCurrentBook)

Hope this helps you.

Regards,

Jagan.

View solution in original post

8 Replies
francoiscave
Partner - Creator III
Partner - Creator III

Hi Adi,

The best document to manipulate Set Analysis:

Set Analysis: syntaxes, examples

By Fabrice Aunez.

It will be helpful !

François

mdmukramali
Specialist III
Specialist III

Dear,

The field name is

BU_Year_Quarte

or

BU_Year_Quarte>


If it's BU_Year_Quarte then try to use the below expression

=Sum({<BU_Year_Quarte={">=(num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)


Thanks,

Mukram

PrashantSangle

Hi,

Try like

=Sum({<BU_Year_Quarte>={">=$(=num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
adiarnon
Creator III
Creator III
Author

not working   

adiarnon
Creator III
Creator III
Author

this is working-

=Sum({<BU_Year_Quarter={"=(num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)

but i need

=Sum({<BU_Year_Quarter={">=(num(year(today())&'0'&ceil(month(Today())/3)))"}>}BudgetCurrentBook)

and its not working,,,,

this-num(year(today())&'0'&ceil(month(Today())/3)) -> 201404

and this

=Sum({<BU_Year_Quarter={">=201404"}>}BudgetCurrentBook) -is working

whats wrong?

tresesco
MVP
MVP

'=' works, because it is taken as a text/string comparison.

'=>' won't work( works actually as string comparison rather than numeric), because of non-numerical comparison.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

create a variable

vCurrentQuarter=num(year(today())&'0'&ceil(month(Today())/3))

=Sum({<BU_Year_Quarte{">=$(=vCurrentQuarter)"}>}BudgetCurrentBook)

OR

if you have datefield in your data model then you can use

=Sum({<DateField{">=$(=QuarterStart(Today()))"}>}BudgetCurrentBook)

Hope this helps you.

Regards,

Jagan.

yevgeniy
Creator
Creator

may be you helped create variable:

year(today())&'0'&ceil(month(Today())/3)

=Sum({<BU_Year_Quarter={'>=$(yourvaryable)'}>}BudgetCurrentBook)