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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
egrospe17
Frequent Visitor

Calculate a value based on Department using a measure instead of calculated column

Hello,

I've been trying to search this and figure it out but I can't seem to find the correct answer. I have two tables. 

 

(1) A list of Department

egrospe17_1-1715204456463.png

 

(2) A table of all of our budgeted hire and open requisitions by department

 

egrospe17_3-1715205333789.png

 

 

I need a count of Total Budget to Hire by department, as well as Total Open Requisition.

  • Total Budget to Hire is determined by the sum of "Budgeted Positions" and IF Req Type = "Budget".
  • Total Open Requisition is determined by the sum of "Number of Open Positions" and IF Req Type = "Open Requisition"

How do I accomplish this using a measure instead of a calculated column? The output I need is below

 

egrospe17_4-1715205490758.png

 

Thank you in advance!

 

 

 

1 ACCEPTED SOLUTION

HI @egrospe17,

You can try to use following measure formulas if they suitable for your requirement:

Total Budget =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Budgeted Positions] ),
        FILTER ( ALLSELECTED ( Table1 ), [Department] IN list && [Req Type] = "Budget" )
    )

Total Open Requisition =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Number of Open Positions] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [Department]
                IN list
                    && [Req Type] = "Open Requisition"
        )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
egrospe17
Frequent Visitor

EDIT: Sorry, the Total Open Requisition for Project/Program Management is 7, not 6. 

HI @egrospe17,

You can try to use following measure formulas if they suitable for your requirement:

Total Budget =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Budgeted Positions] ),
        FILTER ( ALLSELECTED ( Table1 ), [Department] IN list && [Req Type] = "Budget" )
    )

Total Open Requisition =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Number of Open Positions] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [Department]
                IN list
                    && [Req Type] = "Open Requisition"
        )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

This worked and exactly what I needed! Thanks so much!!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.