Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

First Occurrence of Value as a Custom Column

What would be the equivalent of the following DAX in Power Query...I am trying to bring the First Occurence Check column info into another table but the relationship between table A and table B is many to many and the i have multiple occurance of the SO Order Number. I only want from Table A where the First Occurence Check is 1 in table B. 

 

I cannot measure the two table as its a calculated column in Table A.


First Occurence Check = if (calculate (COUNTROWS(NEWBI_COMPS),filter(ALLEXCEPT(NEWBI_COMPS,NEWBI_COMPS[SO]),NEWBI_COMPS[Index]<=earlier(NEWBI_COMPS[Index])))>1,0,1)