Forum Discussion
guerciobr
6 years agoNew Member
Line chart marks from different tables
Hello Guys, I need to do a chart which shows if a medication is been effective. To do this i have two tables called Medication and Exams, the Exams table has 3 collums (pacient_id, membrane_thick...
Anonymous
6 years agoNot applicable
Hi guerciobr ,
Based on my test, your requirement might not be achieved currently. We usually show value in Data Label instead of text,. So workaround is that you could view this in tooltip.
According to my understanding ,the value of the Y-axis is membrane_thickness filtered by the same pacient_id and the same date(Year+Month) in both tables, right?
You could use the following formula after creating the relationship between two tables based on pacient_id:
union table =
CALCULATE (
SUM ( Exams[membrane_thickness] ),
FILTER (
Exams,
Exams[pacient_id] = MIN ( Medication[pacient_id] )
&& FORMAT ( Exams[data], "MMM-YYYY" )
= FORMAT ( MIN ( Medication[date] ), "MMM-YYYY" )
)
)
Then create a line chart and drop medication as tooltip like this:
Is the result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin