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
Syndicate_Admin
Administrator
Administrator

Medida calculada con filtro

Hola a todos

Tengo una tabla de muestra como esta:

PRUEBA
CuentaImporte
5000 US$ 10,00
RES001 US$ 15,00
5001 US$ 23,00
TRABAJO US$ 76,00
7051 US$ 168,00
5746 US$ 641,00

(Suponiendo que las filas continúen y continúen > filas 1000 con múltiples valores)

Los identificaciones de cuenta no están en formato de número porque algunas cuentas tienen letras como el ejemplo anterior.

Quiero crear una nueva medida para resumir todos los montos para cuentas que comienzan con 5 (es decir: 5000, 5001, etc.)

Actualmente mi medida se ve así:

Medida = CALCULATE(SUM(TEST[Amount]),TEST[Account]="5000"&&TEST[Account]="5001"&&TEST[Account]="5002" ... (y así sucesivamente)

Me pregunto si hay una manera de filtrar las cuentas 5xxx en mi fórmula. Probé TEST[Account]="5???" pero no funciona.

Gracias

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hola @voiciK ,

Prueba esto:

Measure = CALCULATE(SUM(TEST[Amount]),FILTER(TEST , LEFT('TEST'[ACCOUNT],1) = "5"))  

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola @voiciK ,

Prueba esto:

Measure = CALCULATE(SUM(TEST[Amount]),FILTER(TEST , LEFT('TEST'[ACCOUNT],1) = "5"))  

¡Brillante!

Gracias 😄

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.