Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight Table query

Hi All,

i have a qvd which have data for yesterday date and one month old date. in the straight table, i want to capture new items which are added from one month old date. In the script, i have loaded data from both the dates. and in the straight table,

Dimensions:

Item Name

Calculated Dimension as If (Date = '$(vlastmonthdate) and isnull([Item Name]), null(), [Item Name]

Expression:

only({<Daterecord={'$(=vtoday)'}>}[Item Name])

but i am not getting desired results?

please advise

thanks in advance

Sukhwant

7 Replies
Anonymous
Not applicable
Author

Hi, could you add one example of your app and expected results? Thanks!

Not applicable
Author

data in QVD
DateItem NameSales
9/15/2016abc10
9/15/2016bcd20
9/15/2016cde30
9/15/2016efg40
9/15/2016fgh5060
9/15/2016ghi50
8/15/2016abc20
8/15/2016bcd300500
8/15/2016cde230

   

Expected Result in Straight table
DateItem NameSales
9/15/2016efg40
9/15/2016fgh5060
9/15/2016ghi50
sunny_talwar

May be this:

=Sum({<[Item Name] = {"=Max(Date) = Max(TOTAL Date) and Count(DISTINCT Date) = 1"}>}Sales)


Capture.PNG

Not applicable
Author

thanks Sunny.

So for Example sake, i used 2 dates and thus i am using variables in Expression. in reality i have all 20 odd working dates data along with years data. will the above work in this case as well?

thanks

sunny_talwar

So when you have multiple dates, would you only want to see an item which never showed up before this month?

Not applicable
Author

yes . as mentioned in the original question, i want to only show new addition of items between today and last month

sunny_talwar

May be try what I have above or try this:

=Sum({<[Item Name] = {"=Max(Date) = Max(TOTAL Date) and Count(DISTINCT {<Date = {'>=$(=Date(Max(Date, 2)))'}>} Date) = 1"}>}Sales)

Make sure that you date field in the script is created like this if you use the above expression

LOAD Date(Date) as Date,

           ...

FROM ...