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
AthonyALS
New Member

Day of the week and leave type

Hi All,

So I do have an absence tracker that I constantly use that uses start date and end date to track number of days employees are sick. is there a way to use the Key Infuencers visualization to show that SUU was more common on Mondays or fridays for instance

AthonyALS_0-1685115489025.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @AthonyALS ,

 

Here are the steps you can follow:

1. In power query – Add Column – Custom  Column .

Duration.Days([END DATE] - [START DATE])

vyangliumsft_0-1685344787678.png

2. Enter data -- Create the following table.

This is derived from [Subtraction] of the Table, next to the Index number, how many rows will be generated.

vyangliumsft_1-1685344787684.png

3. Home  -- Merge Queries -- Merge Queries as new

vyangliumsft_3-1685344837845.png

4. Click the extension icon and select [Index].

vyangliumsft_4-1685344837849.png

Result:

vyangliumsft_5-1685344861257.png

5. Create calculated column.

Date =
var _min=MINX(FILTER(ALL(Merge1),'Merge1'[ID]=EARLIER('Merge1'[ID])),[START DATE])
return
IF(
    'Merge1'[Flag.Index]=MINX(FILTER(ALL(Merge1),'Merge1'[ID]=EARLIER('Merge1'[ID])),[Flag.Index]),
    _min+1,
    _min +[Flag.Index])-1
Day =
FORMAT('Merge1'[Date],"dddd"
)
Column =
COUNTX(
    FILTER(ALL(Merge1),
    'Merge1'[Day]=EARLIER('Merge1'[Day])),[Day])

6. Result:

vyangliumsft_6-1685344861258.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @AthonyALS ,

 

Here are the steps you can follow:

1. In power query – Add Column – Custom  Column .

Duration.Days([END DATE] - [START DATE])

vyangliumsft_0-1685344787678.png

2. Enter data -- Create the following table.

This is derived from [Subtraction] of the Table, next to the Index number, how many rows will be generated.

vyangliumsft_1-1685344787684.png

3. Home  -- Merge Queries -- Merge Queries as new

vyangliumsft_3-1685344837845.png

4. Click the extension icon and select [Index].

vyangliumsft_4-1685344837849.png

Result:

vyangliumsft_5-1685344861257.png

5. Create calculated column.

Date =
var _min=MINX(FILTER(ALL(Merge1),'Merge1'[ID]=EARLIER('Merge1'[ID])),[START DATE])
return
IF(
    'Merge1'[Flag.Index]=MINX(FILTER(ALL(Merge1),'Merge1'[ID]=EARLIER('Merge1'[ID])),[Flag.Index]),
    _min+1,
    _min +[Flag.Index])-1
Day =
FORMAT('Merge1'[Date],"dddd"
)
Column =
COUNTX(
    FILTER(ALL(Merge1),
    'Merge1'[Day]=EARLIER('Merge1'[Day])),[Day])

6. Result:

vyangliumsft_6-1685344861258.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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.