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

How to get unit price from price table?

Hi All,

Two tables I have, One is monthly product sold table and the other is U/price master table. I would like to get the unit price form Price master table and get the total amount of sold.  How to match the price by cusomer and poruct?

Monthly sold table

 

20190126_184406.png

Price Master table

 

20190126_184816.png

What I would like to see:

20190126_185752.png

 

 

Thanks.

 

 

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @bluetronics

Is this not quite similar to what we solved not long ago?

Please always show your sample data in tabular-text format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data.

 

If you want to create a new table, try this:

 

ResultTable =
ADDCOLUMNS (
    ADDCOLUMNS (
        MonthlySalesTable;
        "Unit price"; LOOKUPVALUE (
            PriceTable[Sales price];
            PriceTable[Customer]; [Customer];
            PriceTable[Product]; [Product]
        )
    );
    "Sold total"; [Price] * [Qty]
)

 

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @bluetronics

Is this not quite similar to what we solved not long ago?

Please always show your sample data in tabular-text format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data.

 

If you want to create a new table, try this:

 

ResultTable =
ADDCOLUMNS (
    ADDCOLUMNS (
        MonthlySalesTable;
        "Unit price"; LOOKUPVALUE (
            PriceTable[Sales price];
            PriceTable[Customer]; [Customer];
            PriceTable[Product]; [Product]
        )
    );
    "Sold total"; [Price] * [Qty]
)

 

 

Hi @AlB,

Thanks a lot It works. 🙂

and I will add sample data when I have a question.

Best Regards,

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.