Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am facing an interesting problem. I have created a straight table where measures are LLYTD, LYTD, YTD
Values are coming out correct as per the database.
But things went wrong when I search dimension on the table. Value changes !!!
I cant post the qvf but can anyone suggest what can be reason so that I can look into that particular area.
Attached screenshot will explain my question more better.
Please suggest !!!
Hi,
It is because the Max Date is getting changed as per the Selection.
What you can do is add {1} in Max as shown below.
Sum({<Date1="$(='>='&Date(YearStart(max({1}Date1),-2,4),'DD/MM/YYYY')&'<='&Date(Addyears(max({1}Date1),-2),'DD/MM/YYYY'))"}>}NetSales)
Regards,
Kaushik Solanki
Can you post the actual measures that you are using to get the totals?
1LLYTD: Sum({<Date1="$(='>='&Date(YearStart(max(Date1),-2,4),'DD/MM/YYYY')&'<='&Date(Addyears(max(Date1),-2),'DD/MM/YYYY'))"}>}NetSales)
1LYTD:
Sum({<Date1="$(='>='&Date(YearStart(max(Date1),-1,4),'DD/MM/YYYY')&'<='&Date(Addyears(max(Date1),-1),'DD/MM/YYYY'))"}>}NetSales)
1YTD:
sum({< vYear = {"$(=max(vYear))"}>} NetSales)
Actually my data is coming from two different ERPs, where I have Joined Customer Names of two different ERPs and depicting primary sales and secondary sales.
Any suggestion where should I check to correct this
Hi,
It is because the Max Date is getting changed as per the Selection.
What you can do is add {1} in Max as shown below.
Sum({<Date1="$(='>='&Date(YearStart(max({1}Date1),-2,4),'DD/MM/YYYY')&'<='&Date(Addyears(max({1}Date1),-2),'DD/MM/YYYY'))"}>}NetSales)
Regards,
Kaushik Solanki
Hi Kaushik,
This works for me
Thanks a lot.
Please let me know one thing Max({1}Date1) how impact the selections made.
Little Confused !!
Hi,
It is a Set analysis, So when we define {1} it means that ignore all selection to calculate the function where it is used.
So in your case all the selection will be ignored when Max is calculated.
Hope it is clear.
Regards,
Kaushik Solanki