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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BYENER
Helper V
Helper V

Divide matrix row value with a fixed value

Hi,

 

Can someone help me with the following issue: I am using a matrix visual and I want to divide the row values with a fixed value (measure). At the moment the measure value is also splitting in categories, but I don’t want that. See below for an example:

 

Expected situation:

 

Category, Count of serial number, % of Measure

A , 20 , 20 / (500) measure

B, 50 , 20 / (500) measure

C, 1, 20 / (500) measure

D, 60, 20 / (500) measure

 

Current situation: Measure = 500

 

Category, Count of serial number, % of Measure

A , 20 , 20 / (30) measure

B, 50 , 20 / (150) measure

C, 1, 20 / (100) measure

D, 60, 20 / (220) measure

 
Thanks in advance.
2 ACCEPTED SOLUTIONS
Mariusz
Community Champion
Community Champion

Hi @BYENER

 

This should work.

Measure = 
CALCULATE(
    [Screening Volume],
    ALLSELECTED()
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

View solution in original post

Mariusz
Community Champion
Community Champion

Hi @BYENER 

 

You can try something like.

% Sales = 
DIVIDE(
    [Sales],
    CALCULATE(
        [Sales],
        ALLSELECTED(),
        VALUES( 'Calendar'[Year Week] )
    )
) 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

View solution in original post

11 REPLIES 11
Mariusz
Community Champion
Community Champion

Hi @BYENER 

 

Try  / CALCULATE( [Measure], ALL( table[Category] ) )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

@Mariusz 

Still not working 🤔

Mariusz
Community Champion
Community Champion

Hi @BYENER 

 

How about Try  / CALCULATE( [Measure], ALL( your table ) ) 

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

@Mariusz , still the same issue. Maybe it's more clear when I show some screenshots.

 

The Card visual is the total processed volume in week 52 for origin "NL". This measure is based on the "screening" table. The matrix "category" is based on the "WIP" table. The Measure column have to show the same number as the card visual.

 

Mariusz
Community Champion
Community Champion

Hi @BYENER

 

This should work.

Measure = 
CALCULATE(
    [Screening Volume],
    ALLSELECTED()
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

@Mariusz thanks a lot! It's working and I am happy 🙂

@Mariusz one more question, when I select multiple weeks then it are dividing by the total number of the selected weeks. It have to be divide by the total number per week, because the columns in the matrix are split in weeks.

 

For example: total number of week 52 = 14358 , but it's dividing by 1.353.683 because all weeks are selected.

Untitled.png

 

 

Mariusz
Community Champion
Community Champion

Hi @BYENER 

 

You can try something like.

% Sales = 
DIVIDE(
    [Sales],
    CALCULATE(
        [Sales],
        ALLSELECTED(),
        VALUES( 'Calendar'[Year Week] )
    )
) 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

@Mariusz this is also working! Thanks a lot.

Hi @BYENER ,

If it is sloved, could you kindly accept it as a solution to close this case?


Best Regards,
Lionel Chen

 

If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.