Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bali2022
Frequent Visitor

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 for a project.  I've setup a table in PBI that I'm calling "QuestionFlow" (see below).  As you can see, based on the users Yes/No answers to the various questions I either want another question to display or a specific text value to display for the user.  I've created another table called "UserResponse" which simply has values of "Yes" and "No" and then I created a slicer from that.  At this point I'm stuck on the DAX to write (I'm a rookie) in order to dynamically display the series of questions/text based on the user's responses.  Any guidance would be greatly appreciated!

 

QuestionIDQuestionTextYesNextQuestionIDNoNextQuestionID
Q1Is there a specific project that needs completion?Q2Q3
Q2Will this specific project have a defined scope of work that limits what will be performed?​Q4Q5
Q3Is this role to temporarily handle excess workload or to cover an FTE out on leave?Contingent WorkerQ6
Q4Do the deliverables have defined schedule and due dates for deliverables?​Q7Contingent Worker
Q5Do you need to ramp up quickly or have urgent work?​Q8Q6
Q6AIs the expected role tenure Long Term (Over 12 Months) or indefinite?Q9AQ10A
Q6BIs the expected role tenure Long Term (Over 12 Months) or indefinite?Q9BContingent Worker
Q7Will there be penalties associated with delayed deliverables or poor quality? ​Q11Contingent Worker
Q8Does your labor need for the role experience fluctuations in service demands?​Q10BContingent Worker
Q9AWill the client invest in worker training & development?Full Time EmployeeContingent Worker
Q9BWill the client invest in worker training & development?Full Time EmployeeContingent Worker
Q9CWill the client invest in worker training & development?Full Time EmployeeContingent Worker
Q10ADoes the role require ongoing expertise or project-specific skills?Contingent WorkerContingent Worker
Q10BDoes the role require ongoing expertise or project-specific skills?Contingent WorkerQ9C
Q11Is there a need for tight budget controls for this role?Statement of WorkStatement of Work
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Bali2022 ,

Below is my table:

vxiandatmsft_0-1716432453612.png

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:

vxiandatmsft_1-1716432603325.pngvxiandatmsft_2-1716432611657.png

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.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Bali2022 ,

Below is my table:

vxiandatmsft_0-1716432453612.png

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:

vxiandatmsft_1-1716432603325.pngvxiandatmsft_2-1716432611657.png

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.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.