Skip to main content
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Average calculation for Nested IF

I am using nested if condition to calculate the measure in the front end and it is working fine for Monthyear dimension in pivot table.I need to calculate the average value for quarteryear .For ex- If Jan 2022 has 1 ,Feb 2022 has 0.75 and mar 2022 has 1 for below expression then quarter value should be (1+0.75+1)/3..Any help would be appreciated

Sum(A) = '0' and Sum(B) >= '0',1,if(Sum(A) = '0' and Sum(B) < '0',0,
((Sum({$<Month_year={'10-2022','1-2023','4-2023','7-2023','10-2023'}>}B)+Sum(C)+Sum(D)+Sum(E)+Sum(F))/(Sum(A))) < 0,0,if(
((Sum({$<Month_year={'10-2022','1-2023','4-2023','7-2023','10-2023'}>}B)+Sum(C)+Sum(D)+Sum(E)+Sum(F))/(Sum(A))) > 1,1,

Labels (2)
0 Replies