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
Syndicate_Admin
Administrator
Administrator

Matrix per user

I have the following:
a measure that counts the boxes of each worker and I make a table per month for each one.

apenaranda_0-1713857609241.png


Now what I would like is to make another table like the one attached where for each worker I put the boxes of each worker (I already have it in the other table) and also another column with the % (boxes of the worker / total boxes)

I want this % column for each worker.

apenaranda_1-1713857649479.png

For example, for user 1 there are 51 boxes in January and the total number of boxes for all users, let's say it is 220
The % would be 51/220 = 23%
I have a measure that adds the boxes

TotalBoxes = COUNT(Cab_act_almacen_reg_sql[Whse_ Activity No_])

Thank you.

1 REPLY 1
v-heq-msft
Community Support
Community Support

Hi @Syndicate_Admin ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:

vheqmsft_0-1713923715495.png

Create a measure

 

Measure = 
VAR _SumOfBoxByMonthNo = 
CALCULATE(
    SUM('Table'[Box]),
    ALLEXCEPT(
        'Table',
        'Table'[Month.No]
    )
)
RETURN
SELECTEDVALUE('Table'[Box])/_SumOfBoxByMonthNo

 

Final output

vheqmsft_1-1713924006072.png
Or another solution

vheqmsft_2-1713924542870.png

Create measure

Count Box = COUNT('Table'[Month.No])
Result = 
VAR _sum = SUMX(ALLEXCEPT('Table','Table'[Month.No]),'Table'[Count Box])
RETURN
[Count Box]/_sum

Final output
 

vheqmsft_3-1713924654444.png

 

 

 

Best regards,

Albert He

 

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.