Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Unexpected different result in two table visuals with same measure

I have a measure with unexpected behavior. 

The measure sums cumulatively based on a max()-filter. 

 

AG Sum Total Value = Calculate(
Sum(Sheet1[amount]);
FILTER( ALL(Sheet1[Voyage]); Sheet1[Voyage] <= MAX( Sheet1[Voyage]));
Sheet1[account] >= 15130;
Sheet1[account] <= 15140
)

 

 

There are two levels of filters; 

Vessel and Voyage. 

Intention is to show accumulated amount per given max Voyage.  

 

Below picture shows the setup and the issue. The two table visuals with the same Measure does not show the same result. 

 

The peculiar issue is that this concept works for the earlier voyages (BCE116 to BCE172), where the result in both tables are the same, as expected.  However for Voyage BCE173 the result is different, and this also happens with a some Voyages further down the list. 

 

The model can be found here https://www.dropbox.com/s/j9l8z6pkdgrsja8/Recon%20Test%20Model.pbix?dl=0

 

Any input is highly appreciated! 

 

 

3 Replies

  • v-danhe-msft's avatar
    v-danhe-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

    Based on my test, the problem is due to the ALL function in your formula:

    AG Sum Total Value = Calculate(
    Sum(Sheet1[amount]);
    FILTER( ALL(Sheet1[Voyage]); Sheet1[Voyage] <= MAX( Sheet1[Voyage]));
    Sheet1[account] >= 15130;
    Sheet1[account] <= 15140
    )

    The ALL function will clear all context filter in your [Voyage] data, but when you select the item(BCE 173) in another table, it means that you have choose the only item in a slicer, it will neglect the ALL function in your [Voyage] column. So if you want to see all the result same. you could use ALL(Sheet1) instead ALL(Sheet1[Voyage]):

     

    Regards,

    Daniel He

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Daniel v-danhe-msft

       

      Your input is highly appreciated, however that does not solve the problem. 

      I would still like to present the same result in a different table, and not the Sum-Total of all. 

       

      I assume I need to use a different formula to do this in table 2. 

      Any suggestions on how I could do that?  

       

      • v-danhe-msft's avatar
        v-danhe-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi Anonymous ,

        What is the desired value you want to get? 4995346 or -2796832 or other vlaue?

         

        Regards,

        Daniel He