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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
joshua1990
Post Prodigy
Post Prodigy

SUMX Multiply per Row - Wrong Total

Hello!

I have a simple dimensional table and a fact table.

The dimensional table has this structure:

ArticleValue
A0.9
B0.8

 

Then I have a sales table that shows me the number of sales per Article.

Now I would like to multiply the column 'Value' with 'Sales'.

Before that, we need to subtract the column 'Value' with two 2. 

This functions works perfectly well on row level. But the aggregation to the total number is false.

 

Test = 
VAR _Factor= 2-SUM('Attribute'[Value])
RETURN
CALCULATE(SUMX('Attribute', _Factor*[Sales]))

 

Why is that so?

What have I missed?

 

3 REPLIES 3
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Can you post a few examples with current (incorrect) results together with the desired corrections?

Regards

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @joshua1990 ,

 

Use this measure to get the correct aggregation for your Total.
FixedTest=  SUMX(VALUES( Table[Article]), Test)

 

I hope this helps!

Mark this as a solution if it answers your question. Kudos are always appreciated.

Thanks.

 

 

@Tanushree_Kapse : Thanks, but it works not on row level. Maybe the result is correct for the Total, but on row level there a wrong values.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.