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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
daominhtri
Frequent Visitor

Create WorkingdayID column

Hi all,

Pls help me to create a WorkingdayID1 or WorkingdayID2 column as below.Capture.PNG

 

2 ACCEPTED SOLUTIONS
AlB
Community Champion
Community Champion

Hi @daominhtri

 

Try this for your column:

 

WorkingDayID2 =
COUNTROWS (
    FILTER (
        Table1;
        Table1[Date] <= EARLIER ( Table1[Date] ) && Table1[DayType] = "Workingday"
    )
)

 

View solution in original post

itsmebvk
Continued Contributor
Continued Contributor

@daominhtri  Create following calculation columns. Please see the attached file for your reference.

 

Working Day ID1:
 
Working Day ID1 = 
COUNTROWS (
    FILTER (
        Sheet1,
        Sheet1[Date] <= EARLIER ( Sheet1[Date] ) && Sheet1[Type] = "Working"
    )
)
Working Day ID2:
 
Working Day ID2 = IF(Sheet1[Type]="Working",Sheet1[Working Day ID1],BLANK())

 

 

 Capture.PNG

View solution in original post

3 REPLIES 3
itsmebvk
Continued Contributor
Continued Contributor

@daominhtri  Create following calculation columns. Please see the attached file for your reference.

 

Working Day ID1:
 
Working Day ID1 = 
COUNTROWS (
    FILTER (
        Sheet1,
        Sheet1[Date] <= EARLIER ( Sheet1[Date] ) && Sheet1[Type] = "Working"
    )
)
Working Day ID2:
 
Working Day ID2 = IF(Sheet1[Type]="Working",Sheet1[Working Day ID1],BLANK())

 

 

 Capture.PNG

Thank you @itsmebvk , @AlB for your help.

AlB
Community Champion
Community Champion

Hi @daominhtri

 

Try this for your column:

 

WorkingDayID2 =
COUNTROWS (
    FILTER (
        Table1;
        Table1[Date] <= EARLIER ( Table1[Date] ) && Table1[DayType] = "Workingday"
    )
)

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.