Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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
sunny_talwar

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

Not applicable
Author

Hi Sunny,

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

sunny_talwar

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

Not applicable
Author

mm...may I have your email?

Not applicable
Author

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

balrajahlawat
Champion
Champion

Can you try with this?

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

Not applicable
Author

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

Kushal_Chawda

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'

   )


tresesco
MVP
MVP

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