Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable that always equals a single number that I am trying to use in a bar chart as an expression. However, when using the variable, it only displays results when there is a selection.
The variable in question is a sum of many other variables which all have the same issue.
Below is an example of the flow of how I've done what I've done so far:
1. When a field is blank, if Hobbies is blank, give them 0 points, if there is data, then give them the value of 2.
vHobbies = if(Hobbies='' or IsNull(Hobbies),0,2)
2. There are then lots of these similar variables like above that are then added together to equal a new variable
vLifestyleRisk = $(vHobbies) + $(vInterests) + $(vPartOfATeam) + $(vDrinker) + $(vReligion) + $(vSexuality) + $(vDietType) + $(vFavouriteSport) + $(vFavouriteTeam) + $(vVocalBeliefs)
3. This variable is then part of another sum which is the variable I am wanting to use in the bar chart:
vOverallRisk = $(vPersonalRiskScore) +$(vFandFRiskScore) + $(vLifestyleRiskScore) + $(vWorkRiskScore)
+ $(vPersonalityRiskScore) + $(vExtrasRiskScore))
For some reason, the variables don't generate the numbers they are meant to generate. When I use the expression separately outside of the variable in a straight table, it works, but when inside the variable, it fails to give any result (see below).
I think this is why my variable isn't working in the bar chart but I have no idea why the variable wouldn't generate an amount when it works elsewhere as a normal expression. Why could this be?
I think it's been caused through The-Little-Equals-Sign.
- Marcus