Hello All,
I'm not sure how exactly to do this, given it's through the Alteryx Academy at a local community college. Am I allowed to post the file? I think that would be the best way to get help because you'll be able to see my workflow. Otherwise, I'm not sure that I'll be able to do a good job in explaining the issue.
Anyways, here's the question:
Reduce the data set to just the consignments with compensation. Convert the compensation to GBP for the consignments that are currently in USD and provide the following metrics:
a. the total number of compensation claims to be paid, and the total value of those claims
b. the total compensation from each carrier rounded to the nearest GBP
c. the top 3 months in terms of compensation claims to be paid, rounded to the nearest one hundredth, and with the € symbol
First of all, the rounding is killing me. I have no clue how to round to the appropriate 2-decimal digit number. Round and the other one Ceil, iirc, don't do this. They round to an integer. Next, I am completely clueless when it comes to c. I have no clue where to begin because the lesson didn't give us the tools or methods on how to do what it's asking - again with the rounding to the nearest hundredth and this appending of the Euro character.
I tried converting the data from fixed decimal to a string, using ToString(), but Alteryx didn't like it. And honestly, that's about the only tool in my bag of tricks for dealing with the question.
EDIT:
I'm going to include the question and what I've done. You can see my results along with the solution results - they're quite different. If this is a violation of the ToS, then I'll take it down. I feel that this isn't going to make much sense, unless you all can see what I'm working with.
@sameersheikh to get the values to 2 decimal places you can just use the select tool and set it fixed decimal type and 19.2 size and for the € symbol something like this should work
'€' + ToString([Data])
I tried the
'€' + ToString([Data])
and it didn't work.
I got the following error:
Formula (404) The formula "Compensation in GBP" resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. (Expression #1)
Interesting about Round(). It was not working. Everything I read showed that it rounded to an integer. I didn't know you could specify anything a decimal. I ran it, and it kind of worked. It does truncate the trailing zero, which I'd like to include.
That is incorrect (about the round tool). I was not used to the way the function worked when I first began using it, which led to frequent confusion and frustration on my part.
The formula error means that you are outputting a string into a numeric column, which won't work. Either change the data type via drop-down or you will need to make a new field to store the output in.
I've changed the data type from Fied Decimal to Int64; when I did that, I lost the decimals.
Exactly, do not use Int types if you want decimal values. The image I provided was for reference only, not advice on proper data types since you have a few different types it sounds like you are working with. The main point is to just make sure that you are using the correct ones.
Anyone been able to look at the workflow that I've included? Others, when doing this exercise, are getting the identical numbers to the solutions, so I'm clearly not doing something right.
I looked at your workflow, and in the spirit of you doing your own work, I will provide you with a few pointers to help guide you, without giving you the answer:
You are not far off. Best wishes! You can do it!!!