Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have two fields in my database Updatedon date and invoice date.
First of all I need to count record as per updatedon date and if updatedon date not exists records as per count invoice date
I want to count all records in retail for respective month and year based on current selection month and year,
Can you please suggest at code level what modifications are required for this.
Thanks
If you have both dates in the same table you may create additional field calculated from those dates during reload.
Simple:
if(isnull(UpdatedonDate), InvoiceDate, UpdatedonDate) as CountDate,
and then you will count on this CountDate.
You may also do similiar thing on the fly, using calculated dimension.
About IsCancelled flag='0' - use set analysis...
count({<IsCancelled={0}>}value)
regards
Darek
Deepak,
You are talking about modifications. Please share the application you want to modify...
regards
Darek
Hi Dariusz,
As application is too huge not able to share.
Can you please suggest how to count record in above mentioned case.
Thanks
It is difficult for me to answer your question if i cant see application, data model etc.
I uderstand, that in your qlikview table you have those data fields.
Having regard to the selection of the user you want to count the number of records in which at least one of these dates there? or maybe you want to count records with a specific first date as a first indicator and records that do not have a first date but they have other as yet another indicator?
Please describe in more detail at least your expectations. And the best Annex section of the application or .xls with sample data or anything that will allow clearly read your needs ...
regards
Darek
Hi Dariusz,
I want to count first updatedon date and when updated on date is null then count as per invoice date.
Moreover there is also a flag field while counting I have to count all fields where IsCancelled flag='0'
Thanks,
And you have those fields in the same table?
Yes I have same fields in same table.
Hi,
When I read your discussion, I understand that you want to count Updated_On_Date
if it is null then you are counting invoice date.
Try this,
Create a flag field in your script as
if(isnull(Updated_On_Date),'true','false') as updated_On_Date_Flag;
Then In your chart write set analysis.
Like,
if(updated_On_Date_Flag="true",count({<updated_On_Date_Flag={"true"}>}Updated_On_Date),count(invoice_date))
Regards,
If you have both dates in the same table you may create additional field calculated from those dates during reload.
Simple:
if(isnull(UpdatedonDate), InvoiceDate, UpdatedonDate) as CountDate,
and then you will count on this CountDate.
You may also do similiar thing on the fly, using calculated dimension.
About IsCancelled flag='0' - use set analysis...
count({<IsCancelled={0}>}value)
regards
Darek
Hi Dariusz,
Can you pleasetell me what would be final expression I am still getting error.
Thanks