Good Morning George
See the attached approach
I added a parameter
then used a case statement to do the "Correction"
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
paramter to corrected.twbx 13.9 KB
Thanks for the help.
That is not what I want though.Maybe I wasn't too much specific, so:
1) The Correction field that I use must stay there (it will be used many times and from many sheets)
2) I must be able to plot date-cyl1 and by using a filter use the corrected value for cyl 1 , if I want to plot date-cyl 2, it should use the corrected value for cyl 2
3) I don't want to use a parameter control and select from there the appropriate Cyl1 or Cyl2.
Hi George -
Little confused - your post title
says you want to use a parameter but now you don't want a parameter
Is the issue that you want the corrected value to use cycle 1 and separately
the formula below (revised)
jd sdave parameter_v2018.2.twbx 19.0 KB
It sounds like you just want to have a parameter called "Correction" that let's you input the corrected value. Make it a float and allow for any value.
Then you can create calculated fields called "Cyl1 Corrected":
Cyl1 * [parameters.Correction]
and "Cyl2 Corrected"
That way the Correction parameter is always there with whatever value you entered last. And you can bring it onto any other sheets as well. Make sure to use the "Cyl1 Corrected" and "Cyl2 Corrected" fields for your plots and whenever you update your parameter, the plots will update as well.
Hi Jim and thanks for the help.
The problem is that I don't want to use a parameter selector in order to select between cyl1 and cyl2.
(I couldn't open your last twbx, due to an error (from my side) , but I think you use again the parameters control in order to select the jd corrected).
I want to have 2 sheets.
One sheet with date - cyl1 and one with date - cyl2.
But when I have cyl1, use cyl1 corrected.
And when I have cyl2, use cyl2 corrected.
I think I have to somehow pass a filter in order to do so.
I hope it is clear now, thanks!
Hi Paul and thanks for the help.
I can't understand your solution in contrast with my requirements.
You say to have a Correction parameter but I have to explicity define the correction.
Parameters allow you to input any values that you want at any time. They're not like filters where the values are predefined. So therefore you would only be able to explicitly define the correction with a parameter.
Here's an article on their functionality:
But I want to do for example Cyl1 + 0.25*(1- Cyl1)
How can I import to parameter that kind of equation?
Am I missing something?
I guess it depends on which part of that is the correction. Is it just the .25? If that's the case then you can use a parameter to change that value in a calculated field like this:
Cyl1 + [parameters.Correction] * (1 - Cyl1)
Then whatever you type into the parameter will be used in that calculation.
If you want to have that whole calculation be dynamic you can't really do that.
the simple answer it that you can't - parameters are set by the user manually - ant they are changed manually
so the question becomes how to do what you want without a parameter - you have 2 separate measures - 1 for cycle 1 the other for cycle 2 - one way to do what you want is to pivot the data ( Pivot Data from Columns to Rows - Tableau ) you will then have a column of pivot names (those will ce the cycle 1 and 2 ) and another column of values
You can then use the pivot name column as a filter and base your calculations on the pivot name/values
Ok, I will accept this answer.
I can't pivot the data though, I don't have access to sql.
The obvious solution is just to use for every Cyl a seperate correction.I wanted to avoid that because I will have many of them.
Thanks for all the help and clarification Jim.