Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Circular dependency

Hello community, I am having a problem when I want to apply the following DAX that refers to Circular dependency:

 

cantidad_plataforma_todas = if(MoviesAllServicesStreaming[cantidad_plataforma] = 1, "Una plataforma", if (MoviesAllServicesStreaming[cantidad_plataforma] = 2, "Dos plataformas", if(MoviesAllServicesStreaming[cantidad_plataforma] = 3, "tres plataformas", if(MoviesAllServicesStreaming[cantidad_plataforma] = 4, "Cuatro plataformas"))))
 

My question is Do you have any suggestion to solve it? I have no problem to share the file since it is an educational project.

 

https://drive.google.com/drive/folders/1CRNkm2UyaBuwJQTSBg7oT0wMQFe9zt10?usp=sharing

 

Thank you.

1 Reply

  • Your circular dependency is a caused by a  combination of:

    1. The use of calculate in the calculated colomn [cantidad_plataforma]
    2. Lack of a column with unique identifiers (ID has a few blanks)

    The simplest solution is not using calculate in [cantidad_plataforma]. The calculation can be done using row context (just adding the columns).

    (there is an error in  [cantidad_plataforma]: ‘Hulu’ is counted twice, but that has nothing to do with your circular dependency)