How is the sum of Q6 + Q10 20? It looks like they are both zero to me.
The original is a zero.
What if scenario....
If Q6 and Q10 were a Pass, then the sum of Q1 to Q10 for ID 100 will be 20.
Part of the challenge of doing this in Tableau is that parameters are only single choice. You cannot create a parameter which would allow you to select multiple 'questions' to forecast as a pass.
You could however have multiple parameters, one per question perhaps.
Let's say you create a parameter called 'paramQ6' as a boolean.
Then you would create a calculated field called forecastScore as:
IF [Question] = 'Q6' and [paramQ6] = true THEN [Maximum] else [Response] end
Then you can sum this new forecast score.
You could also create a single string parameter which users type comma separated question numbers into. I.e. Q6,Q10.
Any question they type in here will be forecasted as true.
Create the string parameter i.e. Parameter1
Create a new calculated field -
IF CONTAINS([Parameter 1],trim([Question]))
The String Parameter and Calc Field method works. Thanks Tom.
Any other suggestions from others?
No problem. I'm not sure you'll get more suggestions unless you're a bit more specific about what you'd like to do differently versus the solve I provided above.