Forum Discussion

ajdinbphys's avatar
ajdinbphys
Regular Visitor
3 years ago

Why do I get different results ?

Why doesn't ALL work for the date column when it's in the DATE format. The format of the column is the only thing that changes in the pictures below.

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    ajdinbphys You can just use SUM('Sales Table'[Sales Amount]) or SUMX(ALL('Sales Table'),[Sales Amount]). Would be interested in seeing the PBIX if you could share it.

    • ajdinbphys's avatar
      ajdinbphys
      Regular Visitor

      The idea behind this was to understand context transition which happens with CALCULATE. As I understand it, every row in the row context of the Sales table becomes a filter such that the SUM function only 'sees' one row of the table at a time. However, since calculate modifiers exist, you can overwrite this filter by using for example REMOVEFILTERS or ALL. And so I was playing with removing filters from individual columns and trying to predict the correct result for the summation until I notices this weird behaviour. 

    • ajdinbphys's avatar
      ajdinbphys
      Regular Visitor

      Not sure If I can upload a pbix file here but here is a google drive link to the file:
      pbix file