Forum Discussion

krishna_kv's avatar
krishna_kv
New Member
2 years ago

Difference bw dates in power BI

The issue lies in the fact that the data is spread across two rows instead of a single row in the account table. This is because the data for both systems has different IDs and applications, resulting in separate rows.

 

I have separated the data into two tables for Cord (ID 3) and Ping (ID 2266) but since the IDs are different in account table ,  unable to find a way to combine them into a single row in order to find a difference between tables.

As per the attached screenshot , Is there a way to find the differenc betwen the two login dates 6/7/2024 to 6/6/2024. In database I have 2 million records.

Thanks for the support.

7 Replies

  • 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

  • krishnakv83's avatar
    krishnakv83
    Frequent Visitor

    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   
    IDAPPLICATION_IDLAST_DATE
    327416962202-06-2024 00:00
    327417082203-06-2024 00:00
    327417092207-06-2024 00:00
    327417102205-05-2024 00:00
    327416942207-06-2024 00:00
    327416982205-06-2024 00:00
    327416992207-06-2024 00:00
    327417012207-06-2024 00:00
    327417002207-06-2024 00:00
    327417032207-06-2023 00:00
    327417042205-06-2024 00:00
    328031162201-06-2024 00:00
    Table1  
    IDAPPLICATION_IDLAST_DATE
    9285307-06-2024 00:00
    8855307-06-2024 00:00
    9269303-06-2024 00:00
    7950307-05-2024 00:00
    7718307-06-2024 00:00
    12593305-06-2024 00:00
    12040307-06-2024 00:00
    11819307-06-2024 00:00
    11820307-06-2024 00:00
    15370307-06-2024 00:00
    19197305-06-2024 00:00
    19360301-06-2024 00:00

     

     

     

    Main Table

     
    IDAPPLICATION_IDLAST_DATE
    9285307-06-2024 00:00
    8855307-06-2024 00:00
    9269303-06-2024 00:00
    7950307-05-2024 00:00
    7718307-06-2024 00:00
    12593305-06-2024 00:00
    12040307-06-2024 00:00
    11819307-06-2024 00:00
    11820307-06-2024 00:00
    15370307-06-2024 00:00
    19197305-06-2024 00:00
    19360301-06-2024 00:00
    327416962202-06-2024 00:00
    327417082203-06-2024 00:00
    327417092207-06-2024 00:00
    327417102205-05-2024 00:00
    327416942207-06-2024 00:00
    327416982205-06-2024 00:00
    327416992207-06-2024 00:00
    327417012207-06-2024 00:00
    327417002207-06-2024 00:00
    327417032207-06-2023 00:00
    327417042205-06-2024 00:00
    328031162201-06-2024 00:00
    • lbendlin's avatar
      lbendlin
      Super User

      How are you planning to correlate between rows? Based on the LAST_DATE  column alone?

      • krishna_kv's avatar
        krishna_kv
        New 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.