cancel
Showing results 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

Helper II

## Summerise Amount column with distinct row

Hi experts,

I have this Power BI data table Table_Test

I want to summerise column Amount with condition:
If rows have same Date and same Amount, then get one value only to summerise.
For example, when choosing the Date 9/05/2023 it shows 6 and when choosing the date range (by Date Slicer) from 07/05/2023 to 09/05/2023 it shows 20 (6+5+9)

I have writtin this measure but it summerised all values of the same date, that is wrong.

Summarized Amount =
SUMX(
DISTINCT(
FILTER(
Table_Test,
Table_Test[Date] >= MIN(Table_Test[Date]) &&
Table_Test[Date] <= MAX(Table_Test[Date])
)
),
Table_Test[Amount]
)

Thank you

1 ACCEPTED SOLUTION
Super User

@peternznguyen
distinct row =
CALCULATE (
SUMX ( VALUES ( 'Table X'[Amount] ), 'Table X'[Amount] ),
ALL ( 'Table X'[Equipment] )
)

@peternznguyen If this post helps, then please consider accepting it as the solution to help other members find it more quickly.THANK YOU!!

4 REPLIES 4
Helper V

TotalAmount=

GROUPBY(Table_Name[Date],SUM(Table_Name[Amount]))

Helper II

Thanks for your solution, but error at

Table_Name[Date]

: "A single value for column 'Date' in table 'Table_Name' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result"

Super User

@peternznguyen
distinct row =
CALCULATE (
SUMX ( VALUES ( 'Table X'[Amount] ), 'Table X'[Amount] ),
ALL ( 'Table X'[Equipment] )
)

@peternznguyen If this post helps, then please consider accepting it as the solution to help other members find it more quickly.THANK YOU!!

Helper II

Excellent! thank you very much

Announcements

#### 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.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors