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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
levigomez
Frequent Visitor

Calculate Active Order per month

Hi all;

 

I'm a noob with DAX  and BI measures and would like to graphiclly represent (Lines Graph) the Active Orders per month. Thereto I need to Count how many of them are active within each month. I've got a Order table were their Start date [Cntr.Start] and End date [Cntr.End] are defined (Table: LoadsAuxPO) and another table coming from calendar table were the months [MonthCalendar] and month start date [MonthStart] and month end date [MonthEnd] are set into columns (Table:LoadsExp).

The key thing is to calculate how many of the Orders (Unique Orders list-no duplicates) are active into the each month with a filter set up on Order responsible (Table: LoadsAuxPO[Expeditor]). I'm not pretty sure if an "Expeditor" filter on BI report could skip this last condition.

 

 

This is what I'm looking for

MonthInCalendar MonthStart MonthEnd CntrTotals CntrHL CntrMMDR
ago 2019 01/08/2019 31/08/2019 1 1 0
sep 2019 01/09/2019 30/09/2019 1 1 0
oct 2019 01/10/2019 31/10/2019 1 1 0
nov 2019 01/11/2019 30/11/2019 1 1 0
dic 2019 01/12/2019 31/12/2019 1 1 0
ene 2020 01/01/2020 31/01/2020 1 1 0
feb 2020 01/02/2020 29/02/2020 2 2 0
mar 2020 01/03/2020 31/03/2020 4 4 0
abr 2020 01/04/2020 30/04/2020 4 4 0
may 2020 01/05/2020 31/05/2020 7 7 0
jun 2020 01/06/2020 30/06/2020 8 8 0
jul 2020 01/07/2020 31/07/2020 11 10 1
ago 2020 01/08/2020 31/08/2020 13 11 2
sep 2020 01/09/2020 30/09/2020 13 11 2
oct 2020 01/10/2020 31/10/2020 17 11 6
nov 2020 01/11/2020 30/11/2020 23 12 11
dic 2020 01/12/2020 31/12/2020 22 10 12
ene 2021 01/01/2021 31/01/2021 21 10 11
feb 2021 01/02/2021 28/02/2021 19 8 11
mar 2021 01/03/2021 31/03/2021 11 6 5
abr 2021 01/04/2021 30/04/2021 6 1 5
may 2021 01/05/2021 31/05/2021 2 1 1
jun 2021 01/06/2021 30/06/2021 1 0 1
jul 2021 01/07/2021 31/07/2021 1 0 1
ago 2021 01/08/2021 31/08/2021 1 0 1

 

Your help is highly appreciated...I'm stuck on this issue

1 ACCEPTED SOLUTION
levigomez
Frequent Visitor

Finally I found out how to do it:

Baseline Workload = CALCULATE(COUNTROWS('LoadsAuxPO'), FILTER('LoadsAuxPO','LoadsAuxPO'[BLStart] <= MAX('LoadsEXP'[MonthStart]) && 'LoadsAuxPO'[BLEnd] >= MIN('LoadsEXP'[MonthEnd])))

View solution in original post

2 REPLIES 2
levigomez
Frequent Visitor

Finally I found out how to do it:

Baseline Workload = CALCULATE(COUNTROWS('LoadsAuxPO'), FILTER('LoadsAuxPO','LoadsAuxPO'[BLStart] <= MAX('LoadsEXP'[MonthStart]) && 'LoadsAuxPO'[BLEnd] >= MIN('LoadsEXP'[MonthEnd])))
Anonymous
Not applicable

The link you've shared doesn't work for people outside of your organization. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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