Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lkshck
Helper III
Helper III

Create Measure or Calculated Table from Daily values to get Monthly values

Hi,

 

I'm currently having a table which looks like the following:

datenumber_of_requests
01.01.2020300
02.01.2020125
03.01.2020279
04.01.2020432

So everything is based on a daily basis. My goal is to get the sum of number_of_requests on a monthly basis as I want to use them for later calculation. The visualization isn't the problem as PowerBI is showing already the monthly values based on the date hierarchy.

What is the best option to get the values in a table on a monthly basis?

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @lkshck ,

 

You need to create a calendar dimension table then relate calendar[date] (1) to fact[date] (many).

In your calendar table, add a month field that can be used in visuals.

 

You can do this in Power Query something like this:

 

Date.MonthName([date])

 

 

Or in DAX like this:

 

monthName = 
FORMAT(
    calendar[date],
    "MMMM"
)

 

 

Power BI will automatically aggregate your daily values to monthly values when implemented like this.

This can be extended for years, financial years, quarters etc.

 

Once you have the calendar table set up correctly (and marked as a date table), you can then use Power BI's time intelligence functions for your calculations. Things like Month to Date, Year to Date etc. are all in-built DAX functions that become available.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @lkshck ;

You could create a measure as follows:

sum = CALCULATE(SUM([number_of_requests]),FILTER(ALLSELECTED('Table'),EOMONTH([date],0)=EOMONTH(MAX([date]),0)))

The final output is shown below:

vyalanwumsft_0-1632710778734.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@lkshck Maybe: 

 

Table 29a = 
    VAR __Table =
        SUMMARIZE(
            ADDCOLUMNS(
                'Table29',
                "Month",MONTH([date]),
                "Year",YEAR([date])
            ),
            [Year],
            [Month],
            "number_of_requests",SUM('Table29'[number_of_requests])
        )
RETURN
    __Table

You could also reference the query for the source of the data and create month and year columns in PQ and do a Group By...

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
BA_Pete
Super User
Super User

Hi @lkshck ,

 

You need to create a calendar dimension table then relate calendar[date] (1) to fact[date] (many).

In your calendar table, add a month field that can be used in visuals.

 

You can do this in Power Query something like this:

 

Date.MonthName([date])

 

 

Or in DAX like this:

 

monthName = 
FORMAT(
    calendar[date],
    "MMMM"
)

 

 

Power BI will automatically aggregate your daily values to monthly values when implemented like this.

This can be extended for years, financial years, quarters etc.

 

Once you have the calendar table set up correctly (and marked as a date table), you can then use Power BI's time intelligence functions for your calculations. Things like Month to Date, Year to Date etc. are all in-built DAX functions that become available.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




amitchandak
Super User
Super User

@lkshck , Refer my blog on the similar topic if that can help

 

Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

 

 

How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors