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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RES
New Member

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors