Forum Discussion
Difference bw dates in power BI
Hi all,
Here is the requirement with sample data. Please have a look and let me know if you need more info.
I have a main table like below and I separated into two tables Table 1 and Table 2 based on the application ID to find the greater date between two tables.
I'm not able to bring user id ( which is available in customer table) to match two tables but facing multiple valuse issues. To bring user to either table1 or table2 facing issue.
=calculate(values(userid))
Requirment:
| I need to find greater/ latest date between Application 3 and 22 from the table. |
Regards, Krishna
| Table 2 | ||
| ID | APPLICATION_ID | LAST_DATE |
| 32741696 | 22 | 02-06-2024 00:00 |
| 32741708 | 22 | 03-06-2024 00:00 |
| 32741709 | 22 | 07-06-2024 00:00 |
| 32741710 | 22 | 05-05-2024 00:00 |
| 32741694 | 22 | 07-06-2024 00:00 |
| 32741698 | 22 | 05-06-2024 00:00 |
| 32741699 | 22 | 07-06-2024 00:00 |
| 32741701 | 22 | 07-06-2024 00:00 |
| 32741700 | 22 | 07-06-2024 00:00 |
| 32741703 | 22 | 07-06-2023 00:00 |
| 32741704 | 22 | 05-06-2024 00:00 |
| 32803116 | 22 | 01-06-2024 00:00 |
| Table1 | ||
| ID | APPLICATION_ID | LAST_DATE |
| 9285 | 3 | 07-06-2024 00:00 |
| 8855 | 3 | 07-06-2024 00:00 |
| 9269 | 3 | 03-06-2024 00:00 |
| 7950 | 3 | 07-05-2024 00:00 |
| 7718 | 3 | 07-06-2024 00:00 |
| 12593 | 3 | 05-06-2024 00:00 |
| 12040 | 3 | 07-06-2024 00:00 |
| 11819 | 3 | 07-06-2024 00:00 |
| 11820 | 3 | 07-06-2024 00:00 |
| 15370 | 3 | 07-06-2024 00:00 |
| 19197 | 3 | 05-06-2024 00:00 |
| 19360 | 3 | 01-06-2024 00:00 |
Main Table | ||
| ID | APPLICATION_ID | LAST_DATE |
| 9285 | 3 | 07-06-2024 00:00 |
| 8855 | 3 | 07-06-2024 00:00 |
| 9269 | 3 | 03-06-2024 00:00 |
| 7950 | 3 | 07-05-2024 00:00 |
| 7718 | 3 | 07-06-2024 00:00 |
| 12593 | 3 | 05-06-2024 00:00 |
| 12040 | 3 | 07-06-2024 00:00 |
| 11819 | 3 | 07-06-2024 00:00 |
| 11820 | 3 | 07-06-2024 00:00 |
| 15370 | 3 | 07-06-2024 00:00 |
| 19197 | 3 | 05-06-2024 00:00 |
| 19360 | 3 | 01-06-2024 00:00 |
| 32741696 | 22 | 02-06-2024 00:00 |
| 32741708 | 22 | 03-06-2024 00:00 |
| 32741709 | 22 | 07-06-2024 00:00 |
| 32741710 | 22 | 05-05-2024 00:00 |
| 32741694 | 22 | 07-06-2024 00:00 |
| 32741698 | 22 | 05-06-2024 00:00 |
| 32741699 | 22 | 07-06-2024 00:00 |
| 32741701 | 22 | 07-06-2024 00:00 |
| 32741700 | 22 | 07-06-2024 00:00 |
| 32741703 | 22 | 07-06-2023 00:00 |
| 32741704 | 22 | 05-06-2024 00:00 |
| 32803116 | 22 | 01-06-2024 00:00 |
- lbendlin2 years ago
Super User
How are you planning to correlate between rows? Based on the LAST_DATE column alone?
- krishna_kv2 years agoNew Member
Hi,
I tried to correlate with related funciton but it doesnot work as the relationship is many to many.
secondly I tried Calculate(values(date)) it shown with error - multiple values retuned where single value was expected.
Please give some inputs here.
- lbendlin2 years ago
Super User
That was not my question. Please decribe the logic based on which rows from the two tables should be correlated.
- krishnakv832 years agoFrequent Visitor
Relation ship was with Customer ID from another table thease two table IDs. The correlation should be Last_date column alone to find the greater date between two dates.
- lbendlin2 years ago
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523