Hi All,
Another I'm sure really easy question from myself!
I am currently building a HTML report into my App.
I have got so far but I am trying to join Tables and failing a bit
My SQL Query which works fine in SSMS
Select answer from answers
Where visitid = '107-668-03-04-2020' and q_id = '6'

What I have used in Power Apps
Concat(
'[dbo].[q_groups]',
"<h3>" & group_name & "</h3>" & Concat(
Filter(
'[dbo].[questions]',
q_group in '[dbo].[q_groups]'[@ID]
),
"<p>" & question & Concat(
Filter(
'[dbo].[answers]',
visitid = PV_VisitID && q_id in '[dbo].[questions]'[@ID]
),
" - " & answer & "</p>"
)
)
)
This outputs like this:

What it should be is like this
Group 1
Question 1 - Answer to Q1
Question 2 - Answer to Q2
Group 2
Question 1 - Answer to Q1
Question 2 - Answer to Q2
It is worth noting I am filtering this based on a visit ID as well.