Modification to Percentage total in report

I have a solution under
Solution

However the tMain table can have several models and other lines.  The above solution is determinng the percentage based on the total number of frame models in the table.

Looking for a solution for a percentage based on the total number of "MA Health" frameline in the tMain table.

Can the query or the control source of the text box be updated?

Thank you. (Sorry Jeff my sample DB tMain only had one frame line in it... do it wasn't known from the previous question that there could be more than one type of frame line in the table)

Perhaps in the report the text box: =[CountOfFrameModel]/DCount("FrameModel","tmain") doesn't account for the frame line of "MA Health"... almost need something like =[CountOfFrameModel]/DCount("FrameModel","tmain") where FrameLine = "MA Health"
thandelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
Confused...
The sum of the counts for "Ma Health" is 809.
That is what I am using for the denominator.

What do you think it should be...?
0
thandelAuthor Commented:
Well that is correct but only because the table I provided in my sample DB was a reduced set.... if you insert other framelines with framemodels the previous solution is determing the % based on the total number of frame models in the table and not only the MA Health frameline.
0
Jeffrey CoachmanMIS LiasonCommented:
Can you please state the actual number you are getting/using...

As I asked, please tell me the exact values you have, and the exact values you are expecting...

...Or post a sample database that more accurately represents you actual data...

I get 809 for "Ma Health" and 45 if I add "Pa Health" in (for the blank records) and add in three Frame Lines...

So Ma Health used 809 as the "Total (Only for Ma Health) and Pa Health uses 45
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

thandelAuthor Commented:
Hello I don't see how the report can display the correct percentage.  With
=[CountOfFrameModel]/DCount("FrameModel","tmain")

Its looking at the total famemodel count in tMain rather than the total MA Health Models.

See attached DB. In the report the total percentage is only 50% instead of 100%.
db2.mdb
0
Jeffrey CoachmanMIS LiasonCommented:
That is all I ever needed all along.
;-)

Make the second textbox this:
=[CountOfFrameModel]/DCount("FrameModel","tmain","frameLine=" & "'" & [FrameLine] & "'")

Remember that saying things like "Percentage of", "Count of", "Total of", ...are great when they only deal with one field,
...but when you have conditional counts, and percents, things can get confusing without any context

This is why, most of the time, it is easier and faster to just post exactly what you have and exactly what you want.

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thandelAuthor Commented:
Thanks! Makes sense.
0
Jeffrey CoachmanMIS LiasonCommented:
;-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.