The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I am trying to return the latest measurement by parameter (and its corresponding date) for each unique Well Number in ONE table visualization. The Unique ID is actually an Oil well number and the parameters are different types of measurements that are reported on different dates. See example of desired output below.
Unique Well Number | Last Oil Rate (bopd) | Last Oil Rate Date | Last Pressure (psi) | Last Pressure Date |
1 | 50 | 8/15/2020 | 500 | 8/20/2020 |
2 | 30 | 8/17/2020 | 800 | 8/16/2020 |
3 | 20 | 8/10/2020 | 100 | 8/11/2020 |
I have only been able to create these as two separate table visualizations with the same unique well numbers being repeated on the same canvas. There is an ambuiguity problem with the relationships in the schema when joining the Pressure & Oil Rate tables to the Date and Unique Well number tables also so I'm not sure what to do there as well.
I have created a "IsLatest" calculated column in the Oil Rate & Pressure tables and used that to filter to the latest dates for each table.
Can anyone assist? See link below containing zip file for created power bi file and excel data source
https://drive.google.com/file/d/1ux8Yt7p9b9G_JVBttZK_n8SfjV2TsmfT/view?usp=sharing
Thanks in advance
Have you considered LASTNONBLANK() or LASTNONBLANKVALUE() ?
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |