Forum Discussion

BlastS's avatar
BlastS
Icon for Helper I rankHelper I
7 years ago
Solved

Count Number test[Column(Failures)] = 1 when column X last row = 0.2

I am new to dax formulas i already tryend some things but nothing is realy working to get this result, actualy i got this columns for use to this calculation:   Index;Failures; ColumnX;  1        ...
  • Greg_Deckler's avatar
    7 years ago

    Try something like:

     

    Count of Failures = 
    VAR __table = ADDCOLUMNS('Table',"__failure",IF([Failures]=1 && MAXX(FILTER('Table',[Index]=EARLIER([Index])-1),[ColumnX])=.2,1,0)) 
    RETURN SUMX(__table,[__failure])