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! Learn more

Reply

Table Based Off Date Measure Not Populating

I have a measure that calculates the last date in a table:

 

Last Date in Receipts CY = 
MAX(Receipts[BI Date])

 


I have a second measure that takes that same date and subtracts a year:

 

 

Last Date in Receipts PY = 
EDATE(MAX(Receipts[BI Date]),-12)

 

 

When I drop them onto a card, they both show the date I expect.

 

 

 

I have a table that is created using the first measure that works perfect:

 

 

CY = 
FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= DATE ( 2023, 7, 1 ),
        Receipts[BI Date] <= [Last Date in Receipts CY]
    )
)

 

 

 

Here is where the problem is. When I try to create a second table with everything the same as the CY table, except for that last date is the using the Last Date in Receipts PY Measure, the table does not show any data:

 

 

PY = 
FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= DATE ( 2022, 7, 1 ),
        Receipts[BI Date] <= [Last Date in Receipts PY]
        
    )
)

 

 

 

If I change my above measure to type in the date manually, it does populate correctly:

 

 

PY = 
FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= DATE ( 2022, 7, 1 ),
        Receipts[BI Date] <= DATE(2023,03,01)
        
    )
)

 

 

 

What am I doing to that [Last Date in Receipts PY] measure where it is not working to populate the table?

 

 

Edited to add: No errors pop up. The column headings do populate but no data populates. 

1 ACCEPTED SOLUTION

I tried this as well hoping that it would work but not luck so I think it's that I am using edate but I don't know what to use instead:

 

 

PY = 
FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= DATE ( 2022, 7, 1 ),
        Receipts[BI Date] <= edate([Last Date in Receipts CY],-12)
    )
)

 

View solution in original post

4 REPLIES 4

Whoever comes to see this in the future, here is what I did that worked:

 

 

PY = 

VAR PYDateEnd = 
EDATE(MAX(Receipts[BI Date]),-12)

VAR PYStartDate = 
EDATE(min(CY[BI Date]),-12)

RETURN


FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= PYStartDate,
        Receipts[BI Date] <= PYDateEnd
        
    )
)

 

The PYStartDate is referencing to take the minimum date in my CY table and subtract out 12. The table wouldn't work when I referenced a measure with EDATE but it worked when I used it as VAR. 

Anonymous
Not applicable

Hi @ThisIsHalloween 

 

Glad to hear you solved the problem! Could you please mark your solution as an ANSWER? This will help more users who are facing the same or similar difficulties. Thank you!

 

Best Regards,
Yulia Xu

Thanks for letting me know! I'm still very new to PowerBI and the Community.

I tried this as well hoping that it would work but not luck so I think it's that I am using edate but I don't know what to use instead:

 

 

PY = 
FILTER (
    Receipts,
    AND (
        Receipts[BI Date] >= DATE ( 2022, 7, 1 ),
        Receipts[BI Date] <= edate([Last Date in Receipts CY],-12)
    )
)

 

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.

Top Solution Authors