Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.