You don't need to share patient data, but you can make some dummy data.
If you need people to respond faster for your forum requests, please always provide a data file and/or a packaged workbook with data. People who are helping here may not necessarily have the time to make data for you and then provide the solution.
1 of 1 people found this helpful
Step 1 - calculated field
Trend over time
if [Lab Value] <5 then 'below 5'
elseif [Lab Value] >=5 and [Lab Value] <=7.9 then '5 to 8'
elseif [Lab Value] >7.9 then 'above 8'
You can then put this against a date axis and see trend over time
Step 2 - calculated field
Rename your values to 7.3
if [Trend over time] = '5 to 8' then 7.3
You can then integrate this with your other data to show 7.3 for the 5 to 8 range but I'm hopping over this output because it doesn't make sense to me why you would do this
Step 3 - data viz
Drag [Trend over time] onto x axis and select count as the aggregation. Create a Table Calculation for % of total and set the range to Table (down)
Drag [Lab Date] onto the y axis and set the aggregation to month
Group 'below 5' and 'above 8' so that they appear as the second percentage
HTH In your above example, the code should have read [Lab Value] <= 5, it looks like you had the equation mixed in with the fieldname which Tableau would have errored out on.
This worked for me, thank you!