Forum Discussion

madhuri_bathula's avatar
madhuri_bathula
Regular Visitor
5 years ago

DAX

Hi Everyone,

Desperatley  Need your help.apreciate your help in advance. i am not able to write this code in power bi.Here min and max come from calender date table. for eaxample mindate is 1/1/2021 and max date is 1/5/2021.Please see the screen shot below.

=if(
((ACTION8_DRILL='Observation Inv Approval(OBS)' or ACTION8_DRILL='Observation Action Plan(AP)' or ACTION8_DRILL='Observation EM Action(EM)')
and
(REP_DUE_DATE_DRILL >= $(=NUM($(min))) and REP_DUE_DATE_DRILL <= $(=NUM($(max)))))
or
(ACTION8_DRILL='Past Due from Prior Periods'
and
(isnull(ACTION_STATUS_DRILL) or ACTION_STATUS_DRILL='Late')
and
(REP_DUE_DATE_DRILL < $(=NUM($(min))) or isnull(REP_DUE_DATE_DRILL))
and
((OBS_ACT_COMPLETION_DT_DRILL >= $(=NUM($(min))) and OBS_ACT_COMPLETION_DT_DRILL <= $(=NUM($(max))))
or
(OBS_ACT_COMPLETION_DT_DRILL >= $(=NUM($(max))))
or
(isnull(OBS_ACT_COMPLETION_DT_DRILL)))),OpCo_Site,null())
 

Thanks in advance.