Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the below expression:
sum({<[Process Date]={"$(=date(max([Process Date])-1,'MM/DD/YYYY'))"}>}[Sales Posting Amount USD])
for previous day calculation. But I get 0. Please tell me what wrong in it.
my [Process Date] format is MM/DD/YYYY
I have modified my code and chart functions and have attached it for reference.
Please help me.
make sure that you date format is set as
SET DateFormat='MM/DD/YYYY';
I have set the variables:
SET DateFormat='MM/DD/YYYY';
SET TimestampFormat='MM/DD/YYYY';
but it is not working for me.
Any suggestions?
Hi, Sandip Ghosh.
Try:
sum({<[Process Date]={"=$(date(max([Process Date])-1,'MM/DD/YYYY'))"}>}[Sales Posting Amount USD])
Hope this helps!
Try with this first
sum({<[Process Date]={'$(=date(max([Process Date]),'MM/DD/YYYY'))'}>}[Sales Posting Amount USD])
Hi,
It is not working. Please can you try in a QVW file for practical use.
Thanks,
Sandip
are you sure, you're using dual() dates?!?
if not, try:
sum({<[Process Date]={"$(=date(max(date#([Process Date],'MM/DD/YYYY'))-1,'MM/DD/YYYY'))"}>}[Sales Posting Amount USD])
For me it is working
Inline memory example i used
LOAD * Inline [
Process Date, Sales
01-01-2017, 10
01-02-2017, 10
01-03-2017, 10
01-04-2017, 10
];
Current month
sum({<[Process Date]={'$(=date(max([Process Date])))'}>}[Sales Posting Amount USD])
For Previous Month
Sum({<[Process Date] = {'$(=AddMonths(Date(Max([Process Date])),-1))'}>}Sales)
Hi,
It seems that it only shows the sales based on maximum date and it's previous date. But I want to show the sales for each date and beside it , I need to show the previous date's sales.
So I am attaching you the ample data for it.
I have seen attachment, Can you help me to understand the fields you are talking about
What are these fields on your excel --- [Process Date], [Sales Posting Amount USD]