Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

Expression Conditions

Hello Community Experts.

In my expressions I want to conditionally calculate based on whether certain conditions  are met:

Expression 1 condition: vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15'

Expression 2 condition: vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29'

Expression 3 condition: vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28'

In essence, only to calculate when one of the two scenarios are fulfilled. But I cannot get the second part to work.

Please advise.

Thanks

Labels (2)
7 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Are you sure you want to use GetFieldSelections? 

If you're looking for a specific value in your [#of Days Post VPP] field, try using Only([#of Days Post VPP])

ZoeM
Specialist
Specialist
Author

I have buttons that select within the dimension/field the designated criteria. So based on selection will the respective expression calculate/show.

Anil_Babu_Samineni

May be using P&C formula

If(((vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29')) or
((vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28')) or
((vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28')) or
((vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15')) or
((vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28') and ((vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15')) or
((vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28') and ((vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29')), Expression)

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
ZoeM
Specialist
Specialist
Author

Hi Anil.

So my current first conditional expression is:

vRegion=1 or Only([#of Days Post VPP])='<15'.

Modified per your suggestion, would it be:

If(vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15') ??

 

ZoeM
Specialist
Specialist
Author

By the way these are for conditions in a bar chart.

So I have several expressions and I want to limit when they are calculated. 

Hope that helps. 

Anil_Babu_Samineni

Initially you talked about s condition should fulfill. That means, you have to use as follows

If(((vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='>14<29')), Expression)

or, for another conditional like

If(((vRegion=1 or GetFieldSelections([#of Days Post VPP])='<15') and (vRegion=1 or GetFieldSelections([#of Days Post VPP])='>28')), Expression)

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
ZoeM
Specialist
Specialist
Author

Combo Chart.JPG 

Maybe the above chart illustration will be better served. As you can see from the Legend, there are multiple expressions. 

I have created actions for the legend so that if the user clicks on >28 days, they should only see information for >28 days. What I am needing is to limit (conditionally hide) the other expressions on the chart and only the section for >28 days showing. 

Does that help?