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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anithalakshmi
Frequent Visitor

Break months between dates as Columns

The data I have is

 

 

EmpIDNameProjectStart DateEnd DateEffort%
1Name1P101-02-201829-05-2018100
2Name5P201-01-201801-04-201860
3Name2P301-04-201801-05-201870
4Name2P401-01-201803-04-201830
5Name5P503-01-201804-08-201840

PowerBI dashboard.

I Need the output breakup into Months, with conditional formatting in color code based on effort %.

 

EmpIDNameProjectStart DateEnd DateEffort%JanFebMarAprMayJunJulTill Dec
1Name1P101-02-201829-05-2018100 100100100100   
2Name5P201-01-201801-04-20186060606060    
3Name2P301-04-201801-05-201870   7070   
4Name2P401-01-201803-04-20183030303030    
5Name5P503-01-201804-08-20184040404040404040 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Not sure if you want to do this in M or DAX. In DAX you can create calculated columns with the following formula:

 

Jan = VAR MyMonth = 1
RETURN IF(MONTH([Start Date])<=MyMonth && MONTH([End Date])>=MyMonth,[Effort%],BLANK())

Just change the column name and the MyMonth value for each column.



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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Not sure if you want to do this in M or DAX. In DAX you can create calculated columns with the following formula:

 

Jan = VAR MyMonth = 1
RETURN IF(MONTH([Start Date])<=MyMonth && MONTH([End Date])>=MyMonth,[Effort%],BLANK())

Just change the column name and the MyMonth value for each column.



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...

my startdate is in Dec 2017 and enddate is in Mar2018

The date comparision fails for dec where the month is 12.Should I use datediff function? Not sure how

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