Forum Discussion

jlarques's avatar
jlarques
Icon for Helper V rankHelper V
5 years ago
Solved

Show rows only from this month

Dear community, I have a table with sales data and I want to show it in a matrix the information of the current month, including days. For instance, now is July 2021 and I want to show a data matrix...
  • Greg_Deckler's avatar
    5 years ago

    jlarques Hard to know for sure without sample data. Your formula seems overall to be correct although CALCULATE could be causing you some problems due to how it behaves. Are you missing a relationship between Sales and Calendario? Maybe:

    Sales by month = 
      VAR __Table = FILTER('Sales',MONTH('Sales'[Date]) = MONTH(TODAY()))
    RETURN
      SUMX(__Table,[Total])
    

     

  • jlarques's avatar
    jlarques
    5 years ago

    Hi Greg_Deckler,

    don't worry about that. 

     

    I have modified other formulas to calculate last year and percentage following your formula and the calculations are correct.

     

    Thanks again for your help, Greg_Deckler