Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

set analysis. By MonthName. dateSet={'Dec 2015'} ok, but dateSet={"$(=MonthName(MAX(dateSet))) is not

Just like what the title said...

NUM(   Sum( {$<QUANTITY_UM={"CTN"},Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"}, dateSet={'Dec 2015'}>}[Ordered Qty]/CONVERSION_QTY),

         '###,###.00'

   )    , this one works. But when I tried to do something like the one below, It doesn't work.

 

 

NUM(   Sum( {$<QUANTITY_UM={"CTN"},Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"}, dateSet={"$(=MonthName(MAX(dateSet)))"}>}[Ordered Qty]/CONVERSION_QTY),

         '###,###.00'

   )

I have tried showing MonthName(MAX(dateSet)) in a column, and the result's format is similar to 'Dec 2015'. Any idea how to make this work Qlikers?

1 Solution

Accepted Solutions
Highlighted

I don't see why it doesn't work assuming =MonthName(MAX(dateSet)) = 'Dec 2015' in a text box object. Would you be able to share a sample?

View solution in original post

13 Replies
Highlighted

dateSet is text or DateField? Seems like it is text. How is it getting created in the script?

Highlighted
Not applicable

Hi Sunny,

It's you again!
In the load editor, dateSet is created by this " MonthName(Date("Received Date", 'DD-MM-YYYY')) as dateSet,"

Highlighted

I don't see why it doesn't work assuming =MonthName(MAX(dateSet)) = 'Dec 2015' in a text box object. Would you be able to share a sample?

View solution in original post

Highlighted
Not applicable

mm...may I have your email?

Highlighted
Not applicable

can't sent to you privately. Not sure where to find your email.

Highlighted
Champion
Champion

Can you try with this?

dateSet={"$(=MonthName(date(MAX(dateSet),'DD-MM-YYYY')))"}

Highlighted
Not applicable

tried this too. no luck. The result would return 0.00.

Highlighted
MVP
MVP

if you have created the dateSet as

MonthName(Date("Received Date", 'DD-MM-YYYY')) as dateSet then below should work


Considering you have data of Jan 2016


NUM(   Sum( {$<QUANTITY_UM={"CTN"},Inventory_Date={"$(=DATE(MAX(Inventory_Date), 'DD/MM/YYYY'))"}, dateSet={"$(=MonthName(addmonths(MAX(dateSet),-1)))"}>}[Ordered Qty]/CONVERSION_QTY)

         '###,###.00'

   )


Highlighted
MVP
MVP

See, if this helps you attach a sample: Preparing examples for Upload - Reduction and Data Scrambling