Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have requirement where I need to show one day before data for switzerland country and today's data for other countries in a straight table.
The straight table will have columns as Country, Expr1, Expr2.
In that, the value for Expr1 & Expr2 for the country switzerland should show today()-1 and for other countries the values should be for today.
Kindly let me know your ideas on this.
Thanks,
Leni Balakrishnan
What I just gave you should take care of that. If you're seeing something different, you're going to need to post a .qvw file: Preparing examples for Upload - Reduction and Data Scrambling
Leni
Assuming you have in your load script these fields :
Date
Country
Then why not in your load script create a derived fields of say [ReportDate], maybe with a script line like this :
if ( [Country = 'Switzerland' , date( [Date] -1 ) , date( [Date] ) ) as [ReportDate]
Then in your dashboard object simply use [ReportDate] instead of [Date].
Best Regards, Bill
I tried with the sample but it is not working. I have attached the sample qvw file with this.
See the attached file.
In your load script I changed this line:
if(Content = 'B', Date((Date(Date,'YYYY-MM-DD')-1),'YYYY-MM-DD'),Date(Date,'YYYY-MM-DD')) as ReportDate
to
if(Content = 'B', Date((Date(Date,'YYYY-MM-DD')+1),'YYYY-MM-DD'),Date(Date,'YYYY-MM-DD')) as ReportDate
Then for the expression on the chart, I used:
sum({<ReportDate={"$(=date(max(ReportDate),'YYYY-MM-DD'))"}>}Value)