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
Anonymous
Not applicable

PowerBI use of periods

Dear all,

 

I am a newbie in PowerBI and stuck on a challenge. 

 

I have two datasets about demand and capacity. 

Capacity Dataset has the teams, a period (StartDate, EndDate) and the number of people(FTE) we have during that period.

The Demand Dataset has the Activity, a period for implementation(StartDate, EndDate), the team needed and number of people(FTE) needed from the team.

 

fulyaa_0-1609848766590.png

 

fulyaa_1-1609848818865.png

 

I would like to create reports on these datasets 

  • how many people we have each month from each team
  • the demand requirements per month per team
  • if the capacity is enough to meet the demand per month

I appreciate your help to solve this.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can do some steps as follows.

  1. Create a calculated column in “Demand” table.

 

Resource Team =

LOOKUPVALUE (

    'Activity'[Resource Team],

    Activity[Resource Type], [Resourcetype]

)

 

2. Create two calculated tables.

 

Question 1 =

VAR x1 =

    GENERATE (

        GENERATESERIES ( 1, 12 ),

        VAR inc = [Value] RETURN ROW ( "date", DATE ( 2021, inc, 1 ) )

    )

RETURN

    FILTER (

        CROSSJOIN ( 'Activity', x1 ),

        [date] >= [StartDate]

            && [date] <= [EndDate]

    )




Question 2 =

VAR x1 =

    GENERATE (

        GENERATESERIES ( 1, 12 ),

        VAR inc = [Value] RETURN ROW ( "date", DATE ( 2021, inc, 1 ) )

    )

RETURN

    FILTER (

        CROSSJOIN ( 'Demand', x1 ),

        [date] >= [StartDate]

            && [date] <= [EndDate]

    )

 

3. Create a measure.

 

Measure =

var x1 =

SUMX (

    FILTER (

        ALL ( 'Question 1' ),

        [date] = SELECTEDVALUE ( 'Question 1'[date] )

            && [Resource Team] = SELECTEDVALUE ( 'Question 1'[Resource Team] )

    ),

    [FTE]

)

var x2 =

COUNTX (

    FILTER (

        ALL ( 'Question 2' ),

        [date] = SELECTEDVALUE ( 'Question 2'[date] )

            && [Resource Team] = SELECTEDVALUE ( 'Question 2'[Resource Team] )

    ),

    [Demand Title]

)

return

IF(x1>=x2,"Yes","No")


4. Create some matrices.

v-yuaj-msft_0-1610010893142.png

 

v-yuaj-msft_1-1610010893152.png

v-yuaj-msft_0-1610010971079.png

 

Result:

v-yuaj-msft_1-1610010995763.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can do some steps as follows.

  1. Create a calculated column in “Demand” table.

 

Resource Team =

LOOKUPVALUE (

    'Activity'[Resource Team],

    Activity[Resource Type], [Resourcetype]

)

 

2. Create two calculated tables.

 

Question 1 =

VAR x1 =

    GENERATE (

        GENERATESERIES ( 1, 12 ),

        VAR inc = [Value] RETURN ROW ( "date", DATE ( 2021, inc, 1 ) )

    )

RETURN

    FILTER (

        CROSSJOIN ( 'Activity', x1 ),

        [date] >= [StartDate]

            && [date] <= [EndDate]

    )




Question 2 =

VAR x1 =

    GENERATE (

        GENERATESERIES ( 1, 12 ),

        VAR inc = [Value] RETURN ROW ( "date", DATE ( 2021, inc, 1 ) )

    )

RETURN

    FILTER (

        CROSSJOIN ( 'Demand', x1 ),

        [date] >= [StartDate]

            && [date] <= [EndDate]

    )

 

3. Create a measure.

 

Measure =

var x1 =

SUMX (

    FILTER (

        ALL ( 'Question 1' ),

        [date] = SELECTEDVALUE ( 'Question 1'[date] )

            && [Resource Team] = SELECTEDVALUE ( 'Question 1'[Resource Team] )

    ),

    [FTE]

)

var x2 =

COUNTX (

    FILTER (

        ALL ( 'Question 2' ),

        [date] = SELECTEDVALUE ( 'Question 2'[date] )

            && [Resource Team] = SELECTEDVALUE ( 'Question 2'[Resource Team] )

    ),

    [Demand Title]

)

return

IF(x1>=x2,"Yes","No")


4. Create some matrices.

v-yuaj-msft_0-1610010893142.png

 

v-yuaj-msft_1-1610010893152.png

v-yuaj-msft_0-1610010971079.png

 

Result:

v-yuaj-msft_1-1610010995763.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

amitchandak
Super User
Super User

@Anonymous ,

See if the HR blog can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Both tables need to be joined twice with date table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.