Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Relational problem with calendar in datamodel

Hi PBI'ers,

 

I have created this datamodel:

 

Jaar = year

Datum = date

 

I want to be able to filter my contact measures on the same jaar filter as the other entities of the datamodel.

Also I need to use the calendar to measure my KPI with the Previousyear formula. 

But everything errors with the jaar entity, this is the error:

"Column '' in Table '' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table."

 

Does anyone have a clue on how to fix this?

 

Thanks a lot already!

MrNelsch

 

2 Replies

  • Stachu's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    looking at teh message you have blanks in the Jaar table

    you can filter them out in the query editor, or if the table is calculated in DAX you can add FILTER statement there that excludes blanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous,

     

    Maybe you can try to manually create a calculated table based on these tables and use it as bridge to link them.

    Bridge =
    DISTINCT (
        UNION (
            VALUES ( Table1[Year] ),
            VALUES ( Table2[Year] ),
            VALUES ( Table3[Year] )
        )
    )
    

     

    Regards,

    Xiaoxin Sheng