Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Show rows between two dates from different tables

Hello,

 

I have requirement where I need to show rows in table visual based on 2 date slicers. I have 2 tables with data like this.

Table 1

ID  Value Status        Date             FK_ID

1    2        Issued    2019-03-24    guid2

2    5        Claimed 2019-03-27    guid4

 

 

Table 2

 

FK_ID  Status            Date 

guid2 Issued         2019-03-24

guid4 Issued         2019-03-20

guid4 Claimed      2019-03-27

 

Now I want to show data based on 2 dates selected startdate slicer(table 1 date column) and Recondate slicer(table 2 date column). my requirement is to have 2 slicers it cannot be combined.

 

I need to see Issued status rows as of date selected.

For example if startdate is set to 2019-03-25 and ReconDate is set to 2019-03-25 then I need to see 2 rows like below

ID IssuedDate       Value

1  2019-03-24       2

2  2019-03-20       5

 

But when my recondate is set to 2019-03-28 and start being the same as above I need to see only 1 row because ID 2 has Claimed status as of 2019-03-28. So it should look like below

 

ID IssuedDate       Value

1  2019-03-24       2

Thanks in advance.

 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    I have figure it out.

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    Do you create any relationship between Table1 and Table2 in Power BI?

    As for your example, i can't find the common rule from that.

     

    Based on my assumption, the rule of your example is as below, please check if i understand you correctly,

    1. startdate :2019-03-25, ReconDate:2019-03-25,

    It show which "IssuedDate" <=startdate ??

    2.startdate :2019-03-25, ReconDate:2019-03-28,

    It show which "Claimed " <=ReconDate???

     

    If i don't understand you correctly, please correct me.

     

    Best Regards

    Maggie

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have figure it out.