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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
18 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |