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
joshua1990
Post Prodigy
Post Prodigy

Grand Total for each Article without Duplicates

Hi all!

I have a table that contains the value for each sales order:

Date Article Order Value
01.01.2023 A 100 5
01.01.2023 A 101 5
01.01.2023 B 102 6

 

Then I have a table visual that shows all the details out of this table.

Here I would like to add a measure that sums up the Value for each article once.

For instance: In the example above we have 2 orders for the same article. Here I would like to consider the value 5 just only 1 time.

In the end the table should display this:

Date Article Order Value
01.01.2023 A 100 5
01.01.2023 A 101 5
01.01.2023 B 102 6
Grand Total     11

 

How would you do this?

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @joshua1990 

please try

ValueMeasure =
ValueMeasure =
SUMX (
SUMMARIZE (
'Table',
'Table'[Article],
'Table'[Date],
"@Value", SUMX ( TOPN ( 1, 'Table', 'Table'[Order] ), 'Table'[Value] )
),
[@Value]
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @joshua1990 

please try

ValueMeasure =
ValueMeasure =
SUMX (
SUMMARIZE (
'Table',
'Table'[Article],
'Table'[Date],
"@Value", SUMX ( TOPN ( 1, 'Table', 'Table'[Order] ), 'Table'[Value] )
),
[@Value]
)

ppm1
Solution Sage
Solution Sage

Try

 

SUMX(VALUES(Table[Article]), [YourMeasure] )

 

Pat

Microsoft Employee

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.

Top Solution Authors