cancel
Showing results for 
Search instead for 
Did you mean: 

Formula Result not showing proper result

former_member202517
Participant
0 Kudos

Hi friends,

We have a scenario where if the total is <= 7 then then result *1 and if result >0 then result 0.

Below is the actual scenario if closed with in <= 7 then result  is (closed with in 7 <= 7)*1 or else 0.  For calculating closed with in <= 7 we used selection and then included this selection in formula. but we don't have any closed with in 7 <= 0 even the result is showing 1. but in the selection its showing 0. please help me out

Accepted Solutions (1)

Accepted Solutions (1)

former_member202517
Participant
0 Kudos

Hi Thank you for your valuable replies.

My scenario is we have two KF.

1. open

2. closed

We have to calculate how many are open, open for 7 days and closed and closed with in 7 days.

In the testing we have total 2 incidents. Out of them 2 are open and in that 1 is open for more than 7 days. So here both the closed and closed with in 7 days should be zero, but closed with in 7 days is displaying as 1. It should be zero . So is there any thing to be changed in the formula?

former_member182470
Active Contributor
0 Kudos

Hi Ravi,

I believe you should show data in 4 KFs like below. If you want to show in only 2 KFs, then you must consider all 4kfs in If..else to give you correct result.

Regards,

Suman

former_member202517
Participant
0 Kudos

Hi Suman,

Thank you for the reply, yes this is the way im expecting the output. In the screenshot that I have attached  Closed with in 7 days(RKF) is a selection. Using this selection I created a  Closed with in 7 days(formula). The RKF is giving the correct result individually, but wrong result as 1 in Formula.  I request you to please let me know the correct formula that can be included.


Former Member
0 Kudos

Ravi,

If your RKFs are using the number of defects as the base key figure,

then In the formula, use the COUNT operator on your RKFs.

Regards,

Srilakshmi B

Loed
Active Contributor
0 Kudos

Hi Ravi,

Can you provide the raw data as well as the selections and/or formulas you have used in the four (4) KFs - open, open for more than 7 days, closed, closed within 7 days?

Thanks!

Loed

former_member202517
Participant
0 Kudos

Hi, please find the formula in the attachments.

Loed
Active Contributor
0 Kudos

Hi Ravi,

How can you say that an incident was closed within 7 days? Do you have dates being subtracted (like start date and end date) or what?

I think the problem lies in the filters of your selection in CLOSED WITHIN 7 DAYS coz I can't see any mistake in your formula CLOSED WITHIN 7 DAYS..Can you recheck it?


Thanks!


Loed

former_member202517
Participant
0 Kudos

Hi Loed,

Thank you for the reply.

Yes we have a formula to subtract.

Open= Curren date- incident start date. Formula written in transformation

Close = Completion date- incident start date ( If completion date is not zero,) field routine written

Loed
Active Contributor
0 Kudos

Hi Ravi,

Please try this:

Make a new formula, let's say, CLOSED WITHIN 7 DAYS (NEW) and enter this equation:

CLOSED WITHIN 7 DAYS (this is your current formula) - 1

Then, load a sample incident that was closed within 7 days, try to check if the value of CLOSED WITHIN 7 DAYS (NEW) is 1 or 0..

Thanks!

Loed

former_member202517
Participant
0 Kudos

Hi Loed,

I have created a sample formula with CLOSED WITHIN 7 DAYS ( formula) - 1, the values are zero

Loed
Active Contributor
0 Kudos

Hi Ravi,

Did you do this?

Then, load a sample incident that was closed within 7 days, try to check if the value of CLOSED WITHIN 7 DAYS (NEW) is 1 or 0..

Loed

former_member202517
Participant
0 Kudos

Hi Loed,

I have loaded the data with incidents which were closed in 7 days and CLOSED WITHIN 7 DAYS ( formula) - 1, the values are zero. The values are coming fine when there are any incidents, but the problem if the incident closed is zero the formula "Closed with in 7 days" (only this formula is incorrect)is displaying the count as 1. instead of zero.

Loed
Active Contributor
0 Kudos

Hi Ravi,

What if there is an incident wherein someone finished a task for just 8 hours? Is it considered 0 day or 1 day? If it is considered as 1 day (which I think it must be considered as 1 day already) just don't consider the 0 in your IF statement..

Do this mate:

( (NODIM ('Closed within 7 days') >0) and (NODIM ('Closed within 7 days') <= 7 ) ) * 1 + ( NODIM ('Closed within 7 days') > 7 ) * 0

Regards,

Loed

former_member202517
Participant
0 Kudos

Hi Loed.

If the task is completed in the same day there is a routine written to make the count as 1.

I have changed the formula as

( (NODIM ('Closed within 7 days') <>0) and (NODIM ('Closed within 7 days') <= 7 ) ) * 1 + ( NODIM ('Closed within 7 days') > 7 ) * 0.

Now its working fine. Thanks a lot for the useful suggestions.

Thanks,

Ravi.

Loed
Active Contributor
0 Kudos

Hi Ravi,

I think we will arrive with the same result using the formula I have suggested?

Anyway, good to know that it's already working.

Regards,

Loed

Answers (3)

Answers (3)

former_member182470
Active Contributor
0 Kudos

If your first condition satisfies that will yield you 1. So 1 * 1 is 1.

Since your RKF gives you 0 which is < =7, then obviously it gives you 1.

yasemin_kilinc
Active Contributor
0 Kudos

Hi Ravi,

I think there is nothing wrong in your formula. I guess there is a wrong logic in your design. Please explain what you want to vies in your query with the related characteristics. What characteristics do you have? What key figure do you want to show, then we can try to suggest an alternative way.

Regards

Yasemin...

Former Member
0 Kudos

Hello Ravi Kumar,

It is just 1 if-else condition, right? Pls check if the below formula works:

(NODIM(Closed within 7 days) <= 7) *1 + 0

Regards,

Srilakshmi B