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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
DonBisset
Frequent Visitor

Multiple Dates

Hi

I'm really stuck and hoping you can help.

 

My module contains 

  • A fact table for TASKS, containing multiple date fields, CREATED DATE, DUE DATE, COMPLETED DATE
  • A date table with an active relationship to CREATED DATE

My challenge is to create a report visual with the calendar on the x-axis, for example: 

  • Feb 2021, [Sum of Tasks Created], [Sum of Tasks Due], [Sum of Tasks Completed]
  • March 2021, [Sum of Tasks Created], [Sum of Tasks Due], [Sum of Tasks Completed]
  • and so on

My problem is that the output shows the sum of records that match the active relationship, CREATED DATE.  In other words, a task completed in March would count in the month the task was created.

 

This must be a common issue but I must be googling the term.

Thanks in advance

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @DonBisset 

It is a pretty common problem.  Take a look at this post that discusses how to handle it.
https://blog.enterprisedna.co/working-with-multiple-dates-in-power-bi/

 

View solution in original post

4 REPLIES 4
joshyT7
Frequent Visitor

As @aj1973 stated above you can use the USERELATIONSHIP function to help you here. 

Create two inactive relationships for your other date columns and then you would need to specify them within a CALCULATE function. 

For example: 

CALCULATE ( SUM ( tasks ), USERELATIONSHIP ( tasks[due date], date[date] ) )

This will use the inactive relationship between due date and your date table rather than the relationship with created date. 

Hope this helps! 

aj1973
Community Champion
Community Champion

Hi @DonBisset 

To your Model add 2 other inactive relationship between Due date and Completed date to the Calaendar table.

Then add 2 measures using Dax formula USERELATIONSHIP to get the sum for due and completed tasks

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

jdbuchanan71
Super User
Super User

Hello @DonBisset 

It is a pretty common problem.  Take a look at this post that discusses how to handle it.
https://blog.enterprisedna.co/working-with-multiple-dates-in-power-bi/

 

Thanks..  your detailed post was exactly what I needed to work through this.   Logically it makes sense now, whereas before creating a measure seemed counter-intuitive.  This has opened lots of doors to measures now, my model is going to get busy 🙂

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.