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

Need help on returning the text value into table based on dynamic slicer

Hello Everyone,

I am working on an HR project and encountered this problem.

Problem: I wanted to return the Candidate name from the table based on slicer value and shows the respective candidate name for that particular slicer.

Example: My slicer has 4 values

Data Analyst

Blockchain Developer

Test Analyst

Software developer

Once I choose any one of the slicer value the related candidate name does not show in table. I have tried so many methods with lookup, values etc but could not write the correct Dax. 

 

Tables: Candidate                                      Role                                                              Fact_Combined

CandidateKey    Name                       Rolekey       RoleName                              Combined_Key     Rolekey     CandidateKey

1                         Lima                         1                 Software Dev                                    1              1                  1

2                         Aarav                        2                 Test Analyst                                      2              1                  2

3                         Jero                           3                 Data Analyst                                     3              2                  4

4                         Ajay                          4                BlockChain Dev                                  4               2                  7

5                         Ron                                                                                                        5               3                 6

6                        Shikha                                                                                                     6               3                3

7                        Adi

 

Desired output: Once select Data Analyst in slicer should get these given below details:

CandidateName    Role

Shikha                    Data Analyst

Jero                        Data Analyst

 

Please do the needful.

Thanks

Shikha

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @shikha3107 ,

 

Don't know if you have any relationships between you tables but you must make the following relationships:

  • Candidate[CandidateKey] 1 -> * Fact_Combined[CandidateKey]
  • Role[RoleKey] 1 -> * FactCombined[RoleKey]

 

Be aware that if you have the filter from the tables setup in a single option your table will not filter each other you need to place also the Role Name in the visualization in order to have the desired name.

 

If you just want to present the names without the role name you need to set the filters to both.

 

 

See attach file.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@shikha3107 

 

Just like Felix said, and you don't need to use lookup. I created this in the pbi, it works fine. Please see the screenshots below.

 

2.PNG1.PNG





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

Proud to be a Super User!




MFelix
Super User
Super User

Hi @shikha3107 ,

 

Don't know if you have any relationships between you tables but you must make the following relationships:

  • Candidate[CandidateKey] 1 -> * Fact_Combined[CandidateKey]
  • Role[RoleKey] 1 -> * FactCombined[RoleKey]

 

Be aware that if you have the filter from the tables setup in a single option your table will not filter each other you need to place also the Role Name in the visualization in order to have the desired name.

 

If you just want to present the names without the role name you need to set the filters to both.

 

 

See attach file.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.