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
riadorra
Helper II
Helper II

create new SUMIF colum

Hi,

I have 2 tables, one containing the products ID and other cotaining Sales (Values and Quantity sold) per product ...

On the register table I want to create a new colum with the average sales price price ...

 

Could anyone help me to solve this SUMIF problem?

 

thank you.

Riad

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

@riadorra,

 

You may check the following DAX.

Column =
VAR t =
    FILTER ( Table2, Table2[productID] = Table1[productID] )
RETURN
    DIVIDE (
        SUMX ( t, Table2[Quantity] * Table2[Value] ),
        SUMX ( t, Table2[Quantity] )
    )
Community Support Team _ Sam Zha
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
v-chuncz-msft
Community Support
Community Support

@riadorra,

 

You may check the following DAX.

Column =
VAR t =
    FILTER ( Table2, Table2[productID] = Table1[productID] )
RETURN
    DIVIDE (
        SUMX ( t, Table2[Quantity] * Table2[Value] ),
        SUMX ( t, Table2[Quantity] )
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jthomson
Solution Sage
Solution Sage

I'm not sure what this has to do with SUMIF or why you couldn't just create a measure dividing the revenue by the quantity?

Hi,

 

based on this new colum, i 'll classificate the products on pre determined ranges following the ranges bellow:

 

1. sales price from $0 to $50

2. sales price from $51 to $100

3. sales price from $101 to $150

4. sales price from $151 to $200

 

thank you.

Riad 

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.