Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DAX Help

Team,

 

Please help me to fix the below DAX code error. I am a begginer in DAX, please help.

 

IF(AND(Query1[Apply Date]="9/26/2022", Query1[Apply Date]="10/20/2022")

&& Query1[Pay Code Name]="Total Hours" || (((Query1[Employment Status]>="10/20/2022"
&& Query1[Employment Status]="Terminated" || Query1[Termination Date]=BLANK()
&& Query1[Pay Rule Name] IN {"FD Salary","UTF Salary"}
&& Query1[Seniority Rank Date]<="10/20/2022"))), "Yes", "No")

 

Thanks,

Bala

4 Replies

  • Anonymous , Try like

     

    if(
    OR(Query1[Apply Date]= date( 2022,9,26) , Query1[Apply Date]= date(2022,10,20))
    && Query1[Pay Code Name]="Total Hours" || (((Query1[Employment Status]>= date(2022,10,20))
    && (Query1[Employment Status]="Terminated" || isblank(Query1[Termination Date]))
    && Query1[Pay Rule Name] IN {"FD Salary","UTF Salary"}
    && Query1[Seniority Rank Date]<=date(2022,10,20))), "Yes", "No")

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Amit sir for your quick code fix, that is the reason I tagged your name.

      It shows another error after I took your DAX code, pls help sir.