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

condition in KPI

Hello Guys,

I need your help. I need to add a condition if OSUser()='INTRA\wi.b', then calculate LIGNE_MONTANT whene opex category = 'training'

=num(sum({< $(vSetView) >}LIGNE_MONTANT/1000), '# ##0,0 KTND') /

vSetView

=pick(ViewId,

'$(vSetMTD)',

'$(vSetYTD)',

'$(vSetTotal)')

any idea please?

5 Replies
sunny_talwar

The text box needs to hide here when the OSUser is not 'INTRA\wi.b'? or just the expression should show 0?

If the text box needs to hide, then you can try a layout condition

OSUser() = 'INTRA\wi.b'

If the expression needs to show 0 or null, then may be this

=If(OSUser() = 'INTRA\wi.b',

num(sum({< $(vSetView) >}LIGNE_MONTANT/1000), '# ##0,0 KTND') /

vSetView

=pick(ViewId,

'$(vSetMTD)',

'$(vSetYTD)',

'$(vSetTotal)'), 0)

master_student
Creator III
Creator III
Author

Thanks sunny, my objective is if OSUser() = 'INTRA\wi.b', then calculate the KPI LIGNE_MONTANT and field category=trainning

Thanks

Kushal_Chawda

create variable vCondition on front end

if(OSUser()='INTRA\wi.b',','&'category ={''training''}','')


Now, write below expression


=num(sum({< $(vSetView) $(vCondition) >}LIGNE_MONTANT/1000), '# ##0,0 KTND') /

vSetView

=pick(ViewId,

'$(vSetMTD)',

'$(vSetYTD)',

'$(vSetTotal)')

master_student
Creator III
Creator III
Author

Thanks Kushal but it seems that there's errors with my variable

vCondition :

if(OSUser()='INTRA\w.b',','&'OpEx_Category ={''TRAINING''}','')

I am using the correcte field name / value

here is my expression

=num(sum({< $(vSetView) $(vCondition) >}LIGNE_MONTANT/1000), '# ##0,0 KTND')

Any idea please?

Thanks

sunny_talwar

Would you be able to share a sample to look at the issue?