Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
patrou38
Creator
Creator

Variable to update

hello,

I'm wondering If it's possible to set a variable with the expression result.

I tried directly with the set function without success 😞

thank you in advance

patrick

13 Replies
krishnacbe
Partner - Specialist III
Partner - Specialist III

Yes it is possible.

If you want to store the expression result you need to use LET statement and SET to evaluate while the variable is used.

So in your case try with LET statement.

patrou38
Creator
Creator
Author

hello,

thank you for your answer, but I didn't found the way to integrate the Set function in my expression...

below my expression:

=round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number])) ...

knowing that this expression has in dimension a periode (3 last days).

best regrads,

Patrick

krishnacbe
Partner - Specialist III
Partner - Specialist III

Try to change the expression as below. You need use the variable name with "="

=round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={"=$(choice2)"}>} [Lot number]))/
round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={"=$(choice2)"}>} [Lot number])) ...

vishsaggi
Champion III
Champion III

May be this? And can you tell us how you defined your variable choice2 ?

=round(count({< Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={'$(choice2)'}>} [Lot number]))/

round(count({<  Availability={'WIP'},[Product Type Code]={'DI'}, Division={'$(choice2)'}>} [Lot number]))

patrou38
Creator
Creator
Author

Hello,

sorry but we are on the wrong way... I was not clear enough before.

My main problem in not to stock the expression itself or their result in stand alone (without dimension) mode because the expression alone don't take the dimension limit into account.

This is why I would like to record the result on a variable in the same time of the execution on this one.

my dimension is :

=if(Ceil(CutOffDate-[Last Op Move In])<=3,1)

and my Expression is:

=round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number]))

hopping that it's more clear for you and AGAIN, thank you in advance

Patrick

vishsaggi
Champion III
Champion III

I am sorry  i quite did not get that. Is it possible to send us a screenshot of your issue and the ouput you are looking for?

patrou38
Creator
Creator
Author

Capture.JPG

here this is my outcome.

the indicator equal to 39% for 'SMD' division and for the the dimension concerned.

what I would like to do is to put the 39% value in the title of the graph.

another question, I didn't find the trick to show the value on the Needle.

thank you for your support.

Patrick

vishsaggi
Champion III
Champion III

Use the same expression as you have in Presentation tab -> Text in Chart? Did you use that? Can you share your expression you are using in Text in chart window?

patrou38
Creator
Creator
Author

hello,

my Text is not in the text chart but in the 'title in the chart, in general menu'.

=choice2 &' % lot in hold <= 3 days'

and before the sympbol '%' I would like to put the result of my expression which is equal to 39% in this case.

my expression is :

=round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, [Hold Status]={'HOLD'}, Division={$(choice2)}>} [Lot number]))/
round(count({<Availability={'WIP'},[Product Type Code]={'DI'}, Division={$(choice2)}>} [Lot number]))

and my dimension :

=if(Ceil(CutOffDate-[Last Op Move In])<=3,1).

if I put my expression as it is, it's working but the number is wrong because it doesn't take my dimension into account.

hopping that you understand my problem.

Regards,

Patrick