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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello everyone,
I've got a table like this:
Loc Date Type Val Price
| TK | 2020/7/14 | Amount | 1,000 | 1000 |
| TK | 2020/7/14 | PT | 58 | 0 |
| KT | 2020/7/14 | Amount | 900 | 900 |
| KT | 2020/7/14 | PT | 50 | 0 |
If Loc and Date are same, I want to get Val where Type is PT as the first value.
And for the second, I want to get Price where Type is PT.
The expected values as follows:
PT
| 58 |
| 0 |
| 50 |
| 0 |
How can I do that?
Thanks,
Vladi
HI @PbiCeo ,
Not very clear from what you have explained.
Can you try explaining it a little better.
Where did you get 80 from ?
Regards,
Harsh Nathani
Sorry, it was just a mistake, not 80, but 50.
Hi @PbiCeo ,
You can create a Column
Column =
IF('Table'[Type] = "Amount",
CALCULATE(MAX('Table'[Val]), FILTER('Table','Table'[Date] = EARLIER('Table'[Date]) && 'Table'[Loc] = EARLIER('Table'[Loc]) && 'Table'[Type] = "PT")),0)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |