cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
Super User IV

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thank You

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors