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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.