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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Syndicate_Admin
Administrator
Administrator

¿Cómo interpretar la expresión para PnL_Table ?

Hola a todos

Tengo 2 informes de P&L trabajando bien.

Trate de combinar 2 informes de P&L en 1.

Después de combinar ambos en 1, obteré un error.

admin11_0-1614997184616.png

Ahora necesito entender lo que está haciendo el siguiente código :-

_PNL_Table_S =

T_REV VAR =

FILTRO ( DISTINTO ( GL_S[1_REV] ), NO ( ISBLANK ( GL_S[1_REV] ) ) )
VAR t_cogs =

FILTRO ( DISTINTO ( GL_S[1_COGS] ), NO ( ISBLANK ( GL_S[1_COGS] ) ) )

T_OTH VAR =

FILTRO ( DISTINTO ( GL_S[1_OTH] ), NO ( ISBLANK ( GL_S[1_OTH] ) ) )

T_EXP VAR =

FILTRO ( DISTINTO ( GL_S[1_EXP] ), NO ( ISBLANK ( GL_S[1_EXP] ) ) )

T_REV_COGS VAR =

UNION ( t_rev, t_cogs, t_oth, t_exp )

VAR tbl = {(t_rev, 1), (t_cogs, 2), (t_oth, 3) , (t_exp, 4)}

devolución

Tbl
Espero que alguien pueda compartir conmigo.
Encerré mi archivo PBI que no hay error , porque cuando elimino todos los datos , el error se desenmarcó.
Paul Yeo

1 ACCEPTED SOLUTION

@admin11

Quite la expresión FILTER. No es necesario

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Es difícil ver dónde está el problema. Sin embargo, JFYI, No es necesario filtrar DISTINCT sin espacios en blanco; DISTINCT devuelve una tabla de valores únicos excluyendo blanks..

@PaulDBrown

Gracias por compartir.

A continuación se muestra mi sintaxis orginal :-

_PNL_Table =
T_REV VAR =
FILTRO ( DISTINTO ( GL[1_REV] ), NO ( ISBLANK ( GL[1_REV] ) ) )
VAR t_cogs =
FILTRO ( DISTINTO ( GL[1_COGS] ), NO ( ISBLANK ( GL[1_COGS] ) ) )
T_OTH VAR =
FILTRO ( DISTINTO ( GL[1_OTH] ), NO ( ISBLANK ( GL[1_OTH] ) ) )
T_EXP VAR =
FILTRO ( DISTINTO ( GL[1_EXP] ), NO ( ISBLANK ( GL[1_EXP] ) ) ) )
T_REV_COGS VAR =
UNION ( t_rev, t_cogs, t_oth, t_exp )
VAR tbl = {(t_rev, 1), (t_cogs, 2), (t_oth, 3) , (t_exp, 4)}
devolución
Tbl

A continuación la sintaxis es donde elimino filtro En blanco :-
_PNL_Table =
T_REV VAR =
FILTRO ( DISTINCT ( GL[1_REV] ))
VAR t_cogs =
FILTRO ( DISTINCT ( GL[1_COGS] ))
T_OTH VAR =
FILTRO ( DISTINCT ( GL[1_OTH] ))
T_EXP VAR =
FILTRO ( DISTINCT ( GL[1_EXP] ))
T_REV_COGS VAR =
UNION ( t_rev, t_cogs, t_oth, t_exp )
VAR tbl = {(t_rev, 1), (t_cogs, 2), (t_oth, 3) , (t_exp, 4)}
devolución
Tbl

Obtego error msg :-

admin11_0-1615116273695.png

Mi archivo PBI :-

https://www.dropbox.com/s/jt7drogywitrrg5/PBS%20GL%20ASK%20HOW%20TO%20REMOVE%20BLANK_.pbix?dl=0

Paul

@admin11

Quite la expresión FILTER. No es necesario

@PaulDBrown

Gracias por trabajar bien ahora.

Paul

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors