Forum Discussion

3s's avatar
3s
Regular Visitor
7 months ago
Solved

No results

Hi, I am new in here and in Dax. I couln't find a similar question, so hopefully someone can help. I am trying to achieve the same as Excel: countif(B:B;B2;A:A;D2). This is what I am doing: Count...
  • krishnakanth240's avatar
    7 months ago

    Hi 3s 

     

    Have tried this in desktop with your sample data. Please let me know the exact requirement/logic if it does not work.

     

     

  • Ashish_Mathur's avatar
    7 months ago

    Hi,

    These calculated column formulas work

    =CALCULATE(COUNTROWS(Data),FILTER(Data,Data[member]=EARLIER(Data[member])&&Data[year]=EARLIER(Data[year+1])))+0

     

    =CALCULATE(COUNTROWS(Data),FILTER(Data,Data[member]=EARLIER(Data[member])&&Data[year]=EARLIER(Data[year-1])))+0

    Hope this helps.