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
Noppadon
Frequent Visitor

How to Divide Sum Current Category and Total of Category

How to Create Messure Divide Sum Current Category and Total of Category. Same Excel Formula as Attach Picture

1.jpg2.jpg

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Noppadon 

Ok, try this.

 

Sales pct Brand = 
DIVIDE(
    [Sales], --your Measure or Expresion example SUM(SalesTable[Net Sales])
    CALCULATE(
        [Sales], -- again, your Measure or Expresion example SUM(SalesTable[Net Sales])
        ALLSELECTED(),
        VALUES('Product'[Brand]) --Brand Column
    )
)


Regards,
Mariusz

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

3 REPLIES 3
Noppadon
Frequent Visitor

Hi Mariusz,

Result is incorrect. In case i want to divide net sales of men  (gender Category) and Total Net sales of Nike (Brand Category)


@Noppadon wrote:

How to Create Messure Divide Sum Current Category and Total of Category. Same Excel Formula as Attach Picture

1.jpg2.jpg


 

Mariusz
Community Champion
Community Champion

Hi @Noppadon 

Ok, try this.

 

Sales pct Brand = 
DIVIDE(
    [Sales], --your Measure or Expresion example SUM(SalesTable[Net Sales])
    CALCULATE(
        [Sales], -- again, your Measure or Expresion example SUM(SalesTable[Net Sales])
        ALLSELECTED(),
        VALUES('Product'[Brand]) --Brand Column
    )
)


Regards,
Mariusz

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

Mariusz
Community Champion
Community Champion

Hi @Noppadon 

You can use the expression below.

Sales % of Total = 
DIVIDE(
    [Sales], --your Measure or Expresion example SUM(SalesTable[Net Sales])
    CALCULATE(
        [Sales], -- again, your Measure or Expresion example SUM(SalesTable[Net Sales])
        ALL(Sales) -- your table
    )
)


Regards,
Mariusz

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.