Forum Discussion
Get a table with comments
- 4 years ago
Hi,
I see, in that case something like this should work:
data:
Dax:Measure 11= IF(contains(filter(all(Questions),Questions[QID]=MAX(Questions[QID])),Questions[Comment],"Not ok"),1,0)
End result:
Hi, ValtteriN
Yes, I want to creat visual element
I can't use this measure because PBI throws the following error:
Each row in the FormFilled table is information about the completed form. Each form has a set of questions and comments that reside in the FormQuestion. FormsQuestionSelectedAnswers contains answers to form questions, standard ones that the user can select (ok, not ok, N/A) and entered by the user himself in a free form - these are comments. In my understanding, the difficulty is that the wording of the questions and the names of the fields for comments are in the same column of the FormQuestion table.
The database logic is built in such a way that for it there is no difference whether it is a comment or a question - for it these are all questions with different id. I can't just select the "not ok" filter on a visual and get a list of comments. They have a different id and the visual element will display only questions to which the user answered "not ok".
- ValtteriN4 years ago
Community Champion
Hi,
You can use MAX('Table'[column])="not ok" to solve this error.- Anonymous4 years agoNot applicable
ValtteriN MAX() - is work, but this is not the answer to my question. I need to display comments for questions that are "not ok", not only the questions themselves. Sorry, for the russian words. If I use your measure I will see Title contains only questions.
I want to get visal like this:
Each filled form has its own FormFilled id. Question id Questions from the FormQuestions table are attached to it. 1654 - comment (also called in Russian) 1653 - a question to which the answer "not ok" was received. I want to leave only the lines with questions that are answered with "not ok" and that also have a comment filled in. The number at the beginning of the wording of the question and the comment is the link between them. If the question starts with the number 9, then the comment on this question also starts with the number 9
- ValtteriN4 years ago
Community Champion
Hi,
I see, in that case something like this should work:
data:
Dax:Measure 11= IF(contains(filter(all(Questions),Questions[QID]=MAX(Questions[QID])),Questions[Comment],"Not ok"),1,0)
End result: