Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AndreiK15
Helper II
Helper II

Crear medida con filtros dinámicos

Tengo una mesa con tiendas - cada tienda tiene un tipo de formato (por ejemplo, STANDARD, MEDIUM, MINI). Tengo ventas totales para todas las tiendas. Quiero crear una tabla con todas mis tiendas y sus formatos y dividir cada tienda de ventas en total para cada tipo de formato, no ventas totales para todos los formatos.

Tengo filtros para categorías. Cada tienda tiene categorías (por ejemplo, ALIMENTOS, NO ALIMENTOS). Cuando aplico este filtro, quiero obtener ventas para cada categoría, divididas por ventas totales para cada tienda.

También quiero dividir las ventas totales para cada categoría (global), a las ventas totales para cada tipo de formato (global).

Así que básicamente necesito dos medidas:

  1. Ventas totales para cada categoría/ventas totales para ese formato
  2. Ventas de tiendas para ventas de categoría / tienda total

Esto debe ser dinámico para que el filtro debe coincidir con el formato de tienda.

11 REPLIES 11
parry2k
Super User
Super User

@AndreiK15 bueno escuchar que se resuelve. No quiero entrar en detalles. La próxima vez que tengas una pregunta, lee este post para obtener tu respuesta rápidamente.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AndreiK15
Helper II
Helper II

Resuelto:

Esta es la solución para quien está interesado:

Categoría Ventas Nacionales ?
CALCULATE(SUM(Sales[Sales Net Amt]),ALLEXCEPT(Sites,Sites[Site Type 02])) - esto me dará un total para cada tipo de sitio para cada categoría
Formato de ventas: CALCULATE(SUM(Sales[Sales Net Amt]), ALLEXCEPT(Sites,Sites[Site Type 02]),REMOVEFILTERS('Merchandise Structure')) - esto me dará un total para cada tipo de sitio.
Lo siento, soy nuevo en Power BI. Tenía esto hecho en Excel, pero el archivo se hizo más grande y tuve que encontrar una solución con Power BI.
Gracias @parry2k !

AndreiK15
Helper II
Helper II

@parry2k enviado un msg privado con el archivo de Excel.

¡Gracias!

parry2k
Super User
Super User

@AndreiK15, tu nombre está por todas partes. Algo sencillo que parece tan complicado. ¿Por qué no poner datos de muestra en Excel y lanzar fórmulas allí. Conoces tus datos mejor que yo, ciertas cosas son obvias para ti, no para mí.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AndreiK15
Helper II
Helper II

@parry2k Estoy buscando obtener la venta total para el tipo de sitio 02 - si una tienda es STANDARD 2, para obtener las ventas totales para STANDARD 2 para todas las tiendas. Básicamente lo que quiero hacer es comparar las ventas de la tienda ... en una mano necesito comparar Share para cada categoría - que lo tengo y luego necesito ventas para cada tipo de sitio 02.

Por ejemplo, Tienda 1 - STANDARD 2 - Ventas totales para la tienda - 100k y 25k ventas para ALIMENTOS - la cuota para ALIMENTOS es 25%

Necesito una columna para que coincida con el tipo de sitio 02 para cada tienda y obtenga las ventas totales de todas las tiendas para ese formato.

Por ejemplo, Tienda 1 - STANDARD 2 - Ventas totales para la tienda - 100k - Ventas totales para formato STANDARD 2 - 500k

Store 2 - CIUDAD 2 - Ventas totales para la tienda - 50k - Ventas totales para formato CITY 2 - 250k

Store 3 - STANDARD 2 - Ventas totales para la tienda - 75k - Ventas totales para formato STANDARD 2 - 500k

y luego quiero dividir la venta total para todas las tiendas para la categoría (por ejemplo, ALIMENTOS) a las ventas totales para ese formato

y así sucesivamente ... espero que tenga sentido

Tengo las siguientes medidas para las ventas totales -

Total de ventas: CALCULATE([Sales Net Amt AY],REMOVEFILTERS('Estructura de mercancía'))
Ventas de categorías: SUMA(Ventas[Amt neto de ventas])
Entonces
% De la participación en la categoría DIVIDE([Ventas de categoría],[Ventas totales]).
Este trabajo bien para cada tienda, pero necesito comparar con la parte global.
espero que tenga sentido
¡Gracias!
parry2k
Super User
Super User

@AndreiK15 estás buscando algo como esto, tu descripción y nombres de columna no coinciden y todo es muy confuso. Debe agregar algunos resultados esperados para que sea fácil proporcionar la solución en lugar de pasar tiempo yendo y viniendo.

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AndreiK15
Helper II
Helper II

@parry2k aquí está el enlace onedrive:

https://1drv.ms/u/s!AsPHHoPRy-HShdoUb7M36aBroDB71Q?e=WtnXLp

¡Gracias!

parry2k
Super User
Super User

@AndreiK15 por desgracia nope, se puede compartir a través de una unidad de unidad / Google



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AndreiK15
Helper II
Helper II

@parry2k puede acceder al enlace?

AndreiK15
Helper II
Helper II

Hola

Por favor, encuentre el enlace

¡Gracias!

parry2k
Super User
Super User

@AndreiK15 será más fácil armar la solución si coloca un archivo pbix de muestra con la salida esperada.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors