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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
RES
Regular Visitor

monthly percent

I have data that looks like this. I would like a column table that shows the percent of each month including the month between.

PeakPctTierStartDateTierEndDate
100%Sep 21Sep 22
100%Oct 22May 23
50%Jun 23Dec 23
50%Jun 23May 24
25%Jan 24May 24
75%Jun 24Dec 24
25%Jan 24Dec 24
50%Jan 25Dec 25
25%Jan 25Dec 25
25%Jan 25Dec 25

 

Here is the code I have so far but it only shows the sum of percent for the month for certain months and not all months. 

Percent Each Month = CALCULATE(SUM('Client Hedges'[PeakPct]),
                          FILTER (  'Client Hedges',
                                    'Client Hedges'[TierStartDate].[Date]<= CALCULATE(MAX(CalendarS1[Date])) &&
                                     'Client Hedges'[TierStartDate] >= CALCULATE(MIN(CalendarS1[Date]))))

RES_0-1735592713201.png

For instance Jan 24 should be the sum of 25% (Jan 24 - May 24), 25% (Jan 24 - Dec 24), and 50% (June 23 - May 24) totalling 100%.

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

To report on things that are not there you need to use disconnected tables and/or crossjoins.  That includes a calendar table that needs to cover the entire period.

 

First, bring your data into a usable form

 

lbendlin_0-1735593510091.png

 

Then add the calendar, for example via

 

Dates = ADDCOLUMNS(CALENDAR("2021-09-01","2025-12-31"),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmm"),"MNo",FORMAT([Date],"mm"))

 

And then add a measure that checks if the date on the calendar overlaps with the date range in the percentage table.

 

lbendlin_1-1735593956723.png

 

 

 

 

 

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

To report on things that are not there you need to use disconnected tables and/or crossjoins.  That includes a calendar table that needs to cover the entire period.

 

First, bring your data into a usable form

 

lbendlin_0-1735593510091.png

 

Then add the calendar, for example via

 

Dates = ADDCOLUMNS(CALENDAR("2021-09-01","2025-12-31"),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmm"),"MNo",FORMAT([Date],"mm"))

 

And then add a measure that checks if the date on the calendar overlaps with the date range in the percentage table.

 

lbendlin_1-1735593956723.png

 

 

 

 

 

 

This is beautiful! Thank you! 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors