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
lhdp
Helper I
Helper I

Product between rows and sum group by one or more categories

My need is simple : I have different lines which I want to multiply and I need a global KPI summed by month.

I created a measure : Amount = PRODUCTX(Feuil1,Feuil1[Value])

But of course I'm not specifying how to add that amount up and by default Power BI does a grand total with each row multiplied.

Productx.PNG

I need some help. Thanks in advance. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@lhdp , Try measures like

 

sumx(values(Feuil1[Month]), calculate(PRODUCTX(Feuil1,Feuil1[Value])))

 

or

 

sumx(values(Table[Month]), calculate(sumX(filter(Table, [Variable] ="Qty"), [Value]) * Maxx(filter(Table, [Variable] ="UnitPrice"), [Value])))

View solution in original post

2 REPLIES 2
lhdp
Helper I
Helper I

Thanks to you. The 2 solutions run wells. It depend if we want to specify the product or not between variables. 

amitchandak
Super User
Super User

@lhdp , Try measures like

 

sumx(values(Feuil1[Month]), calculate(PRODUCTX(Feuil1,Feuil1[Value])))

 

or

 

sumx(values(Table[Month]), calculate(sumX(filter(Table, [Variable] ="Qty"), [Value]) * Maxx(filter(Table, [Variable] ="UnitPrice"), [Value])))

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.