RJMNS
10/18/2022, 4:24 PMcase when
extract(year from {trandate})>=2022 then (case
when extract(month from {trandate})>=6 then (case
when (extract(month from {trandate})=6 and extract(day from {trandate})>=9) or (extract(month from {trandate})>6 and extract(day from {trandate})>=1) then 0 else 1 end) else 1 end) else 1 endPetr MalĂ˝
10/19/2022, 3:02 PM{trandate}>TO_DATE('2022-06-09')
RJMNS
10/19/2022, 4:08 PMRJMNS
10/25/2022, 12:09 AMcase
when {transactionlines.custcol_xx_xxx_item^item.itemid} is null
then -{transactionlines.costestimate}
else -round((1-(case when {trandate}>=TO_DATE('2022-06-09','YYYY-MM-DD') then .035 else .0375 end))*{transactionlines.foreignamount},2)
end
But sometimes not this for some reason:
case
when {transactionlines.custcol_xx_xxx_item^item.itemid} is null
then -{transactionlines.costestimate}
else -round((1-(case when {trandate}>=TO_DATE('2022-06-09') then .035 else .0375 end))*{transactionlines.foreignamount},2)
end
The numbers in the sheet themselves calculate successfully without error in both cases and the formula validates successfully in both cases. But not putting the 'YYYY-MM-DD' causes the dataset to fail export to CSV. No error message, just nothing happens. Add in the 'YYYY-MM-DD' to the TO_DATE formula and then it will export again as expected.
Oddly enough, I have another data set where I'm not using the 'YYYY-MM-DD' and it works and exports totally fine, so I have no idea what's going on. 🤷‍♂️Petr Malý
10/25/2022, 10:14 AMRJMNS
10/25/2022, 3:01 PMhow did you recognize that the problem was caused by missing format clauseA lot of painful trial and error and by process of elimination. I had about a dozen formula fields and so I added them to the data set one by one until I found one that caused it to stop exporting. Then I started swapping out pieces of the formula (multi-level Case statement) until I isolated it to the fact that the export worked with the TO_DATE field removed, but not when it was put back. Noticed in the notes for the TO_DATE field within SA it was supposed to have a format clause like that. So tried adding that in and it exported again. Removed it and the export stopped working. Could be something in the browser I suppose, but the one data set that was working that was missing that clause was run in the same browser. When I first noticed the issue in the other data set, I rebuilt it from scratch, thinking it had gotten corrupted somehow. The problem occurred in the new data set once I added the formula field with the TO_DATE formula. I'm not sure how to isolate which it is (browser or SA), I just know that one works and one didn't using essentially the same formula and the same browser. Super odd.
RJMNS
10/25/2022, 3:12 PMPetr MalĂ˝
10/25/2022, 3:21 PM