Forum Discussion
Possible loop in DAX
- 3 years ago
Hi turcelaygoy
I think now is correct.Filtered variation_2 = AVERAGEX ( CROSSJOIN ( CROSSJOIN ( VALUES ( 'UT_INII'[UT1] ), VALUES ( 'UT_FIN'[UT2] ) ), VALUES ( 'Tabla Proyecto'[PROYECTO] ) ), VAR T = CALCULATETABLE ( Hoja1 ) RETURN AVERAGEX ( GENERATESERIES ( [UT1], [UT2] - 1, 1 ), VAR CurrentFaults = SUMX ( FILTER ( T, Hoja1[Columna] = [Value] ), Hoja1[FALTAS TOTALES (QA)] ) VAR NextFaults = SUMX ( FILTER ( T, Hoja1[Columna] = [Value] + 1 ), Hoja1[FALTAS TOTALES (QA)] ) RETURN DIVIDE ( NextFaults - CurrentFaults, CurrentFaults ) * 100 ) )
nlka
turcelaygoy
Thsnk you! Now the picture is more clear. However, you still did not expalin what is the problem. What do you mean by "It returns the variation between the initial unit and the (final unit-1)."? Please elaborate on this with one example and advise what should be the correct result.
- turcelaygoy3 years agoHelper I
I have chosen project Oslo and initial UT 30 and final UT 32 and it returns me the variation between UT 30 and 33 that is 655% but it should say -67% (these results have been calculated filtering the variables in the excel sheet of the database). But then I have tried different projects and the variation that it returns is not correct. So right now the measure gives a result but not correct.
- tamerj13 years agoCommunity Champion
Can you share a sample file?
- turcelaygoy3 years agoHelper I
of the excel sheet or the power BI