Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

showing infinity when adding both year and version

hi All

 

when i adding year or version in column in matrix table the varaince and % varaince showing correct 

when i adding and drill down both year and version % varaince showing inifnity  

note : 

Variance =
var y = LEFT(SELECTEDVALUE(TBA_SBA[Year]),4) & "p"
var z = LEFT(SELECTEDVALUE(TBA_SBA[Year]),4) & " LE"
var p = CALCULATE(SUM(TBA_SBA[Amount]),TBA_SBA[Year]= y)
var le =  CALCULATE(SUM(TBA_SBA[Amount]),TBA_SBA[Year]= z)
 return
  (p - le)  
 
regards
Dilip

1 Reply

  • Anonymous , Sum of Amount and Variance is coming same.  it mean formula is not correct

     

    var p = CALCULATE(SUM(TBA_SBA[Amount]),filter(all(TBA_SBA), TBA_SBA[Year]= y && [Service_provide] = max([Service_provide]) && [Function] = Max([Function])  ) )
    var le = CALCULATE(SUM(TBA_SBA[Amount]),filter(all(TBA_SBA), TTBA_SBA[Year]= z && [Service_provide] = max([Service_provide]) && [Function] = Max([Function]) ))

     

    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.