The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
i wanna to write the code in power using DAX expression .
(CASE
when se.worthless = 'Y'
then po.market_value_trade_date_base
when se.MINOR_SECURITY_TYPE_NUMBER IN (110, 115, 100)
then po.market_value_trade_date_base
when po.market_value_trade_date_base = 0
then po.fed_cost_trade_date_base
else po.market_value_trade_date_base
end) ADJUSTED_MV,
in the above code, there are two tables SE and PO . These two tables are mapped.
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
In DAX, they are very close. You could refer to the following DAX.
ADJUSTED_MV = SWITCH ( TRUE (), 'SE'[worthless] = "Y", 'PO'[market_value_trade_date_base], 'SE'[MINOR_SECURITY_TYPE_NUMBER] IN { 110, 115, 100 }, 'PO'[market_value_trade_date_base], 'PO'[market_value_trade_date_base] = 0, 'PO'[fed_cost_trade_date_base], 'PO'[market_value_trade_date_base] )
Hi @Anonymous ,
In DAX, they are very close. You could refer to the following DAX.
ADJUSTED_MV = SWITCH ( TRUE (), 'SE'[worthless] = "Y", 'PO'[market_value_trade_date_base], 'SE'[MINOR_SECURITY_TYPE_NUMBER] IN { 110, 115, 100 }, 'PO'[market_value_trade_date_base], 'PO'[market_value_trade_date_base] = 0, 'PO'[fed_cost_trade_date_base], 'PO'[market_value_trade_date_base] )