Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Tagging dimension table from fact table

Hey,

 

I have a standard one-to-many relationship between a dimension and a fact table.

 

I need to create calculated column for the dimension table where values are based on whether said dimension appears in a fact table.

 

I would only need 1 or 0 for each row on dimension table, but I can't seem to figure this one out.

 

edited for clarification.

  • Anonymous's avatar
    Anonymous
    8 years ago

    I managed to get the result I was looking for with this.

     

    = IF ( ISBLANK ( CALCULATE ( COUNTROWS ( VALUES ( Fact) ) ) ) ; 0 ; 1 )

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      vanessafvg I'm looking for a value.

       

      One calculated column for dimension table and in that column values 0 or 1 based on the fact table.

      • Anonymous's avatar
        Anonymous
        Not applicable

        I managed to get the result I was looking for with this.

         

        = IF ( ISBLANK ( CALCULATE ( COUNTROWS ( VALUES ( Fact) ) ) ) ; 0 ; 1 )