Forum Discussion

PreetiSahu321's avatar
6 years ago

Total Budgets for Next Month

Hello Power BI Community Members,

 

I have a Budget list which is having all the Budget Dates (Data type as Date and Time) and Budget Amount (data type as the Whole number). As per my requirement, I want to show the total budget amount for next month. You can see my Budget table which looks like below screenshot:

 

Let me explain to you properly so that you can understand easily. In my Budget list, the Budget date is having all the dates like 10/30/2019, 11/25/2019, 12/07/2019, 01/05/2020, 02/10/2020 and so on.
As my current month is October, So I want to show the total Budget amount for November.

 

Also, I tried an approach with the NEXTMONTH function as:
Total Budget in next month = CALCULATE(SUM(BudgetsNew[BUD_AMOUNT]),NEXTMONTH(BudgetsNew[BUD_MONTH_YEAR]))

But I did not get any results.

 

As I am new to Power BI, I don't have much more knowledge about Power BI DAX. Please, Can anyone suggest to me how I can do it easily?

 

Thanks in Advance!!!

21 Replies

  • sturlaws's avatar
    sturlaws
    Icon for Resident Rockstar rankResident Rockstar

    Hi PreetiSahu321 

     

    how to do that will depend on the format of your BudgetsNew[BUD_MONTH_YEAR], or any other time columns you have. If you can paste some data from you model(not screen shots), or create sample report and upload it to dropbox/onedrive/other, it will be possible to help you.

    Cheers,
    Sturla

    If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

      • sturlaws's avatar
        sturlaws
        Icon for Resident Rockstar rankResident Rockstar

        Great!

        try this measure

         

        Next Month Budget2 = CALCULATE(SUM(Budgets[BUD_AMOUNT]); PARALLELPERIOD(Budgets[BUD_MONTH_YEAR];1;MONTH))

         

        hm, Budgets[BUD_MONTH_YEAR] has a timepart, some of the items is at 07:00, others at 08:00, not sure if that might cause some issues down the road. I would separate that into a date and time column(if time is at all needed).

         

        Cheers,
        Sturla