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
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
Super User
Super User

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
Super User
Super User

Hi @daominhtri

 

Try this for your column:

 

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

 

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.