Forum Discussion
Anonymous
1 year agoNot applicable
Transform Excel Command to DAX or M Language
Hi, I created this command but need help to transform it to Dax or M Language. Thanks...tksnota... (CASE WHEN transtype IN('N','C','P','F') AND (((gbkmut.transsubtype NOT IN ('R','S') A...
_AAndrade
1 year agoResident Rockstar
Hi Anonymous,
Try this DAX measures:
Debit =
IF(
[transtype] IN {"N", "C", "P", "F"} &&
(
([transsubtype] NOT IN {"R", "S"} && [bdr_hfl] >= 0) ||
([transsubtype] IN {"R", "S"} && [bdr_hfl] < 0)
),
[bdr_hfl],
BLANK()
)
Credit =
IF(
[transtype] IN {"N", "C", "P", "F"} &&
(
([transsubtype] NOT IN {"R", "S"} && [bdr_hfl] >= 0) ||
([transsubtype] IN {"R", "S"} && [bdr_hfl] < 0)
),
BLANK(),
-[bdr_hfl]
)
Anonymous
1 year agoNot applicable
can i get it for calculated table...thanks...
- _AAndrade1 year agoResident Rockstar
I don't know if I understood well your question, but try this:
CalculatedTable = ADDCOLUMNS( 'OriginalTable', // The name of your table "@Debit", IF( [transtype] IN {"N", "C", "P", "F"} && ( ([transsubtype] NOT IN {"R", "S"} && [bdr_hfl] >= 0) || ([transsubtype] IN {"R", "S"} && [bdr_hfl] < 0) ), [bdr_hfl], BLANK() ), "@Credit", IF( [transtype] IN {"N", "C", "P", "F"} && ( ([transsubtype] NOT IN {"R", "S"} && [bdr_hfl] >= 0) || ([transsubtype] IN {"R", "S"} && [bdr_hfl] < 0) ), BLANK(), -[bdr_hfl] ) )