Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
please let me know how to show all selected values in a Stright Table report. I've done an application, which will be displayed customers different dates in total. There is Selection list (load * inline SelectionList) where the user can select periods. The user should be able to select all periods in Selection list (1-5). Now my application works fine if select only one SelectionPeriod.
SelectionList:
LOAD * INLINE [
SelectPeriod
1. Status1 (Today - 243)
2. Status2 (Today - 487)
3. Status3 (Today - 730)
4. Status4 (Today - 1095)
5. Status5 (Today - 1460)
];
This is the Straight Table Expressions:
=If(WildMatch(SelectPeriod, '*1.*'),
Sum(Aggr(Sum(DISTINCT(IF(TransactionDate <= (Today()-1) and Today()- 243<= (TransactionDate), BeingInStatus))), CustomerID)),
If(WildMatch(SelectPeriod, '*2.*'),
Sum(Aggr(Sum(DISTINCT(IF(TransactionDate <= (Today()-1) and Today()- 487<= (TransactionDate), BeingInStatus))), CustomerID)),
If(WildMatch(SelectPeriod, '*3.*'),
Sum(Aggr(Sum(DISTINCT(IF(TransactionDate <= (Today()-1) and Today()- 730<= (TransactionDate), BeingInStatus))), CustomerID)),
If(WildMatch(SelectPeriod, '*4.*'),
Sum(Aggr(Sum(DISTINCT(IF(TransactionDate <= (Today()-1) and Today()- 1095<= (TransactionDate), BeingInStatus))), CustomerID)),
If(WildMatch(SelectPeriod, '*5.*'),
Sum(Aggr(Sum(DISTINCT(IF(TransactionDate <= (Today()-1) and Today()- 1460<= (TransactionDate), BeingInStatus))), CustomerID)),
0)))))
The result should be like this (if select all SelectionPeriods):
CustomerID | Status | BeingInStatus |
5600030061 | 1 | 210 |
5600030061 | 2 | 352 |
5600030061 | 3 | 608 |
5600030061 | 4 | 1 058 |
Arto, I am not a very good developer, so I may be way off here, but I think the following Design Blog post may provide a potentially better way to do things:
https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130
If you want want to search around the blog area further on your own, use the following link:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Hopefully this will help you get things on a track that will work for you. My post will also kick things back up in the list, so someone else may have a read again and offer up something else too. I realized the other thing may be the need for a Master Calendar, so here is the link to that post too:
https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527
Regards,
Brett
Regards,
Brett