Forum Discussion
madhuri_bathula
5 years agoRegular Visitor
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())
((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.
1 Reply
- parry2kSuper User
madhuri_bathula it will be easier if you share sample data with the expected output. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490