Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension/Expression

Hello,

I would like to get the result as below. I tried to set up three Dimensions: Submitted_status, Sumitted_year and Submitted_month, and two Expressions: Submission total and % on time. All these should also match when the submitted_company = 'A'.

So I worte the code for "%on time" shows as below,

if ((Submitted_Status) = 'ontime',
((
Sum ({$<Submitted_Status = {"time"}, submit_company = {'A'}>} Submission_count))
/(
Sum( {$<submit_company = {'A'}>} Submission_Count))),
((
Sum ({$<Submitted_Status = {"Submitted late"},submit_company = {'A'}>} Submission_count))
/(
Sum( {$<submit_company = {'A'}>} Submission_Count)))
)

However, I cannot make the  "%on time" expression work. Can anyone please let me know or provide me any hints that how to get my expressions with the current dimensions?

Thanks a lot!

Becky

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

This is all you need

= Sum({<submit_company={'A'}>}Submission_count)/

Sum(TOTAL <submitted_year,submitted_month> {<submit_company={'A'}>}Submission_count)

See app attached

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

12 Replies
Not applicable
Author

use this expression for %

=sum(Submission_count)/ Sum(TOTAL <submitted_year,submitted_month> Submission_count)

Not applicable
Author

Thanks Rodrigo. I just changed my code. It's slightly different. So the one you posted didn't work. Do you mind to take a look at it again?

Not applicable
Author

Do you want only on time? or

i used the same expression ....

Not applicable
Author

Thank you rodrigo!

It's werid, I got the result on this sample qvw. But I cannot get it from my work qvw file.

Can you let me know why we are using TOTAL here and TOTAL <submitted_year,submitted_month>?

Not applicable
Author

the total is a function that adds the data ( a grand total ) and when used in a field , we add the value for that field

vinieme12
Champion III
Champion III

This is all you need

= Sum({<submit_company={'A'}>}Submission_count)/

Sum(TOTAL <submitted_year,submitted_month> {<submit_company={'A'}>}Submission_count)

See app attached

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Thanks so much! I am all set now. I got the result! It was a typo.

Best,

Becky

Not applicable
Author

Sorry rodrigo. I marked Vineeth's response as correct answer. As I have a condition in my requirement which is the submitted_company have to equal to 'A'. So he's answer is the correct one. Without adding the condition, the result is different. I really appreaciate your help and pacient.

Not applicable
Author

no problem. the important thing is to solve your problem the best way.