Forum Discussion
BlastS
Helper I
7 years agoCount 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 ...
- 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])
Greg_Deckler
Community Champion
7 years agoNot sure, seems to work for me. See Page 10 and Table 15 in attached file.
BlastS
Helper I
7 years agoI manipulate a litle bit your solution to my case and it worked, thanks buddy.
My problem was the index, since i got for example 8 datasets the index was the same for each dataset so i create a new one for all and it work fine.
Solution:
FailuresCount = IF([Failure])=1 && MAXX(FILTER('Table',[Index]=EARLIER([Index])-1),[ColumnX)])=.2,1,0)
- Greg_Deckler7 years ago
Community Champion
BlastS - Awesome! Glad you got it!