Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Text Object Expression

Dear Friends,

I do have one logic in excel. So, here i want to implement this expression in QlikView.

My expression is (0,6*LWC+0,3*RWC+0,1*REC)

Now, i have YTD field which expression as =sum({<YTDFlag={1}>}S_COUNT) -- For ref, This is YTD Calculation.

So, now i need to create the object which is Text object. before moving to object i need to calculate the LWC, RWC, REC with based at YTD

1) LWC -- Last Working Case

2) RWC -- Restricted Work Case

3) REC -- Recordable

I have one week in list box, If i click on any week i want to show the value in text object which based at first expression. How to achieve this?

- ANIL

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
8 Replies
varshavig12
Specialist
Specialist

Can you post some sample data.

and the expected output.

varshavig12
Specialist
Specialist

and does LWC means Last working day ?

can you explain what value is needed in Recordable ? or may be the formula from excel for it.

Anil_Babu_Samineni
Author

I am trying to create the Text object which this expression

(0,6*LWC+0,3*RWC+0,1*REC)


Variables

--------------

LWC --              =sum({<YTDFlag={1}, C_DESCRIPTION = {"Lost Work Cases"}>}S_COUNT)

RWC  ----          =sum({<YTDFlag={1}, C_DESCRIPTION = {"Restricted work case"} >}S_COUNT)

REC                  =sum({<YTDFlag={1}, C_DESCRIPTION  = {"Reportable">}S_COUNT)


Now i want to implement this expression into one expression it should be Text object.


=((0.6)*($(LWC)))+((0.3)*($(RWC)))+((0.1)*($(REC)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
varshavig12
Specialist
Specialist

My expression is (0,6*LWC+0,3*RWC+0,1*REC)


The above logic from excel is not 0.6

It is 0,6 ?

Right ??

Can you please check your formula once again from excel.

Anil_Babu_Samineni
Author

No, It is 0.6 - That's my fault

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
varshavig12
Specialist
Specialist

Your expression should work

=0.6*$(LWC)+0.3*$(RWC)+0.1*$(REC)

varshavig12
Specialist
Specialist

is your week not mapped with the date used in YTD ?

Anil_Babu_Samineni
Author

Varsha,

It is working

I will explain you clearly.

Here, I have one list box with the values of

Lost Work Cases

Restricted work case

Reportable

And i created one pivot table which values are

C_DESCRIPTION               YTD

Lost Work Cases                   41

Restricted work case              31

Reportable                              97

After that, I created one text box which expression is =((0.6)*($(LWC)))+((0.3)*($(RWC)))+((0.1)*($(REC)))

Variables are same.

Now,

The text box value showing 76.6 (That is Total)

In that, If i filter Lost Work Cases the text object value should be change, Right (That is make sense)

(0.6 * 41) + (0.3 * 31) + (0.1 * 97) = 24.6 + 9.3 + 9.7 = Should Be 43.6 (Does it make sense)

- ANIL

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful