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
Boycie92
Resolver I
Resolver I

Total Orders Created and Closed on the same day

Hi,

 

I am hoping someone can help.

 

I am using Direct Query and I have 3 tables. FactOrders, DimOrders and DimDate

 

I have a few fields in my Fact tabled three of them are DateOrderCreated, DateOrderedClosed and TargetClosedDate

My OrderID is in the DimOrder table

 

I wanted to be able to create two measures one that will count the number of distinct Order ID’s that were created on a certain date and one to count the number of distinct orders that are closed on a certain date

 

I then want to plot them on a chart using DateOrderCreated (So I don’t lose any orders)

 

I created this custom column:

Closed within target = IF(FactOrders [DateOrderClosed] <> BLANK() && FactOrders [DateOrderClosed] <= FacOrders[TargetCloseDate] 0, 1)

 

but what it does is looks to see if for that record was the order was open and closed on the same date. Which means I have missing figures as I want to be able to see all orders closed and all orders open on a certain date.

 

Thanks,

Boycie92

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Boycie92 , You have join both the dates to date table. One will active and another one will inactive. You can use userelation to activate the inactive join.

 

refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Boycie92 , You have join both the dates to date table. One will active and another one will inactive. You can use userelation to activate the inactive join.

 

refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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.