MS Access: Query Expression Error - ms-access

I've got an access database to keep track of a number of awards to different people. They split the award by taking a given percentage (Yes, I realize the percents don't add up to 100, I'm just testing it right now). As of right now I have one column dedicated to calculating the first person's split of the prize money. However, I'd like to instead do this with a query instead.
I've created a query to total all of the awards received by a given person, starting with the first column for testing purposes. The query first gathers all the awards in which a given person has a share, then in a separate field multiplies the award by the percentage taken. However, after entering the person's name in the dialogue box, I get this error returned that says my expression isn't typed correctly.
I've tried several different things, from changing the formatting of the columns, to editing the expression in the final field where the calculation is done. I can't figure out why this is happening. Am I missing something obvious?

Related

How to match detail with certain period in Webi

I trying my best to make simple compilation (similar to VLOOKUP in Excel) but I am getting all the time #MULTIVALUE error
(I know the meaning of this error and it's correct because we have more than one line per registration number) or even empty cell... So what I need is limit somehow the detail to specific period.
desired output:
We have two tables (from diffrent universes) and as you can see in one we are storing the claims but second one is storing the insurance parameters and additional fee. Basically if the claim has been happened in specific period then the detail should show the correct value (0 or 500).
I cant base on the insurance number, as one of the source is not storing such data.
I am aware if I will able to assign the correct addiitonal fee (new detal created) I also will be able to assing correct Insurance Number from specific period(Ins no)
similar thread on sap answers

Microsoft Access: Trying to get the sum of total "FALSE" entries for a particular client

I work for a non-profit and we have a program where we take our clients out to do small community service work and in exchange they are paid for their time working. The issue that I am running into right now with Microsoft Access is that I want to create a query that allows us to check the number of times any particular client has worked in a particular Calendar year.
We use two linked tables, one of which is the master list with client information & the other is the list of times they have put in for selection on that particular day (we usually have ~40 people show up but can only take 20 a day). So at the moment we use a Yes/No data type on the list of times they have put in for selection to keep track of this information. The column is called "Unused Surplus", just for the sake of providing as much information as possible.
My goal is to have a query running that shows the first name, last name, and # of times worked for a client within a calendar year. Any assistance would be hugely appreciated.
*I have tried to create a query using : "Times Worked: Sum(IIf([Unused Surplus]="No",1,0))"
Just wasn't successful unfortunately.
If [Unused Surplus] is Yes/No field type, don't enclose "No" in quote marks. Using quote marks defines a literal string, not a Boolean constant. Boolean constants are Yes, No, True, False. and have values of -1 and 0. Consider:
Times Worked: Sum(IIf([Unused Surplus]=No,1,0))
Times Worked: Sum(IIf([Unused Surplus]=False,1,0))
Times Worked: Sum(IIf([Unused Surplus]=0,1,0))
Times Worked: Sum(IIf(Not [Unused Surplus],1,0))
If you really want to count the Yes values, consider:
Times Worked: Abs(Sum([Unused Surplus]))

ConcatRelated Returning Multiple Values

I am new to MS Access and am trying to build a database that includes a text roll up (effectively summarising staff feedback collectively to the manager). I have set it up using ConcatRelated (http://allenbrowne.com/func-concat.html) and this works as expected. The only issue is that I cannot seem to ensure that only the first instance of a value is returned, rather than every instance. For example:
The function is bringing back the top view, but I only want it to bring back the Distinct values - please note, as this is a manager view, the same value can appear multiple times in the data retrieved. As such, I almost need the text to de-dupe if it is already there.
Full disclosure - my SQL is not great, so I am using the Expression Builder from the design view
Any help will be appreciated
EDIT for more detail:
The image shows a sample of the data and the output. In this, Mary is the team leader and so is responsible for the areas of John, Steven, Erin, and Harriet. The UID refers to the responsibility area.
As you can see, the dataset has the "minimum target" referenced against the area of responsibility and the output I am getting is duplicating the comments (which I presume is because the value is returned twice), but I am trying to ensure that commentary is summarised, not duplicated.
Note, in the summary output, I am not interested in the areas of responsibility, just the commentary against the staff names.
I hope that makes sense
Build a query that retrieves distinct Comments values for each person:
SELECT DISTINCT Person, Comments FROM table;
or
SELECT Person, Comments FROM table GROUP BY Person, Comments;
Now reference that query in ConcatRelated function as source for Comments values.
Be aware that calling a function like this in query along with aggregating can cause slow performance with large dataset.

Can't figure how to use lookup() in SSRS 2008 R2

In the report I am building I have 2 data sets: one gives me, per user, per day, the total amount in that status; the other one gives me, per user, how many days in the date range the user actually showed up at work. Each of these data sets comes from its respective stored procedure. See screenshot.
The problem I have is that I need to report not the total time in status per user, but the average per day. So in the screenshot you can see that one user has 5 entries for 5 days worked and the other one has 3 entries for 4 days worked. simply because in one of those 4 days he didn't had that status at all.
I tried adding a calculated field to my "status" data set by using the lookup() function but it kept on giving me errors, which makes me think I don't quite know how to use it.
I also tried using group variables, and I was able to define it under group properties, but it never come up as an option to be used when writing an expression.
Any ideas using lookup(), variables or otherwise?
You're on the right track. Sounds like the Lookup function is exactly what you want.
Instead of trying to add the calculated field to the dataset, try putting it directly in the report item where you want this displayed.
Something along these lines should work:
=SUM(Fields!Available.Value)
/ Lookup(Fields!UserId.Value, Fields!UserId.Value, Fields!Days.Value , "NameOfDaysDataset")
If this isn't working, please post a few more details of your data sets, field names, and where you need this to appear.

Microsoft Access - Scrambling Totals

I'm currently in the process of coding a summary report in Access XP for a client and while for the most part I've gotten 99% of the fields to match correctly with the original report (created in Corel Paradox 4.0), I'm having an issue with a sum field where despite using the same set of data, I'm getting invalid answers.
For example, in one table, the sum of the fee field comes to 9,050 in the Paradox report. In Access, the table containing the data also comes to that same amount. Despite this, when I enter the expression in my Summary report, Access will always display the total as 9,005.
I've been trying to use the NZ function to cancel any nulls, however that hasn't helped. Changing the number format to currency, general, and other formats also hasn't been helping.
Any assistance/insights are greatly appreciated.
EDIT: As requested below are some of the expressions from my Access report. Everything up till now has strictly been Access code, but as I have SQL experience, I am open to implementing that type of code if needed (it actually has been on my mind for a bit)
=nz(Sum([Fee]))
Calculates just the total fees
=nz(Sum([Room & Meals]))+(nz(Sum([Commutter & Meals])))+(nz(Sum([Fee])))
This we use to calculate the grand total. It also comes out identical to the fee total for my dummy data since the first two fields don't have any totals added to them.
Not sure this will help, but you need to break this down to trouble-shoot.
Capture the detail data from this report and compare to the Corel Paradox data. Don't just test the totals. Maybe you can put them in Excel.
Break out the three fields individually and sum those: Sum([Room & Meals, Sum([Commutter & Meals, Sum([Fee]). Don't format. Manually add them together to test.
Are these integers or is there some rounding going on?
Are the text boxes on the report large enough to display the entire number?
1 may show you're comparing apples to oranges.