Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create a new Table or Column Base on lookup Value

Dear, Beloved community 

I have 2 tables: 1 have only 20 value (Fact) and the other have many value because it a main table(Dim). When i connect the F table to Dim for lookup value it list all the name in Dim table even though the key in Fact table does not have the value.

Below is an example: The Fact table is am gonna use as a slicer but only have ID which its name stored in Dim table but the dim have many value when i connect they 2 table and use the Name column in slicer it just show all the value in Dim which i want is a reference to show the name that only exist in Fact 

 

Fact Table

Key_ID
1
2
3

Dim_Table

Key_IDName
1Key
2Lock
3Door
4Carpet
5Shoes
6Cabinet
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    Please try below steps:

    1. my table

    Fact_Table:

    Dim_Table:

    Model:

    2. add a new column in Fact_Table

    Name_From_Dim = LOOKUPVALUE(Dim_Table[Name],Dim_Table[Key_ID],Fact_Table[Key_ID])

    3. add a slicer and table visual

    Please refer attached .pbix file.

     

    Best regards,
    Community Support Team_ Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Hi,

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

    One of ways to create a slicer that only appears in the fact table is creating a new column in the fact table.

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please try below steps:

    1. my table

    Fact_Table:

    Dim_Table:

    Model:

    2. add a new column in Fact_Table

    Name_From_Dim = LOOKUPVALUE(Dim_Table[Name],Dim_Table[Key_ID],Fact_Table[Key_ID])

    3. add a slicer and table visual

    Please refer attached .pbix file.

     

    Best regards,
    Community Support Team_ Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.