Forum Discussion

clarainesgg's avatar
clarainesgg
Helper I
1 year ago
Solved

Create a Month as Excel For Forescast

Hi,

 

I have my sales till a period. I need to add 3 more month as Excel. My data end Agost-24, so i need to add:

sep-24, Oct-24, Nov-24.

 

This will be dynamic.

 

Thanks,

 

Clara

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi,

    Thanks for parry2k's concern about the problem and i want to offer some more information for user to refer to.

    hello clarainesgg , you can refer to the follwing solution.

    Sample data

    Create a calendar table.

     

    Calendar = CALENDAR(DATE(YEAR(MIN('Table'[Date])),1,1),DATE(YEAR(MAX('Table'[Date]))+1,12,31))

     

    Then create a measure.

     

    MEASURE =
    VAR a =
        MAXX ( ALLSELECTED ( 'Table' ), [Date] )
    VAR b =
        EOMONTH ( a, 0 ) + 1
    VAR c =
        EOMONTH ( a, 3 ) + 1
    RETURN
        COUNTROWS ( FILTER ( 'Calendar', [Date] >= b && [Date] < c ) )
    

     

    Then create a table visual and put the date of calendar table to the field and put the measure to the visual filter.

     

    Output

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 Replies

    • clarainesgg's avatar
      clarainesgg
      Helper I

      So i need to need to do forecast in Power Bi. I would like to appear the future month of my forecast. 

  •  

    Like you drag in excel

     

     

     

    I tried this: 

    Forecast_date =
     DATEADD(LASTDATE('Vacunar'[date_]),1,MONTH)
     
     
    Thanks,
     
    Clara

     

    • clarainesgg's avatar
      clarainesgg
      Helper I

      so, iof my last month is Aug'24, I need to create a my next month, that it'll be Sep. I need a calendar.

       

       

      • clarainesgg's avatar
        clarainesgg
        Helper I

        I need to calculate the next month: Similar to this:

        next_mon = NEXTMONTH(Vacunar[Last_date])
         
        However, it is not bringing the correct data.

         

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Thanks for parry2k's concern about the problem and i want to offer some more information for user to refer to.

    hello clarainesgg , you can refer to the follwing solution.

    Sample data

    Create a calendar table.

     

    Calendar = CALENDAR(DATE(YEAR(MIN('Table'[Date])),1,1),DATE(YEAR(MAX('Table'[Date]))+1,12,31))

     

    Then create a measure.

     

    MEASURE =
    VAR a =
        MAXX ( ALLSELECTED ( 'Table' ), [Date] )
    VAR b =
        EOMONTH ( a, 0 ) + 1
    VAR c =
        EOMONTH ( a, 3 ) + 1
    RETURN
        COUNTROWS ( FILTER ( 'Calendar', [Date] >= b && [Date] < c ) )
    

     

    Then create a table visual and put the date of calendar table to the field and put the measure to the visual filter.

     

    Output

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.