Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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])
I have buttons that select within the dimension/field the designated criteria. So based on selection will the respective expression calculate/show.
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)
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') ??
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.
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)
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?