Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to avoid loading dimensions that not exist in the fact table

How do you avoid loading dimensional data not needed to the dataset in the best way.

 

- When I have worked with SSAS, I have used "native queries" and checked if the dimension exists in the fact table in the query.

 

- I also know that I can filter this out in views, but then the view is not usefull for others.

What do your recommend?

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    According to my understand, you want to keep rows in Dimension table matched from Fact table.

     

    You could select Dimension table --> use Merge-->Right Outer-->Remove unnecessary columns as shown below:

    If the data is continuous, you could add the whole column in Fact table as new Query ,then use it to create a parameter to filter the column in Dimension like this:

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    According to my understand, you want to keep rows in Dimension table matched from Fact table.

     

    You could select Dimension table --> use Merge-->Right Outer-->Remove unnecessary columns as shown below:

    If the data is continuous, you could add the whole column in Fact table as new Query ,then use it to create a parameter to filter the column in Dimension like this:

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Looks good, I will test that!

    • Anonymous's avatar
      Anonymous
      Not applicable

      I must load the dimensions that exists in the fact table.
      Have you understand my Q correct?

      • Daviejoe's avatar
        Daviejoe
        Icon for Memorable Member rankMemorable Member

        Hi, 

         

        apologies, I didn't understand your question correctly.

         

        Can you explain a bit further please?

  • Anonymous's avatar
    Anonymous
    Not applicable

    If I don't want to use Native queries.
    Can i do this check/filter on my dimensiontables in power query with Table.SelectRows?
    If the key exists in the fact table, it should also exists in my dimension table.
    If not exist in the fact table, don't add the row to my dimension table.

    How is the syntax for that if it is working?