Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
I need to write dax for below condition like externally funded & internally funded I need to eliminate location code which shaded to calculate external and need to eliminate all except location code that gives internal. And need to calculate YOY% Ext & Int YOY%
I hav a sql query
Ext. Funded A$ =
SUM(REGIS_PAYM_F.TOT_NET_USD_AM)
FROM
REGIS_PAYM_F
WHERE
PAYM_MTHD_TYPE_CD IS NULL
OR PAYM_MTHD_TYPE_CD <> ‘Location Code’
Int. Funded A$ =
SUM(REGIS_PAYM_F.TOT_NET_USD_AM)
FROM
REGIS_PAYM_F
WHERE
PAYM_MTHD_TYPE_CD = ‘Location Code’
Thanks
ng
Solved! Go to Solution.
something like this:
[Ext. Funded A$] = CALCULATE ( SUM ( REGIS_PAYM_F[TOT_NET_USD_AM] ), OR ( REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] = BLANK (), REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] <> "Location Code" ) )
[Int. Funded A$] = CALCULATE ( SUM ( REGIS_PAYM_F[TOT_NET_USD_AM] ), REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] = "Location Code" ) )
This is assuming that your TableName is still "REGIS_PAYM_F", and that your ColumnNames are [TOT_NET_USD_AM] and [PAYM_MTHD_TYPE_CD]
I strongly recommend renaming tables and columns with friendly names, it makes it MUCH easier to create DAX measures when the user fully understands what the columns mean.
something like this:
[Ext. Funded A$] = CALCULATE ( SUM ( REGIS_PAYM_F[TOT_NET_USD_AM] ), OR ( REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] = BLANK (), REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] <> "Location Code" ) )
[Int. Funded A$] = CALCULATE ( SUM ( REGIS_PAYM_F[TOT_NET_USD_AM] ), REGIS_PAYM_F[PAYM_MTHD_TYPE_CD] = "Location Code" ) )
This is assuming that your TableName is still "REGIS_PAYM_F", and that your ColumnNames are [TOT_NET_USD_AM] and [PAYM_MTHD_TYPE_CD]
I strongly recommend renaming tables and columns with friendly names, it makes it MUCH easier to create DAX measures when the user fully understands what the columns mean.
Dear Cris,
Thanks for your solution its works
thanks