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

Spliting columns values to separate columns

Hi There,

 

I have a table of which is Recuritment table and it has column such as VacancyID, Vacancy Title and status.

 

VacancyIDVacnacyTitleStatus
1V1Filled
2V2Unfilled
3V3Cancelled

 

Status have drop down list of Filled, Unfilled and Cancelled. So when I drag status in PowerBi and filter the vacancies with filled only will show filled vacancies which is correct. 

 

VacancyIDVacancyTitleStatus
1V1Filled
2V2Filled
3V3Filled

 

What I would like to achieve is to have those status values if possible as columns and represented as 1 and 0 

 

VacancyIDVacancy TitleFilledUnfilledCancelled
1V1100
2V2010
3V3001

 

Thank you in advance.

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@Turka89 add the following measure

 

Count = COUNTROWS ( YourTable ) + 0

 

Add matrix visual:

 

- on rows, add vacancy id and vacancy title columns

- on columns, add Status column

- on values, add Count measure (we created above)

 

Drill down to the next level in your matrix visual and format table, turn off step layout, it will show vacancy id and vacancy title on the same row. 

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

@Turka89 try this

 

COUNTROWS( FILTER ( table, table [columns] IN { "value1", "value2", "value3"} ))

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Turka89 add the following measure

 

Count = COUNTROWS ( YourTable ) + 0

 

Add matrix visual:

 

- on rows, add vacancy id and vacancy title columns

- on columns, add Status column

- on values, add Count measure (we created above)

 

Drill down to the next level in your matrix visual and format table, turn off step layout, it will show vacancy id and vacancy title on the same row. 

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

Thank you so much sir for the " + 0 "  helped me to achieve what I am looking for atleat. I had tho to use filter() to filter the values I need so its like COUNTROWS( FILTER ( table, table [columns] = "value")) + 0 did the trick.

 

I do tho need help again with multiple values in one column like COUNTROWS( FILTER ( table, table [columns] = "value" + "value" + "value")) it doesn't work

 

Any suggestions?

@Turka89 try this

 

COUNTROWS( FILTER ( table, table [columns] IN { "value1", "value2", "value3"} ))

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

If  there wasn't a restriction on kudos I would've given you more thank you so much 

@Turka89 appreciate your kind words. You are recognizing the effort that is very kind of you. Best!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.