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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ECE
Advocate II
Advocate II

Power BI: DAX count consecutive days with no avilable capacity per categori

Hi,

 

I would like to show how many consecutive days into the future we have no available capacity.

By consecutive meaning, if there is available capacity today but sold out tomorrow, the return value should be 0.

Notice that there is several production areas, for which we need the calculation.

 

I have tried creating a temporary column, to show if there is available capacity on that paticular day (0 / 1 value only).

For each OpsGrp I would like to count the number of consecutive days, where the temp col value > 0.

 

 

Calendar dayPlantOpsGrpCapacityBookingsTemp Col - Sold outDaysSoldOut
12-04-20181A27533112
12-04-20181B1907000
12-04-20181C1164105500
12-04-20181D33933500
12-04-20181E31025800
12-04-20181F50743400
13-04-20181A27563011
13-04-20181B1901300
13-04-20181C1164157313
13-04-20181D33934111
13-04-20181E31038811
13-04-20181F50780211
16-04-20181A2751330 
16-04-20181B190640 
16-04-20181C116412571 
16-04-20181D3393300 
16-04-20181E3103080 
16-04-20181F5074750 
17-04-20181A2753111 
17-04-20181B190390 
17-04-20181C116412501 
17-04-20181D3393300 
17-04-20181E3103080 
17-04-20181F5074750 
18-04-20181A2752771 
18-04-20181B1901030 
18-04-20181C116410430 
18-04-20181D3393300 
18-04-20181E3103101 
18-04-20181F5074750 
19-04-2018 A275380 
19-04-2018 B190470 
19-04-2018 C11646260 
19-04-2018 D3393050 
19-04-2018 E3102660 
19-04-2018 F5074300 
20-04-2018 A275410 
20-04-2018 B190450 
20-04-2018 C11643130 
20-04-2018 D3391460 
20-04-2018 E3103881 
20-04-2018 F5074750 
2 REPLIES 2
ECE
Advocate II
Advocate II

The expected result is inserted in the column DaysSoldOut.

 

afzalphatan
Resolver I
Resolver I

Can you please show what is ur expected result in that pic

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors