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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
tkaste63
Frequent Visitor

Calculating continuous MTD when there is no report for a month

Relativley new to Power BI.

 

I used the quick measure to create a MTD premium

 

MTD Net Specific Premium =

CALCULATE(
    SUM('Spec Prem'[Specific Net Premium]),
    FILTER(
        ALLSELECTED('Extract Date'[Extract Date]),
        ISONORAFTER('Extract Date'[Extract Date], MAX('Extract Date'[Extract Date]), DESC)
    )
)
 
Works great except when there is no Extract generated for a month as there was no premium paid so a report( Extract) is not generated for that month
 
 tkaste63_2-1722517319755.png

 

How can I get 1/1/24 to show the vaule in 12/1/23 and show the value as of 4/1/24 in both 5/1/24 and 6/1/24. Case reserves can also create the same issue but in the instance shown is does not.

1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@tkaste63 Hi!

 

1. Create a new Date table in Power BI if you don't already have one.

DateTable =
ADDCOLUMNS (
CALENDAR (DATE(2020, 1, 1), DATE(2024, 12, 31)),
"Year", YEAR([Date]),
"MonthNumber", MONTH([Date]),
"MonthName", FORMAT([Date], "MMMM"),
"YearMonth", FORMAT([Date], "YYYYMM")
)

2. Create your MTD Measure as:

MTD Net Specific Premium =
CALCULATE(
SUM('Spec Prem'[Specific Net Premium]),
FILTER(
ALL('DateTable'),
'DateTable'[Date] <= MAX('DateTable'[Date])
),
DATESMTD('DateTable'[Date])
)

 

Make sure your Spec Prem table has a relationship with your new DateTable based on the appropriate date columns.

 

BBF

View solution in original post

2 REPLIES 2
tkaste63
Frequent Visitor

Thanks for the advise. Turns out it was a relationship issue, Spec Prem Table to Extract Date(datetable) was set to both and not single. Made the changes in the DAX formula and changed relationship to single and works great

 

BeaBF
Super User
Super User

@tkaste63 Hi!

 

1. Create a new Date table in Power BI if you don't already have one.

DateTable =
ADDCOLUMNS (
CALENDAR (DATE(2020, 1, 1), DATE(2024, 12, 31)),
"Year", YEAR([Date]),
"MonthNumber", MONTH([Date]),
"MonthName", FORMAT([Date], "MMMM"),
"YearMonth", FORMAT([Date], "YYYYMM")
)

2. Create your MTD Measure as:

MTD Net Specific Premium =
CALCULATE(
SUM('Spec Prem'[Specific Net Premium]),
FILTER(
ALL('DateTable'),
'DateTable'[Date] <= MAX('DateTable'[Date])
),
DATESMTD('DateTable'[Date])
)

 

Make sure your Spec Prem table has a relationship with your new DateTable based on the appropriate date columns.

 

BBF

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.