Forum Discussion

shikha3107's avatar
shikha3107
Frequent Visitor
6 years ago
Solved

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

  • 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.

2 Replies

  • 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.

     

  • 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.