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
DemingPDCA
Helper I
Helper I

Create a string that "compounds" based on conditional statements

I need to create a string that compounds based on if there is a value in the column. 

 

I have a table that has a different column for each course (if they have completed the course there is a 1 in that field, if not its blank). I would like to create a column that can immediately show all the courses the user has not completed.  For this user it would show: 

 

MTA506, MTA507, MTA508, MTA509, etc etc.  (these end up being broken down into sections MTA501 - 505 & 506 - 510 & etc, I just cant figure out the overall logic)

DemingPDCA_5-1672864772821.png

 

DemingPDCA_4-1672864755496.png

 

Any suggestions? I think prefer it be in one field due since it will be in sections and only show for people in process of that secton anyway, so I can easily fit it on the current dashboard, but I'm open if there's a better way to do it!

 

Thanks!

 

4 REPLIES 4
grandtotal
Resolver III
Resolver III

@DemingPDCA , you need to unpivot the course columns.

Check out this:

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...


The best way may be the 'unpivot other columns' option: select the non course columns and unpivot other.

 

if I do that - it makes a row for each course - right? I would want all of them on 1 row. 

You are both correct. It will make a row for each course in the table in your model. However, you can still put them all on a row in a matrix visual as a single field.

you can do it on visualization but you have to unpivot the data table.

if you post a sample dataset (PFP Check table) we can help you to better understand.

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.