2 Replies Latest reply: Mar 8, 2018 8:57 AM by Hans Christian Riis RSS

    2 bar chart having same expression but different dimension different results

    Prashant Sancheti

      Bar Chart 1:

       

      Dimension : Region

      measure:

       

      if (sum([Quantity]) <> 0,

       

      if (Sum([DailyQuantitySales]) <> 0,


      sum({<[Region] ={"=Sum([margin])>=0"} >}[DailySales]) - sum({<[Region] ={"=Sum([margin])>=0"} >}[DailyVarSales]),

       

      sum({<[Region] ={"=Sum([margin])>=0"} >}[DailySales])

      )

      ,0)

       

       

      Bar Chart 2:

       

      Dimention : Country

       

       

      if (sum([Quantity]) <> 0,

       

       

      if (Sum([DailyQuantitySales]) <> 0,

       

       

      sum({<[Country] ={"=Sum([margin])>=0"} >}[DailySales]) -sum({<[Country] ={"=Sum([margin])>=0"} >}[DailyVarSales]),

       

      sum({<[Country] ={"=Sum([margin])>=0"} >}[DailySales])

      )

      ,0)

       

      Both are giving different total . What could be the reason ?