Reply
avatar user
Anonymous
Not applicable
Partially syndicated - Outbound

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

Syndicated - Outbound

@Anonymous , 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()))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Syndicated - Outbound

@Anonymous , 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()))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Thank You

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)