Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
absekrafi
Creator III
Creator III

Doubled value

Dear Community members,

I have the exression bellow for "Quantity in Stock" in a pivot table :

if (('$(vStartDate)' <= '$(vEndDate)'),sum({<TRANSACTION_DATE= {'$(vStartDate)'}>}STOCK),0).

I am getting a value doubled for 1 product.

When I added a "table zone" to the sheet project, I got the correct value.

I am not understanding where is the mistake.

Do you have any idea where the problem is?

Thank you in advance,

Abdallah

12 Replies
raman_rastogi
Partner - Creator III
Partner - Creator III

Hi Abdallah

May be lke this

Sum(Aggr(sum(if('$(vStartDate)' <= '$(vEndDate)'  and TRANSACTION_DATE=  '$(vStartDate)'  , STOCK, 0)),Dim1,Dim2))

what are you getting in your subtotal? Is it wrong value or Null . Can you share  sample data with expected output .

Regards

Raman

absekrafi
Creator III
Creator III
Author

Hi All,

I tried this : if (('$(vStartDate)' <= '$(vEndDate)') and {<TRANSACTION_DATE= {'$(vStartDate)'}>}, rangesum(STOCK),0).


The data are correct but the sub-totals aren't when there is data in more than 1 factory (Usine in the image).


Thank you,

Abdallah

absekrafi
Creator III
Creator III
Author

When I use rangesum the data is correct but No sub-totals.

When I use Sum, data is wrong, and there are sub-totals.

rangesum( if (('$(vStartDate)' <= '$(vEndDate)') and {<TRANSACTION_DATE= {'$(vStartDate)'}>}, STOCK,0) )