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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TofeB
New Member

calcular una medida mediante la extraccion de texto

Hola a todos, estoy buscando generar una medida que me calcule la suma de mi campo Amount, bajo el criterio de las facturas que contengan "MFV" y tambien la suma de Amount para el campo Tipo de Movimiento cuando este contiene la palabra "Leasing"

Dejo la descripcion de las tablas, muchas gracias.

TofeB_0-1677014490883.png

TofeB_1-1677014543614.png

de an

 

2 ACCEPTED SOLUTIONS
olgad
Super User
Super User

Hola, 

olgad_0-1677016221019.png

Medida =
var vCondition= CONTAINSSTRING(min(TableC[Factura]), "MVF")|| CONTAINSSTRING(min(TableC[Tipo de M]), "Leasing")
RETURN

Calculate
(Sum(TableC[Sumo]), Filter(TableC,vCondition=true))

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

olgad
Super User
Super User

Si necesitas dos medidas : 
M1=
Calculate
(Sum(Table[Amount]), Filter(Table,CONTAINSSTRING(min(Table[Tipo de Movimiento]), "Leasing")=true))

M2=
Calculate
(Sum(Table[Amount]), Filter(Table,CONTAINSSTRING(min(Table[Factura]), "MVF")=true))


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

3 REPLIES 3
TofeB
New Member

Muchas gracias, funciono perfecto!

olgad
Super User
Super User

Si necesitas dos medidas : 
M1=
Calculate
(Sum(Table[Amount]), Filter(Table,CONTAINSSTRING(min(Table[Tipo de Movimiento]), "Leasing")=true))

M2=
Calculate
(Sum(Table[Amount]), Filter(Table,CONTAINSSTRING(min(Table[Factura]), "MVF")=true))


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
olgad
Super User
Super User

Hola, 

olgad_0-1677016221019.png

Medida =
var vCondition= CONTAINSSTRING(min(TableC[Factura]), "MVF")|| CONTAINSSTRING(min(TableC[Tipo de M]), "Leasing")
RETURN

Calculate
(Sum(TableC[Sumo]), Filter(TableC,vCondition=true))

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.