Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shwetagupta
Partner - Creator II
Partner - Creator II

Wrong Result on using search/filter on table

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 !!!

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

5 Replies
rittermd
Master
Master

Can you post the actual measures that you are using to get the totals?

shwetagupta
Partner - Creator II
Partner - Creator II
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
shwetagupta
Partner - Creator II
Partner - Creator II
Author

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 !!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!