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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Month Measure

Hi Guys,

 

I have a doubt regarding one of my column. 

I have a column "Booked Date" in my report and i have no. of deals against the booked date.

 

Can i break the booked date into months? 

 

I can certainly do it with a calender table but can I do it with just the booked date? Is there any measure which I can use?

 

Desired Output:

 

MonthID
Jan1100
Feb1260
March1500

 

Himanshu_13_0-1609229810225.png

Regards,

Himanshu

1 ACCEPTED SOLUTION

Hi @Anonymous ,

If you are using Direct Query mode, you can create a column like this to define month name:

Month =
VAR _m =
    MONTH ( 'Date_ID'[BookedDate] )
RETURN
    SWITCH (
        TRUE (),
        _m = 1, "Jan",
        _m = 2, "Feb",
        _m = 3, "Mar",
        _m = 4, "Apr",
        _m = 5, "May",
        _m = 6, "Jun",
        _m = 7, "Jul",
        _m = 8, "Aug",
        _m = 9, "Sep",
        _m = 10, "Oct",
        _m = 11, "Nov",
        _m = 12, "Dec"
    )

Put this column and [ID] column in the table visual, change the aggreation of [ID] as 'SUM' and rename for this visual:

sum.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

If your date has no hierarchy, please check whether your source table has any relationship with other tables or whether you have disabled 'Auto date/time for new files' in options and settings.

time.png

In addition, if you do not want to use the date hierarchy to achieve this, you can create a calculated column like this:

Month = FORMAT('Table'[BookedDate],"mmm")

Put this column and [ID] column in the table visual, change the aggreation of [ID] as 'SUM' and rename for this visual:

sum.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

 

I'm using a DirectQuery for my model so I cant use the below expression for my solution:

 

Month = FORMAT('Table'[BookedDate],"mmm")

 

Kindly suggest anything else which i can do in my DirectQuery model.

 

Regards,

Himanshu

Hi @Anonymous ,

If you are using Direct Query mode, you can create a column like this to define month name:

Month =
VAR _m =
    MONTH ( 'Date_ID'[BookedDate] )
RETURN
    SWITCH (
        TRUE (),
        _m = 1, "Jan",
        _m = 2, "Feb",
        _m = 3, "Mar",
        _m = 4, "Apr",
        _m = 5, "May",
        _m = 6, "Jun",
        _m = 7, "Jul",
        _m = 8, "Aug",
        _m = 9, "Sep",
        _m = 10, "Oct",
        _m = 11, "Nov",
        _m = 12, "Dec"
    )

Put this column and [ID] column in the table visual, change the aggreation of [ID] as 'SUM' and rename for this visual:

sum.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I actually came with the below solution:

 

Created a new column with the below expression then sorted it by Month.

 

Month Name = SWITCH(Deals[Month],1,"Jan",2
,"Feb",3,"Mar",4,"April",5,"May",6,"June",7
,"July",8,"Aug",9,"Sep",10,"Oct"
,11,"Nov",12,"Dec")
 
Regards,
Himanshu
amitchandak
Super User
Super User

@Anonymous , seems like you do not have a date hierarchy

 

These are the reasons Date Hierarchy can be missing
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-Doesn-t-show/td-p/525460
https://community.powerbi.com/t5/Desktop/Date-hierarchy-not-available/td-p/438804
https://community.powerbi.com/t5/Desktop/Lost-Missing-Date-Hierarchy/td-p/421045

 

Check Settings
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-auto-date-time

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
sanalytics
Super User
Super User

@Anonymous 

Make your  boooking date as date data type.

Just drag your booking date column then only choose month from hiearchy.then drag you no.of deals measure.

refer the below screenshot

sanalytics_0-1609232626221.png

 

hope it will help..let us know your concern

regards,

sanalytics

Anonymous
Not applicable

The hierarchy doesn't have month.

 

Himanshu_13_0-1609233617822.png

 

amitchandak
Super User
Super User

@Anonymous , with default date hierarchy

https://5minutebi.com/2017/11/29/how-to-use-powerbi-date-hierarchy/

 

Create month year in the table or date table 

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

 

Sort Month Year on Month Year sort 

 

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors