Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
LeHaoNguyen
Contributor III
Contributor III

Calculated Dimension not working

Hi,

i try to build a calculated Dimension in a pivot table where it only show me the values that got an entry yesterday. I came up with this expression but somehow it doesnt work:

IF({<[Eintragsdatum.autoCalendar.Date]={"$(=Date(Today()-1, 'DD.MM.YYYY'))"}>},Dokumentenbarcode,'Rest')

someone got an idea why it doesnt work that way? it says invalid dimension

2 Replies
tresesco
MVP
MVP

You are using set analysis, and that can be used only in an aggregation function. IF is not an aggregation function, hence the error. Instead, you could try something like:

IF([Eintragsdatum.autoCalendar.Date]=$(Date(Today()-1, 'DD.MM.YYYY')),
Dokumentenbarcode,'Rest')
LeHaoNguyen
Contributor III
Contributor III
Author

 

IF([Eintragsdatum.autoCalendar.Date]=Date(Today()-1, 'DD.MM.YYYY'),Dokumentenbarcode,'Rest')

this kinda works but now i got another problem this should be the list of Dokumentenbarcodes which have an entry yesterday but now i want to do a count on these Dokumentenbarcodes and show the number of entries for each Dokumentenbarcodes in the List so it shhould look like this:

Dokumentbarcode       Number of Days

1234                                     3

4321                                     7

So there are 3 entries of 1234 and 7 entries with 4321 in my table and both have an entry yesterday but also 2days ago and 3days ago because every day it writes the Dokumentenbarcodes into the Table. but with my described dimension at the top it will show

Dokumentbarcode       Number of Days

Rest                                      8

1234                                     1

4321                                     1

so it puts the entries that are not from yesterday into rest but i want to count them up as normally and just take the list of Dokumentbarcodes from yesterday