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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Fefo
Regular Visitor

Count of date which are from diffent days

 

 

 

 

Fefo_0-1676509910616.png

Fefo_0-1677018903654.png

 

Situation:

 

Planned date - Date when the order was planned

Finish Date - Date when the order was completed (must be the same as planned)

Delay - When was not done as planned

 

In my stack column I cannot show the correct number of delayed orders done on the specific date because when I count the delayed orders it only counts the ones related to the reference date in calendar. 

For example: 

  1. We are in day 1 and the order was delayed from day 1 (not done in day one as planned)
  2. In day 2 it was done ( 1 day after planned)
  3. If I want to display productivity I would like to show orders planned in day 2 + orders done planned previously in any day.

However, if we try to look at day 2 in the stack column it does not display the delayed order done in day 2 because the reference date was day 1. 

Measure:

 

Delayed produced = CALCULATE(COUNT(Productivity[Order]), Productivity[CountDelay] = 1)
Basic finish dateOrderActual finish dateProductionWhen delayed doneCountDelay
14/02/20236858319015/02/2023Delayed15/02/20231
14/02/20236852383215/02/2023Delayed15/02/20231
14/02/20236852383315/02/2023Delayed15/02/20231
14/02/20236852383415/02/2023Delayed15/02/20231
14/02/20236852383515/02/2023Delayed15/02/20231
14/02/20236852383615/02/2023Delayed15/02/20231
14/02/20236852383715/02/2023Delayed15/02/20231
14/02/20236852383815/02/2023Delayed15/02/20231
14/02/20236852383915/02/2023Delayed15/02/20231
14/02/20236852384115/02/2023Delayed15/02/20231
14/02/20236852384215/02/2023Delayed15/02/20231
14/02/20236853201015/02/2023Delayed15/02/20231
14/02/202368598514 Delayed 0
14/02/20236841363514/02/2023On time 0
14/02/20236860680314/02/2023On time 0
14/02/20236860950514/02/2023On time 0
14/02/20236859236415/02/2023Delayed15/02/20231
14/02/20236851947814/02/2023On time 0
14/02/20236859209814/02/2023On time 0
14/02/20236857526414/02/2023On time 0
14/02/202368598300 Delayed 0
14/02/20236859830114/02/2023On time 0
14/02/20236857857915/02/2023Delayed15/02/20231
14/02/20236860451215/02/2023Delayed15/02/20231
14/02/20236855444415/02/2023Delayed15/02/20231
14/02/20236855842715/02/2023Delayed15/02/20231
14/02/20236859486514/02/2023On time 0
14/02/20236857613415/02/2023Delayed15/02/20231
15/02/202368523843 Delayed 0
15/02/202368523844 Delayed 0
15/02/202368523845 Delayed 0
15/02/20236852384616/02/2023Delayed16/02/20231
15/02/20236852384716/02/2023Delayed16/02/20231
15/02/20236852384815/02/2023On time 0
15/02/202368523849 Delayed 0
15/02/202368523850 Delayed 0
15/02/202368523851 Delayed 0
15/02/202368523852 Delayed 0
15/02/202368523853 Delayed 0
15/02/20236852385415/02/2023On time 0
15/02/20236852385515/02/2023On time 0
15/02/20236852385616/02/2023Delayed16/02/20231
15/02/20236858507115/02/2023On time 0
15/02/20236858576015/02/2023On time 0
15/02/20236859486815/02/2023On time 0
15/02/20236859487915/02/2023On time 0
15/02/20236859488015/02/2023On time 0
15/02/20236861385515/02/2023On time 0
15/02/20236861385415/02/2023On time 0
15/02/20236849171315/02/2023On time 0
15/02/20236849171215/02/2023On time 0
15/02/20236855568215/02/2023On time 0
15/02/20236859829715/02/2023On time 0
15/02/20236860393715/02/2023On time 0
14/02/202368618899   0
15/02/20236858957415/02/2023On time 0
15/02/20236858957615/02/2023On time 0
15/02/20236858957815/02/2023On time 0
15/02/202368592099 Delayed 0
15/02/20236860703115/02/2023On time 0
15/02/20236860703215/02/2023On time 0
15/02/20236860703315/02/2023On time 0

 

 

 

 

1 ACCEPTED SOLUTION

Here is something to get you started.  USERELATIONSHIP can activate relationships temporarily.

 

lbendlin_0-1677021022784.png

 

I don't understand your mapping logic, so you may need to do the next part yourself (or maybe explain based on an example).

 

 

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely. Please no screenshots.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

hi, added table and measure. Thank you for the links.

Here is something to get you started.  USERELATIONSHIP can activate relationships temporarily.

 

lbendlin_0-1677021022784.png

 

I don't understand your mapping logic, so you may need to do the next part yourself (or maybe explain based on an example).

 

 

Thank you very much for the help. It did work and is showing what I want beautifully. 

Fefo
Regular Visitor

@amitchandak can you help me ?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors