Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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)
Please help me to write a DAX measure to achieve that
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
Solved! Go to Solution.
@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!!
TotalAmount=
GROUPBY(Table_Name[Date],SUM(Table_Name[Amount]))
Thanks for your solution, but error at
: "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"
@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!!
Excellent! thank you very much
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
77 | |
73 | |
71 | |
45 | |
42 |
User | Count |
---|---|
48 | |
47 | |
29 | |
28 | |
28 |