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
acnt_schartner
Helper III
Helper III

improvement rates for workers and supervisors

Hi,

i have a measure that calculates an improvement rate for workers but i want to exclude the supervisors from this measure and give them a rate based on the average of all workers.

 

Is there a way to do this with measures only. This calculation is rather complex and if i try to add this as a column i get a RAM-Error (i got 16GB)

 

Thanks in advance.

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

Hi, @acnt_schartner 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

 

Improvement Rate = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[EmpID],
        'Table'[Category],
        "Result",
        IF(
            [Category]="worker",
            DIVIDE(SUM('Table'[Value1]),SUM('Table'[Value2]),0),
            AVERAGEX(
                FILTER(
                    ALL('Table'),
                    'Table'[Category]="worker"
                ),
                DIVIDE([Value1],[Value2],0)
            )
        )
    ),
    [Result]
)

 

 

Result:

b2.png

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @acnt_schartner 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

 

Improvement Rate = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[EmpID],
        'Table'[Category],
        "Result",
        IF(
            [Category]="worker",
            DIVIDE(SUM('Table'[Value1]),SUM('Table'[Value2]),0),
            AVERAGEX(
                FILTER(
                    ALL('Table'),
                    'Table'[Category]="worker"
                ),
                DIVIDE([Value1],[Value2],0)
            )
        )
    ),
    [Result]
)

 

 

Result:

b2.png

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

 

amitchandak
Super User
Super User

@acnt_schartner ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

I can not reply with tables "Post flooding detected"

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.