Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Simple question on PREVIOUSMONTH?

    Posted 9 days ago
    Just trying to use PREVIOUSMONTH function but I always get blanks. I am using Auto Time Intelligence and my column is set to type of Date and I see the Date Hierarchy.

    Measure = LASTDATE(Divs[Date].[Date]) works as expected but
    Measure = PREVIOUSMONTH(Divs[Date].[Date]) returns Blank

    No filters, no slicer, nothing obvious to me.

    I am actually trying to do the following, but cannot get PREVIOUSMONTH to work
    Last Month = CALCULATE(SUM(Divs[Amount]),PREVIOUSMONTH(Divs[Date].[Date]))

    Why??

    Thanks in advance. 


    ------------------------------
    Joseph Palumbo
    ------------------------------


  • 2.  RE: Simple question on PREVIOUSMONTH?

    Posted 8 days ago
    Edited by Vilmar Santos 8 days ago
    Olá

    Creio que seja porque está usando a data de sua tabela fato

    Tente criar uma tabela de calendário e faça o relacionamento
    dCalendar = CALENDARAUTO()​

    Incluir na fórmula
    Last Month = 
    CALCULATE ( [Qtde], PREVIOUSMONTH ( dCalendar[Date] ) )​



    ------------------------------
    Vilmar Santos
    ------------------------------