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
Doomemy
Frequent Visitor

Calculate date between and count

I have data import from database, Orders and Sales this 2 table link with manyto1 relationship. 1 OrdersId can have many SalesID because the customers don't like to pay all of them in one time. Now I want to count how many OrdersID not in table Sales to see how many orders the customers don't yet paid and i also want to count date between order_date and sale_date. Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Doomemy , Create a measure like 1st one and display with order id from order

 


if(isblank(count(sales[SalesID])),1,blank())

 

or measure  like

countx(values(Order[OrderID]) ,if(isblank(calculate(count(sales[SalesID]))),Order[OrderID],blank()))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Doomemy , Create a measure like 1st one and display with order id from order

 


if(isblank(count(sales[SalesID])),1,blank())

 

or measure  like

countx(values(Order[OrderID]) ,if(isblank(calculate(count(sales[SalesID]))),Order[OrderID],blank()))

Thank You

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.