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

Se necesita ayuda dax

Tarde Todo,

Necesito un poco de ayuda para que lo siguiente funcione como se esperaba.

Tengo una tabla de datos de ingresos, esto incluiría

Cantidad = Varios valores

Fecha de pago = fecha de pago

SourceCode = Código fuente estructurado para realizar un seguimiento de los pagos

Método de pago = efectivo, domiciliación bancaria, etc.

Tengo una columna personalizada" que para la mayoría de las obras par, Todo lo que está debajo de ejecutivo la sección en negrita funciona. Lo que quiero que suceda es

este exceprt de SQL

"caso

cuando el código fuente como 'A%' y sourcecode no está en ('AUGO', 'AUPO', 'AURO', 'AUTO', 'AUCO', 'AUFO', 'OOOO', 'OAMA', 'OANA',

'OARS', 'ZREF', 'ZBAN', 'NAUG', 'AWAO', 'BUSR') y sourcecode no como 'AV%' entonces '01_Cash'

"

Construí el par en negrita y, aunque no hay errores, no parece que vea en mi columna SourceType el valor CASH devuelto?

Si alguien tiene algún puntero por favor dispare th

SOURECTYPE =
IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "A" && 'Fundraising Inc Report'[Payment Method]="TAX",
"IMPUESTO", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "A" && 'Fundraising Inc Report'[Método de pago]<>"TAX",
"Apelaciones", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "C",
"Corporativo", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "E",
"Emergencias", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "L",
"Legado", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "M",
"Donante mayor", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "R",
"Comunidad", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "U",
"No atribuible", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "Z",
"Reembolsos/Tarifas", IF(
'Fundraising Inc Report'[SOURCE_LETTER] = "A" & NOT
(SEARCH("AUGO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AUPO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AURO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AUTO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AUCO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AUFO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("OOOO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("OAMA", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("OANA", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("OARS", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("ZREF", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("ZBAN", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("NAUG", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AWAO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("BUSR", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AUGO", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0 ||
SEARCH("AV**", 'Fundraising Inc Report'[Código fuente (Campaña de origen)], 0 ) <> 0), "Cash",
IF('Fundraising Inc Report'[SOURCE_LETTER] = "0",
"000 Varios", "MISC"
)
))))))))))

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Brookied

¿lo has intentado

IF(LEFT(SOUCECODE,1)="A" && NOT SOURCECODE IN {"XXX","XXX","XXX"}&&LEFT(SOURCECODE,2)<>"AV", "01_CASH")

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Brookied

¿lo has intentado

IF(LEFT(SOUCECODE,1)="A" && NOT SOURCECODE IN {"XXX","XXX","XXX"}&&LEFT(SOURCECODE,2)<>"AV", "01_CASH")

@ryan_mayu

No me he dejado reconstruir en función de la sintaxis anterior y te lo haré saber, 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.