Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vhunyad
Regular Visitor

Relationship to a key and date range

Hello everyone

I have a table structure (partial) of
Campaign (CampaignID, StartDate,EndDate)

Salida (CampaignID,ContactID)

Contacto (ContactID)

Pedido (ContactID, OrderDate).

All tables except Campaign have several million rows. Currently, relationships between tables
Campaign->1:* Departure->*:* (due to address) Customer<->(1:*)Order.
I also have a manual filter for the order date range, which must be set manually on the actual campaign start dates. This way I can't select multiple campaigns with different start-end dates.
I would like to remove the manual date filter and apply the CustomerID and OrderDate filters (between StartDate and EndDate) in the order table. I tried to expand the start-end date ranges to a separate table, but I can't have two active connections between the campaign and the order.

I understand that I could use calculated fields or measures in the campaign table to calculate orders, but I have many other targeting/filters/charts and other related tables that would not be applied/filtered in that case. I prefer to have a type of structure that naturally includes these restrictions and then I could use all my other filters in parallel and have my charts intact.
Thank you for your support,

Viktor

2 REPLIES 2
Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

I did not get it completely. But you need to create a date dimension and even if there are two dates you need join it with both. One will active one inactive. You can use userelation to activate one

 

Refer how to deal with two dates : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.