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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Briosjuly77
Frequent Visitor

Help-how to do sumx with filter/look up?

Dear All

 

I have 2 tables, I have to calculate the total amount of " black" and "color",

In table 1 Black and colour column are qty,

I have to get the total amount of black : 376*0.098, and total amount of color= 49*0.0312

 

if Vendor is ABC in table 1,  choose the unit price of Vendor "ABC in table 2

if Vendor is GEG in table 1, then choose the unit price of Vendor GEG in table 2. 

 

how to get DAX measure, total Black Amount , and total colour Amount

 

Briosjuly77_0-1617702617222.png

 

thanks for your help......

3 REPLIES 3
Anonymous
Not applicable

Hi @Briosjuly77 

 

Your raw data is not tidy. Please put variables/features into columns and cases into rows. Values of variables should not be values of columns - this is the Excel way of doing things and it's not suitable for analysis in PBI and tabular models. If you'd like to know what 'tidy data' is, then please read this: Tidy data (r-project.org)

amitchandak
Super User
Super User

@Briosjuly77 , Not very clear

 

Two measures 

 

Black total = sum(Table[Black])

 

colour total = sum(Table[colour])

I have edited....please check.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors