GitHub user sreekanthpamujula9-byte created a discussion: How to handle 
multiple date columns with a single month filter in Apache Superset (Power BI 
USERELATIONSHIP use case)

### Background

We are migrating reports from Power BI to Apache Superset.

In Power BI, we use a single Date dimension table with multiple relationships 
to a fact table that contains multiple date columns, such as:
- enquiry_date
- test_drive_date
- conversion_date
- booking_date

Only one relationship (with enquiry_date) is active.  
Other relationships are inactive and are activated at query time using the 
`USERELATIONSHIP()` DAX function.

---

### Current behavior in Power BI

When a user selects a specific month (for example, December of the current 
year) from a single date slicer:
- Enquiry metrics are filtered using `enquiry_date`
- Test drive metrics are filtered using `test_drive_date`
- Conversion metrics are filtered using `conversion_date`
- Booking metrics are filtered using `booking_date`

All metrics respond correctly to the same month selection, even though only one 
relationship is active.

---

### Problem in Apache Superset

In Apache Superset:
- We can define only one time column per dataset
- There is no concept of active/inactive relationships
- There is no equivalent of Power BI’s `USERELATIONSHIP()` function

Because of this, we are unable to reproduce the same behavior where:
- A single month filter controls multiple metrics
- Each metric uses a different date column from the same table

---

### Question

How should this type of requirement be handled in Apache Superset?

Specifically:
- How can we apply one common month filter
- While allowing different metrics to be evaluated against different date 
columns from the same table

We are using PostgreSQL as the backend database.


GitHub link: https://github.com/apache/superset/discussions/36846

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to