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

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.

Reply

Fórmula de porcentaje de Dax en varias columnas

¡Hola!

Estoy luchando para crear una fórmula que me puede dar un resultado de % cuando se filtra por cualquier combinación de otras tres columnas.

Aquí hay una maqueta de mi mesa:

UbicaciónAño Fiscal+Mes+NombreSkuValor
País A2019-P08-FebProducto A0
País A2019-P09-MarProducto A3
País A2019-P10-AprProducto A22
País A2019-P11-MayoProducto A2
País A2019-P12-JunProducto A0
País A2020-P01-JulProducto A0
País A2020-P02-AugProducto A0
País A2020-P03-SepProducto A0
País A2020-P04-OctProducto A0
País A2020-P05-NovProducto A0
País A2020-P06-DicProducto A22
País A2020-P07-JanProducto A13
País A2020-P08-FebProducto A0
País A2020-P09-MarProducto A0
País B2019-P08-FebProducto A0
País B2019-P09-MarProducto A0
País B2019-P10-AprProducto A0
País B2019-P11-MayoProducto A0
País B2019-P12-JunProducto A0
País B2020-P01-JulProducto A0
País B2020-P02-AugProducto A0
País B2020-P03-SepProducto A0
País B2020-P04-OctProducto A0
País B2020-P05-NovProducto A0
País B2020-P06-DicProducto A1
País B2020-P07-JanProducto A0
País B2020-P08-FebProducto A0
País B2020-P09-MarProducto A0
País B2019-P08-FebProducto B2
País B2019-P09-MarProducto B4
País B2019-P10-AprProducto B7
País B2019-P11-MayoProducto B9
País B2019-P12-JunProducto B0
País B2020-P01-JulProducto B0
País B2020-P02-AugProducto B0
País B2020-P03-SepProducto B0
País B2020-P04-OctProducto B0
País B2020-P05-NovProducto B0
País B2020-P06-DicProducto B4
País B2020-P07-JanProducto B0
País B2020-P08-FebProducto B0
País B2020-P09-MarProducto B0

Y aquí hay algunos ejemplos de los resultados que quiero formular para mostrar:

PaísProductoMesSin SKUsSin ubicacionesNo. MesesNo. de Valores > 0No. de los Valores 0Resultado %:
AAtodo111451436%
BAtodo11141147%
A&BAtodo122852318%
BA&Btodo212862221%
AA2019-P09-Mar11110100%
AA2019-P08-Feb & 2019-P09-Mar1121150%
BA&B2019-P10-Apr1211050%
A&BA2020-P06-Dic & 2020-P07-Jan1223175%
A&BA&B2020-P06-Dic & 2020-P07-Jan2224267%
BA&B2020-P06-Dic & 2020-P07-Jan2122250%
todotodotodo2242113126%

Siento que esto debería ser simple, pero he probado algunas cosas diferentes y hasta ahora no hay suerte.

¿Necesito crear múltiples fórmulas e.. g uno para la ubicación y uno para el mes, o es posible hacer todo en uno?

¡Gracias!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Prueba una medida como esta

divide(sumx(table,if(Table[Value]>0,1,0)),count(Table[Value]]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Prueba una medida como esta

divide(sumx(table,if(Table[Value]>0,1,0)),count(Table[Value]]))

Increíble, gracias!

Enchufado la fórmula y de repente mis gráficos están haciendo mucho más sentido 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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