Forum Discussion
Anonymous
9 years agoNot applicable
Sales by specific dimension
Hi everyone! I'm not sure if the subject of the message is the best, but here is the situation. I'm struggling with measures of sales filtering dimensions of the facts table. I have a report ...
v-qiuyu-msft
9 years agoCommunity Support
Hi Anonymous,
Would you please create some sample data model and share the report for us to test?
Best Regards,
Qiuyun Yu
- Anonymous9 years agoNot applicable
Hi v-qiuyu-msft
Thanks for your reply!
I was able to figure it out. I used the first scenario, using a grouping table of the main facts table, leaving only the dimensions that I wanted. The update whas in the mesaure. To make it dynamic to the slicers of the report, the following changes made it work:
MLPais = CALCULATE( CALCULATE( CALCULATE( CALCULATE( CALCULATE( SUM( 'Devaluación País'[ML] ); USERELATIONSHIP( 'Devaluación País'[IdPais]; 'País'[IdPais] ) ); USERELATIONSHIP( 'Devaluación País'[IdAreaTerapeutica]; 'Área Terapéutica'[IdAreaTerapeutica] ) ); USERELATIONSHIP( 'Devaluación País'[IdLinea]; 'Linea Comercial'[IdLinea] ) ); USERELATIONSHIP( 'Devaluación País'[IdFamilia]; 'Familia'[IdFamilia] ) ); USERELATIONSHIP( 'Devaluación País'[IdCanal]; 'Canal'[IdCanal] ) )
This way is working perfectly as I needed to.
Greetings!