cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Ayuda de DAX de columna calculada

Estoy atascado con una creación de columna calculada, ¿puede alguien ayudar --

Aquí está mi código SQL & DAX para una COLUMNA CALCULADA.

Código SQL -

CASO CUANDO HEADER_TABEL. REGION 'AMERICA' Y DETAIL_TABLE. TRANS_CODE 'CANCELAR' ENTONCES 'CANCELLED' ELSE COALESCE(COALESCE(RIGHT(FINANCE. SUBSCRIPTION_STATUS_M,CHARACTER_LENGTH(FINANCE. SUBSCRIPTION_STATUS_M)-1),RIGHT(FINANCE_T.SUBSCRIPTION_STATUS_M,CHARACTER_LENGTH(FINANCE_T.SUBSCRIPTION_STATUS_M)-1)),'NO CANCELADO') FIN COMO SUBSCRIP_STATUS

DAX lo intenté --

SWITCH(TRUE(),
'HEADER_TABEL'[REGION]-"AMERICA && MAX('DETAIL_TABLE'[TRANS_CODE])-"CANCEL","CANCELLED",
COALESCE(COALESCE(RIGHT('HEADER_TABEL'[SUBSCRIPTION_STATUS_M],LEN('HEADER_TABEL'[SUBSCRIPTION_STATUS_M])-1),
RIGHT('HEADER_TABEL'[SUBSCRIPTION_STATUS_M_T],LEN('HEADER_TABEL'[SUBSCRIPTION_STATUS_M_T])-1)),"NO CANCELADO"),
BLANK())

1 REPLY 1
Highlighted
Super User VI
Super User VI

Re: Ayuda de DAX de columna calculada

@MKPBI_2805

Creo que en su caso un simple IF será una solución más apropiada

IF(

'HEADER_TABEL'[REGION]="AMERICA && MAX('DETAIL_TABLE'[TRANS_CODE])="CANCEL", 
"CANCELLED",
COALESCE(
RIGHT('HEADER_TABEL'[SUBSCRIPTION_STATUS_M],LEN('HEADER_TABEL'[SUBSCRIPTION_STATUS_M])-1),
RIGHT('HEADER_TABEL'[SUBSCRIPTION_STATUS_M_T],LEN('HEADER_TABEL'[SUBSCRIPTION_STATUS_M_T])-1),
"NOT CANCELLED"
)

)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors