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
Mesku01
Frequent Visitor

Filter words from two columns and display the result in one table

Hello Dears,

 

I am using powerapps to collect user information and sharepoint online as datasource.I would like to filter two columns and display the result as one as listed below using power bi, Could you please advice 🙂.

 

The column Interested in only the following , is a multichoice column (The user can select morethan one value) and the column Interested in all course is a dropdown column (YES,NO)

 

NameStudent IDInterested in all course Interested in only the following
ABC1234NOAccounting,IT
DEF5678NOLaw,Marketing
GHI9810NOIT,Engineering,Law
JKL112313NOMarketing,Accounting
MNO141516YES 
PQX171819YES 
YZA202122YES 

 

course Types
Accounting
Law
IT
Engineering
Law
Marketing

 

In power bi slicer (Course selected ) , Example : Accounting ,should show all student that prefer to take accounting course including those student that 

select Interested in all course as YES.

Thanks in advance for your help.

17 REPLIES 17
Mesku01
Frequent Visitor

Hi @v-jingzhang ,

 

Could you please check my questions? Thanks in advance!

 

Hi @Mesku01 

 

Firstly, please check if the attached file meets your first need.

Secondly, do you want to show all matching results in a single report page? Since some students have multiple interested courses, they will need to appear in multiple course groups.

And do you have a student table in your model which records those students info to be displayed?

 

  

Hi @v-jingzhang 

Thank you so much for your time, the attached file works for my current requirement.

Secondly, do you want to show all matching results in a single report page?

Yes,

And do you have a student table in your model which records those student’s info to be displayed?

No, I only have one table that records student details (Name, age, current location etc.) Captured using PowerApps form. The form contains multichoice column i.e., interested in the following course and single text field interested in all courses.

 

Thanks!

Mesku01
Frequent Visitor

Is it possible to have an opption to view From Course Type to Course type , Ex. Two Slicer that help to See possible course switch from Accounting to IT and from IT to Accounting, instead of the Name slicer?

v-jingzhang
Community Support
Community Support

Hi @Mesku01 

 

You can add the following measure as a filter on the table visual and set it to show items when value is 1. I have attached the sample pbix at bottom. You can download it to see details. 

Measure = 
VAR _selectedCourse = SELECTEDVALUE(Courses[course Types])
RETURN
SWITCH(TRUE(),
SELECTEDVALUE('Table'[Interested in all course ])="YES",1,
SELECTEDVALUE('Table'[Interested in all course ])="NO",IF(CONTAINSSTRING(SELECTEDVALUE('Table'[Interested in only the following]),_selectedCourse),1,0),
0)

vjingzhang_0-1670297165722.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi v-jingzhang,

Thanks a lot, it answers my question. Is it possible to get the total count of the selection? Ex. Total course selected by course category?

 

And Second question : View the matching result as popup screen/table like the below sample :

NameStudent IDInterested in all university Interested in only the followingCurrent course
ABC1234NOAccounting,ITMarketing
DEF5678NOLaw,MarketingLaw
GHI9810NOIT,Engineering,LawMarketing
JKL112313NOMarketing,AccountingIT
MNO141516YES Marketing
PQX171819YES Law
YZA202122YES IT
Slicer Selection(Course Type)   
Accounting   
First Filter Result
NameStudent IDInterested in all university Interested in only the followingCurrent course
ABC1234NOAccounting,ITMarketing
JKL112313NOMarketing,AccountingIT
MNO141516YES Marketing
PQX171819YES Law
YZA202122YES IT
Final Result : Switch student based on course interest
NameStudent IDInterested in all university Interested in only the followingCurrent course
ABC1234NOAccounting,ITMarketing
JKL112313NOMarketing,AccountingIT

Thanks

Hi @Mesku01 

 

Sorry I don't 100% understand. What is the "Total course selected by course category"? Do you mean that you might select multiple courses in the course slicer at one time? If so, you can use below measure to get the number of selected ones:

Measure 2 = COUNTROWS(Courses)

In this scenario, my original measure needs to be modified. 

 

For the second question, do you want something like Power BI custom tooltip page on a visual?

Create report tooltip pages in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Jing

@v-jingzhang Thank you very much for your reply.

 

1. For the second question, do you want something like Power BI custom tooltip page on a visual?

 

I want to see students who wants to switch for example from accounting to IT and students who wants to change their course from IT to accounting. the administrator will use different filtering criteria like age, course grade ,course type (slicers ) once done he administrator will view matching result , The screen will show the  matching rows that match the filter criterieas of the student and the administrator will get information about Which student wants to exchange course with another student . Since there might be many students matching the selection criteria ,The administrator will do a selections of the students. 

Mesku01_0-1670416259071.png

 

After selecting the students , a report will pop up to show all possible candidates. 

 

Please let me know if you still need additional information.

 

Thanks.

 

 

Hi @Mesku01 

 

You can add a Name slicer to the report and put the same filter measure on it to filter items when value is 1. The names displayed in the name slicer will be consistent with those in the table visual. Then use the name slicer to select the students you want to view. 

vjingzhang_0-1670486764129.png

 

Best Regards,

Jing

Thanks , I will try it now and will let you know.

Is it possible to add a slicer that show course change between students i.e Who wants to change from Accounting to IT and from IT to Accounting , Because if the selection is made by student name , it will be long list (3000 students).  Thanks.

Hi @Mesku01 

Do you mean that we need to see the current course type slicer as a "To Course" slicer, and add another "From Course" slicer which is based on "Current Cource" column?

Yes, To View as from Course to Course slicer . Thanks. 

Hi @Mesku01 Please check the new file. 

Thanks , I am checking. How did you create course 2? 

Mesku01_0-1670492762338.png

 

It's a calculated table. You can see its formula in the formula bar. Or you can also use Enter data to create it or duplicate Courses table in PQ. 

Thank you very much! Once we got the filter value (Matching results of 1000 ) , Is there a way to 1. Select for example 10 students (Using Checkbox or other option)

2. Generate a report that shows group by Course Type, Student name, Index No ?
Ex ,
Matching Results
Form Accounting to IT
Student Name 1 ,Index,Age
Student Name 2 ,Index,Age
From Marketing to IT 
Student Name ,Index,Age
Student Name ,Index,Age

Thank you so much for your unreserved support!

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.

Top Solution Authors
Top Kudoed Authors