Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
4 years ago

Problems creating a relationship between tables to use a single date filter

ejemplo.jpg

I must make use of two filters:

one per country and the other per date.

If I create the relationship Table A (date) ->Table B (date) does not filter me by country.

If I create the relationship Table B (country) -> Table B (country) does not filter me by the time range.

How to solve it?

The date is every 10 min: EJemplo

COUNTRY|ID|DATE| QUANTITY

1 58439828 15-11-2021 16:00:00 152
1 58439676 15-11-2021 15:50:00 191
1 58439485 15-11-2021 15:40:00 169
1 58439316 15-11-2021 15:30:00 174

Table A

Name Null? Guy
-------- ------ ----------
COUNTRY NUMBER(38)
ID NUMBER(10)
FROM DATE
QUANTITY NUMBER(10)

Table B

PAIS NUMBER(38)
DESDE DATE
CANT NUMBER(10)

1 Reply

  • Hi pablo20 ,

     

    In this case you need to create two additional dimension tables on your model:

    • Calendar Table
    • Country Table

    This tables need to have unique values and relate to your other two table with a One to many relationship, then use the values on those tables for the filters and slicers of your data.