Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Dear all
how can I sum following situation correctly:
From the table below: I have 2x Status "paid" but i only want to sum "amount" 1x with the smaller date from "modified_on".
So when I sum (amount) it should only count the 80 at modified_on 28.01.2022.
Thank you all for your help!!!
id | rev | revtype | created_on | modified_on | address | amount | date | license_plate | number | payment_period | status | legal_status |
4321 | 55 | 1 | 22.11.2021 10:33 | 15.12.2021 17:59 | Test | 80 | 15.12.2021 17:59 | ZH123 | 016742516 | 21 | ISSUED | NONE |
4321 | 133 | 1 | 22.11.2021 10:33 | 07.01.2022 03:00 | Test | 80 | 15.12.2021 17:59 | ZH123 | 016742516 | 21 | OVERDUE | NONE |
4321 | 199 | 1 | 22.11.2021 10:33 | 28.01.2022 07:36 | Test | 80 | 15.12.2021 17:59 | ZH123 | 016742516 | 21 | PAID | NONE |
4321 | 393 | 1 | 22.11.2021 10:33 | 01.03.2022 18:53 | Test | 80 | 15.12.2021 17:59 | ZH123 | 016742516 | 21 | PAID | REMINDED |
Solved! Go to Solution.
Hi @mybeppo ,
Please try the following formula:
Measure =
VAR mindate =
MINX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[id] = MAX ( 'Table'[id] )
&& 'Table'[status] = "PAID"
),
'Table'[modified_on]
)
RETURN
CALCULATE (
SUM ( 'Table'[amount] ),
FILTER ( 'Table', 'Table'[modified_on] = mindate && 'Table'[status] = "PAID" )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mybeppo ,
Please try the following formula:
Measure =
VAR mindate =
MINX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[id] = MAX ( 'Table'[id] )
&& 'Table'[status] = "PAID"
),
'Table'[modified_on]
)
RETURN
CALCULATE (
SUM ( 'Table'[amount] ),
FILTER ( 'Table', 'Table'[modified_on] = mindate && 'Table'[status] = "PAID" )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mybeppo Try this measure:
Hi @mybeppo , Will something like this work?
thank you, unfortunatly it shows no results
User | Count |
---|---|
80 | |
77 | |
64 | |
48 | |
45 |
User | Count |
---|---|
103 | |
45 | |
39 | |
39 | |
36 |