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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pawelj795
Post Prodigy
Post Prodigy

Count results of measure by other measure

Hi,
I have below a part of my shipment table.
Currently, I'm evaluating how much shipment is overdue and how much is on time.
If the date confirmed is later than the date requested, then the line of order is overdue.

pawelj795_0-1597221492153.png

pawelj795_1-1597221614690.png


My question is 
How to count how many order lines are overdue and how many are on time in a particular month and show it on a chart?

 

I have a date table ofc.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@pawelj795 , Create a measure like

countx(filter(summarize(Table,Table[SalesID],Table[IREM_ID],"_1",[Date diff Timeline]),[_1]<0),[SalesID])

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@pawelj795 , Create a measure like

countx(filter(summarize(Table,Table[SalesID],Table[IREM_ID],"_1",[Date diff Timeline]),[_1]<0),[SalesID])

Thanks @amitchandak 

That's what I've been looking for.

By the way, just out of curiosity, when using COUNTAX instead of COUNTX would matter?

I have one additional request.

How to format font color in my text value on measure?
I mean when measure return "overdue" the font should be red, and when measure return "on time" the font should be green.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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