Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I have a problem with summary by date, I have data like this
expression column NetAmt:
if(date=Date_target,Sum(netamt),'')
I want to find Netamt total according to column Date Omset
Since its not in this same table , you can use exists function to check the date and create the flag in similar way .
Step1 :
Table1:
Load Date1 from table1 ;
Fact table :
Load Date2 , if (exists (Date1 ,Date2), 'Y', 'N') as Date_check from Fact table ;
Just make sure the date formats are same in the both the fields . otherwise , you can convert in number format and then compare .
Step2 :
use the same expression .
let me know if it does not work .
Note : you can achieve it in front end without creating the date_check , like you did using the if statement .
its good to use set analysis in expression and avoid If statement .
BR ,
Saurabh
Hi ,
If you have both the date fields i.e. date and Date omset in the same table then you can create a flag as below
If(date = Date omset , 'Y', 'N') as Date_check
And use this field to filter out the data in the expression .
Expression:
Sum({<Date_check = {'Y'}>}netamt).
Hope it helps .
BR,
Saurabh
date_omset and date_target are different tables,
i try expression like this : Sum(distinct netamt)
but the first line appears data_omset out of 3-7-2018 & 2-6-2018
line 2 & 3 is correct
Since its not in this same table , you can use exists function to check the date and create the flag in similar way .
Step1 :
Table1:
Load Date1 from table1 ;
Fact table :
Load Date2 , if (exists (Date1 ,Date2), 'Y', 'N') as Date_check from Fact table ;
Just make sure the date formats are same in the both the fields . otherwise , you can convert in number format and then compare .
Step2 :
use the same expression .
let me know if it does not work .
Note : you can achieve it in front end without creating the date_check , like you did using the if statement .
its good to use set analysis in expression and avoid If statement .
BR ,
Saurabh