Forum Discussion

Gianf's avatar
Gianf
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Adding dimension(s) to matrix duplicates rows

Hi all, 

I have to calculate revenues in 4 different ways, based on as many flags in facts table; measures work OK and give expected result 

Flags are like this 

Now, if I merge together flags and corresponding measures, the matrix "explodes", showing also non-existent flags on the same row: 


The same happens if the users do the same using "Analyze in Excel" - which is the actual purpose of this semantic model. 

The desired output should be like this: 

Measures are built all the same way, like this 

each filtering the corresponding dimension and, as told before, they give the correct value, so I believe tha are not guilty. 
The weird thing is that, using simply the filter condition in Calculate(), instead of puttig it into a Filter() like I did, rows double again, so I ended with 16 rows each! 

Model is a regular star-schema: 


What am I missing? Can anyone help me resolving this issue? 

Thanks in advance, 

Gianfranco 

p. s. attached a sample file that reproduces the behavior
https://drive.google.com/file/d/1v3iunD9ZsfOyFjfcSHKC81KDISnDhX52/view?usp=sharing