Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi, could you add one example of your app and expected results? Thanks!
data in QVD | ||
Date | Item Name | Sales |
9/15/2016 | abc | 10 |
9/15/2016 | bcd | 20 |
9/15/2016 | cde | 30 |
9/15/2016 | efg | 40 |
9/15/2016 | fgh | 5060 |
9/15/2016 | ghi | 50 |
8/15/2016 | abc | 20 |
8/15/2016 | bcd | 300500 |
8/15/2016 | cde | 230 |
Expected Result in Straight table | ||
Date | Item Name | Sales |
9/15/2016 | efg | 40 |
9/15/2016 | fgh | 5060 |
9/15/2016 | ghi | 50 |
May be this:
=Sum({<[Item Name] = {"=Max(Date) = Max(TOTAL Date) and Count(DISTINCT Date) = 1"}>}Sales)
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
So when you have multiple dates, would you only want to see an item which never showed up before this month?
yes . as mentioned in the original question, i want to only show new addition of items between today and last month
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 ...