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
asalazarjr
Frequent Visitor

Ayuda para crear una columna calculada para el valor total de la categoría

Hola, necesito ayuda para crear una columna estática para Valor de categoría total.

Solo necesito el valor de categoría total para 1 trimestre en todo mi conjunto de datos. (por ejemplo: Q2) y marque rest como valor 0.

Trimestre (texto) Categoría (texto) Subcategoría (Texto) Valor (o) Total de la categoría (o)
Q1Fruta123 $ 15.00 0
Q1Fruta12 $ 20.000
Q1Vegetal156 $ 10.00 0
Q1Vegetal152 $ 20.00 0
Q2Vegetal2525 $ 30.00 $ 80.00
Q2Vegetal2512 $ 50.00 $ 80.00
Q2Fruta6433 $ 10.00 $ 10.00
Q3Vegetal347 $ 20.00 0
Q3Vegetal3636 $ 15.00 0
Q3Vegetal98 $ 20.00 0
Q3Fruta6596 $ 30.00 0
Q3Fruta272 $ 40.000
Q4Vegetal13 $ 50.00 0
Q4Fruta167 $ 30.000
Q4Vegetal156 $ 10.00 0

Gracias por las sugerencias!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@asalazarjr , Pruebe una nueva columna como

if([Quarter] á"Q2", sumx(filter(table,[Quarter] á earlier([Quarter]) && [Category] á earlier([Category])),[Value]))

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hola @asalazarjr ,

Por favor, háganos saber si las respuestas anteriores son útiles.

Si lo son, por favor acepte siempre las respuestas que tengan sentido como solución a su pregunta para que las personas que puedan tener la misma pregunta puedan obtener la solución directamente.

Si no, por favor dénos más detalles.

Saludos

Icey

amitchandak
Super User
Super User

@asalazarjr , Pruebe una nueva columna como

if([Quarter] á"Q2", sumx(filter(table,[Quarter] á earlier([Quarter]) && [Category] á earlier([Category])),[Value]))

mahoneypat
Employee
Employee

Puede utilizar esta expresión de columna para hacer eso

Categoría Total ??
SI (
Tabla[Cuarto(texto)] - "Q2",
CALCULAR (
SUM ( Tabla[Valor(-)] ),
ALLEXCEPT (
Mesa
Tabla[Cuarto(texto)],
Tabla[Categoría(texto)]
)
),
0
)

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.