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.
Quiero calcular la cuota de mercado de cada cliente por categoría. Tengo una tabla de dimensiones de mercado que contiene 9 clientes, pero mi tabla de hechos sólo tiene 2:
Creé una medida para calcular las ventas totales de mercado para cada semana y categoría de la siguiente manera:
Total Market Sales =
CALCULATE (
[Total Volume Sales],
ALLEXCEPT ( fSales, dProducts[Category] ),
KEEPFILTERS ( VALUES ( dDates[Date] ) ),
KEEPFILTERS ( VALUES ( dProducts[Manufacturer] ) )
)
La fórmula genera los totales correctos, pero muestra los 9 mercados en mi tabla de dimensiones en lugar de solo los 2 activos:
¿Qué me estoy perdiendo?
sumx(values(table[customer]),Total Market Sales =
CALCULATE (
[Total Volume Sales],
ALLEXCEPT ( fSales, dProducts[Category] ),
KEEPFILTERS ( VALUES ( dDates[Date] ) ),
KEEPFILTERS ( VALUES ( dProducts[Manufacturer] ) )
)
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |