Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have the following table with repeated records, except for the sale column. I need, according to this example, to group by the date, state, and contract columns, and of the records that I have left, to filter by the value of the state = 1 column and hence the one with the maximum value of the date field, the sum from the Contract Value column:
Date State Contract contract Value Sales Type
202001 1 123456 34.000 shoes
202001 1 123456 34.000 socks
202001 0 123456 10.000 socks
202001 1 234567 44.000 shoes
202001 1 234567 44.000 socks
202001 0 234567 10.000 socks
202001 1 345678 55.000 shoes
202001 1 345678 55.000 socks
202001 0 345678 10.000 socks
202002 0 123456 10.000 shoes
202002 0 234567 11.000 socks
202002 0 345678 12.000 shoes
As a result, it will be the following with 133.000 as a contract value. As there is no date with value 202002 with state = 1, we will have to take the sum of the dates that have 202001 and that the state is = 1:
Date State Contract Contract Value
202001 1 123456 34.000
202001 1 234567 44.000
202001 1 345678 55.000
Thank you very much in advance,
Mayte
Hi @Anonymous
try a new calculated table
Table 2 = summarize(filter('Table';'Table'[State]=1);'Table'[Date];'Table'[State];'Table'[Contract];"Contract Value";MAX('Table'[contract Value]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @Anonymous38,
Thanks for your answer, but it´s not working.
In this case, I need to:
First: Filter for state = 1
Second: Get the maximum value of date. In this case, it is 202001 (although it´s not a date value, it´s a number value), because 202002 has 0 value in field state.
Third: Group by Date value and contract Field and summarize Contract Value field.
Thanks again,
Mayte
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |