Forum Discussion

Bali2022's avatar
Bali2022
Frequent Visitor
2 years ago
Solved

Creating a dynamic questionnaire in Power BI

Hi there!  I want to create a "decision support tool"  in Power BI that helps users decide on which labor type (e.g. Contingent Worker, Full-Time Employee, or Statement of Work) they should employ fo...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Bali2022 ,

    Below is my table:

    The following DAX might work for you:

    NextQuestion = 
    IF (
        SELECTEDVALUE('UserResponse'[Column1]) = "Yes", 
        LOOKUPVALUE('Table'[YesNextQuestionID], 'Table'[QuestionID], SELECTEDVALUE('Table'[QuestionID])),
        LOOKUPVALUE('Table'[NoNextQuestionID], 'Table'[QuestionID], SELECTEDVALUE('Table'[QuestionID]))
    )

    The final output is shown in the following figure:

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.