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
ashish18
New Member

Calendar Date not working with created date and resolved date

Hi Guys,

 I am trying to get total open defect Vs closed defect per day from Source file. Source file has created on date and Resolve date. I want these both dates to behave with calender date.

I have created date table using below code and also created measures for total open defects and closed defect.

I have set relationship of datetable date with created on date on file

another relationship is inactive with resolved date as its not possible.

Now,I am getting open defects correctly but closed defects not working with date.

 

DateTable =
ADDCOLUMNS (
    CALENDAR (MIN('SourceFile'[Created on Date]), MAX('SourceFile'[Resolved])),
    "Year", YEAR([Date]),
    "Month", FORMAT([Date], "MMMM"),
    "MonthNumber", MONTH([Date]),
    "Weekday", FORMAT([Date], "dddd")
)
Total Closed Defects =
CALCULATE (
    COUNTROWS ('SourceFile'),
    USERELATIONSHIP (DateTable[Date], 'SourceFile'[Resolved])
)  
 
 
Total Open Defects =
CALCULATE (
    COUNTROWS ('SourceFile'),
    FILTER (
        'SourceFile',
        'SourceFile'[Created on Date] <= MAX(DateTable[Date]) &&
        (ISBLANK('SourceFile'[Resolved]) || 'SourceFile'[Resolved] > MAX(DateTable[Date]))
    )
)
ashish18_0-1761920818750.png

Can you please help me to get closed defects to reflect by day. Thanks in advance.

2 ACCEPTED SOLUTIONS

@ashish18 ,

hey, I recreated the measures and everything you had, and I have no issues; it must be the DateTime in the Resolved Date, perhaps.

 

The 9 likely represents the 9 missing Resolved Dates in the source I had.

vojtechsima_0-1761926700834.png

 

Check out my file and compare it with yours.

View solution in original post

@ashish18 , thought so, good you found it. If you could please mark my answer as the solution to close the thread. Thanks

View solution in original post

7 REPLIES 7
vojtechsima
Super User
Super User

@ashish18 hey, double check that all dates you use to build a calendar and the calendar itself it set to Date not Datetime.

HI @vojtechsima  Thnaks for ur response.. Even if I change it to datetime,it still give same issue

@ashish18 , Change it do DATE, not datetime. Otherwise, all seems good. If you have sample pbix file , you can share it through OneDrive/Google Drive.

HI @vojtechsima   Sorry if I missed anything. DateTable already has Date

 
DateTable =
ADDCOLUMNS (
    CALENDAR (MIN('SourceFile'[Created on Date]), MAX('SourceFile'[Resolved])),
    "Year"YEAR([Date]),
    "Month"FORMAT([Date]"MMMM"),
    "MonthNumber"MONTH([Date]),
    "Weekday"FORMAT([Date]"dddd")
)

@ashish18 ,

hey, I recreated the measures and everything you had, and I have no issues; it must be the DateTime in the Resolved Date, perhaps.

 

The 9 likely represents the 9 missing Resolved Dates in the source I had.

vojtechsima_0-1761926700834.png

 

Check out my file and compare it with yours.

Hi @vojtechsima Really appreciate ur help. It was a minor mistake...Resolved date in sourcr file was dateTime type.I changed it to Date and it worked now. 🙂  Thanks Again!!

@ashish18 , thought so, good you found it. If you could please mark my answer as the solution to close the thread. Thanks

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.