Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Community!
I'm having trouble trying to perform a measure. I need tu summarize sales with sepecific conditions. The conditions are: Sum sales that are more or equal than 1 million and that the sales rank is above 30.
The measure that I imagine is something like this:
Ventas Marcas Emergentes +1M = CALCULATE( 'Medidas VentasMPh'[Ventas]; GROUPBY( 'Marca'; 'Marca'[Leading Brands] ); FILTER( 'Medidas VentasMPh'; 'Medidas VentasMPh'[Ventas] >= 1000000 ); FILTER( 'Medidas VentasMPh'; 'Medidas VentasMPh'[Ranking Leading Brand por Ventas] > 30 ) )
What I notice is the second filter of the rank is not working.
The rank measure is:
Ranking Leading Brand por Ventas = /* Se rankea Leading Brand por la medida de Ventas (responde al selector de período YTD,MTH,MAT) */ IF( 'Medidas VentasMPh'[Ventas] <> 0; RANKX( ALLSELECTED('Marca'[Leading Brands]); 'Medidas VentasMPh'[Ventas] ) )
This rank measure works fine when using in a table with Leading Brands.
What should I change to make this work?
Thanks in advance.
Hi @Anonymous,
Can you share a dummy sample?
How about function Summarize? Is [Ventas] a measure or a column?
Best Regards,
Dale
Hi @v-jiascu-msft.
[Ventas] is a measure:
Ventas = SWITCH( VALUES( 'Selector Período'[Período] ); "YTD"; CALCULATE( SUM( 'Ventas Mensuales'[USD] ); DATESYTD( 'Período a Analizar'[Fecha] ); USERELATIONSHIP( 'Producto Compañía'[IdCompania-IdProductoCompania]; 'Ventas Mensuales'[IdCompania-IdProductoCompania] ) ); "MTH"; CALCULATE( SUM( 'Ventas Mensuales'[USD] ); USERELATIONSHIP( 'Producto Compañía'[IdCompania-IdProductoCompania]; 'Ventas Mensuales'[IdCompania-IdProductoCompania] ) ); "MAT"; CALCULATE( SUM( 'Ventas Mensuales'[USD] ); DATESINPERIOD( 'Período a Analizar'[Fecha]; LASTDATE( 'Período a Analizar'[Fecha] ); -1; YEAR ); USERELATIONSHIP( 'Producto Compañía'[IdCompania-IdProductoCompania]; 'Ventas Mensuales'[IdCompania-IdProductoCompania] ) ) )
Does this help to clarify the situation?
Thanks in advance.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |