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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aneuk22
New Member

How to combine responses in multiple table fields into one field

Hi All,

 

I have tried my best to do read posts watch Power BI training videos in how to my requirements but no luck so far, but I am pretty new with Power BI and a bit is going over my head.

 

So I have a Customer Feedback form which capture multiple values of responses. So currently users will need to choose 2 of the following options.

aneuk22_2-1653601310318.png

Using Direct Import to PowerBI Desktop using sql query to return the following result.

aneuk22_0-1653606850675.png

 

So I would like to achieve the following with a idea of new column created in PowerBI called Feedbacks which combine all responses of each users in one field. I just want to find out if it is possible to achieve something like this in Power BI. 

aneuk22_0-1653607003775.png

 

Any help would be greatly appreciated. Thank you

1 ACCEPTED SOLUTION
Nathaniel_C
Super User
Super User

Hi @aneuk22 

Try This

Nathaniel_C_0-1653612478773.png

 

UserFeedback = 

var _FE = Max('Table'[FeeExpensive])
var _FB = MAX('Table'[FoundBetterProduct])
var _NM = MAX('Table'[NotMuchContent])

var _Switch = Switch (TRUE(), AND(And(_FE = 1, _FB = 1),_NM=0), "FeeExpensive, FoundBetterProduct",
                       AND(AND( _FB = 1 , _NM = 1),_FE=0), "FoundBetterProduct, NotMuchContent",
                       AND(AND( _FE = 1 , _NM  =1),_FB=0),"FeeExpensive,NotMuchContent",
                        "FeeExpensive,NotMuchContent,FoundBetterProduct")

Return _Switch

 

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Nathaniel_C
Super User
Super User

Hi @aneuk22 ,

Glad this worked for you!

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel_C
Super User
Super User

Hi @aneuk22 

Try This

Nathaniel_C_0-1653612478773.png

 

UserFeedback = 

var _FE = Max('Table'[FeeExpensive])
var _FB = MAX('Table'[FoundBetterProduct])
var _NM = MAX('Table'[NotMuchContent])

var _Switch = Switch (TRUE(), AND(And(_FE = 1, _FB = 1),_NM=0), "FeeExpensive, FoundBetterProduct",
                       AND(AND( _FB = 1 , _NM = 1),_FE=0), "FoundBetterProduct, NotMuchContent",
                       AND(AND( _FE = 1 , _NM  =1),_FB=0),"FeeExpensive,NotMuchContent",
                        "FeeExpensive,NotMuchContent,FoundBetterProduct")

Return _Switch

 

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

Do you want to achieve this result in the visual or in the raw table itself?  Please also share the raw data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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