Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

martin_hamilton
Contributor

expression not working in sense

Hi - I am looking to port from qlikview to qliksense but a formula doesnt seem to be working.

I have a variable contained within the expression:

vCurrentMonth which has the following expression : MonthName(Today(1))

I have inserted the expression within a text box and its working as expected but within the following its not pulling the relevant data.

Sum({<Invoice_Month={'$(vCurrentMonth)'}>}Subs_Invoice_Amount)

The expression is working in qlikview but not sense.

thanks

Martin

1 Solution

Accepted Solutions
OmarBenSalem
Esteemed Contributor

Re: expression not working in sense

It's working for me :

Capture.PNG

6 Replies
OmarBenSalem
Esteemed Contributor

Re: expression not working in sense

Where is it calculated? In the script?

If it's in the script, this should work since it's calculated with a '=',

If it's not in the script add a '=' to your variable.

=MonthName(Today(1)) instead of MonthName(Today(1))


Or, keep it without a '=' and add it when you call the variable:

Sum({<Invoice_Month={"$(=vCurrentMonth)"}>}Subs_Invoice_Amount)

Re: expression not working in sense

Hi,

Make sure that you have '=' sign before the variable definition.

So the variable should hold. "=MonthName(Today(1))"

Regards,

Kaushik Solanki

martin_hamilton
Contributor

Re: expression not working in sense

This is calculated in the front end and still doesnt work when i make the changes.

Would it be different when using qliksense? as this works fine in qlikview?

thanks

Martin

OmarBenSalem
Esteemed Contributor

Re: expression not working in sense

Can you please share a sample app? with this? To diretly test on it?

Thanks

martin_hamilton
Contributor

Re: expression not working in sense

Heres a sample app with data loaded.

Thanks

Martin

OmarBenSalem
Esteemed Contributor

Re: expression not working in sense

It's working for me :

Capture.PNG

Community Browser