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
Paulyeo11
Impactful Individual
Impactful Individual

Cómo convertir GL CODE 20000 TO REV 30000 COSG ?

Hola a todos

Abajo guión de trabajo bien :-

PNL ?
SWITCH(TRUE(),
'Tabla'[CÓDIGO GL]<-20000,"REVENUE",
'Tabla'[CÓDIGO GL]<-30000,"COGS",
BLANK())
¿Puedo saber cómo cambiar a continuación y todavía trabajando :-
PNL1 ?
SWITCH(TRUE(),
'Tabla'[CÓDIGO GL]>-20000,
'Tabla'[CÓDIGO GL]<-20000),"REV",
'Tabla'[CÓDIGO GL]>-30000,
'Tabla'[CÓDIGO GL]<-30000),"COGS",
BLANK())
i Obtener error msg :-

1 ACCEPTED SOLUTION

@Paulyeo11

Puedes probar esto

PNL1 = 
SWITCH(TRUE(),
'Table'[GL CODE]>=20000 &&'Table'[GL CODE]<30000,"COGS",
'Table'[GL CODE]>=40000 &&'Table'[GL CODE]<50000,"REV",
'Table'[GL CODE]>=80000 && 'Table'[GL CODE]<100000,"EXP",
BLANK())

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Paulyeo11

no está claro sobre esto. ¿Cuál es su lógica de cálculo y cuál es la salida esperada?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Paulyeo11
Impactful Individual
Impactful Individual

Hola Señor

gracias por compartir.

Quiero hacer mi guión más flexible.
sp Puedo establecer un rango de

20000 a 29999 - COGS

40000 a 49999 - REV

80000 a 99999 - EXP

Espero que lo entiendas.

Paul

@Paulyeo11

Puedes probar esto

PNL1 = 
SWITCH(TRUE(),
'Table'[GL CODE]>=20000 &&'Table'[GL CODE]<30000,"COGS",
'Table'[GL CODE]>=40000 &&'Table'[GL CODE]<50000,"REV",
'Table'[GL CODE]>=80000 && 'Table'[GL CODE]<100000,"EXP",
BLANK())

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Paulyeo11
Impactful Individual
Impactful Individual

Hola Ryan

Apreciamos mucho que funciona bien ahora.

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.