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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Use Date Measure in other measure

I am putting together a table and one of the columns (Date 1) is a measure that returns a date format. I have a data table that has "Issue ID, Part Unique ID, reported date, issue category". How can I add another measure that comapres the reported date against Date 1 and count the distinct Issue IDs?

 

I am using the following formula but its not returning any values

Count of Issue before Date 1 = CALCULATE(
COUNTA('All Issues'[Issue ID]),FILTER(ALL('All Issues'),'All Issues'[Reported On] < [Date 1]))

 

I also tried this but I get an error

Count of Issue before Date 1 = CALCULATE(
COUNTX('All Issues',FILTER(ALL('All Issues'),'All Issues'[Reported On] < [Date 1])))
 

ncheaib_0-1611078756428.png

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

Count of Issue before Date 1 =
CALCULATE (
    COUNT ( 'All Issues'[Issue ID] ),
    FILTER (
        ALLSELECTED ( 'All Issues' ),
        'All Issues'[Part Unique ID] = MAX ( 'All Issues'[Part Unique ID] )
            && 'All Issues'[Reported On] < [Date 1]
    )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

6 REPLIES 6
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

Count of Issue before Date 1 =
CALCULATE (
    COUNT ( 'All Issues'[Issue ID] ),
    FILTER (
        ALLSELECTED ( 'All Issues' ),
        'All Issues'[Part Unique ID] = MAX ( 'All Issues'[Part Unique ID] )
            && 'All Issues'[Reported On] < [Date 1]
    )
)

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

parry2k
Super User
Super User

@Anonymous don't know what to say. If you cannot help by providing sample data, I have no way to figure this out. Good luck!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous I would recommend to throw  a sample pbix file with expected output and share it thru one drive/google drive.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thats going to be difficult because a lot of it is sensitive information. I have a long formula measure that will return a date (Date 1). I want to use that date in another measure and count how many rows/issues are reported before that "calculated" date (Date 1 measure)

parry2k
Super User
Super User

@Anonymous what is the error?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k If I use the second formula the error is "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value"

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors