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
rogerk
Frequent Visitor

Date relationship not working / plotting multiple lines vs. dates

I would like to plot normalized work progress and hours used on a single axis, as follows:

Screenshot 2022-03-16 at 11.18.06.png

I have a general table with project information that is related to two further tables that contain the work progress and hours used for multiple projects. The tables, columns and relationships are displayed here:

 

Screenshot 2022-03-16 at 11.13.03.png

However, the date relationship does not work in my case. I cannot make it active due to the the active relationship to the Project table. I also cannot get the relationship to work if I remove the relationships to the project table because usually none of the date values from the Work table match the date values from the Budget table.

 

I would really appreciate any advice on how to solve this problem.

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

I recommend you set up a Date table with continuous dates covering the range of dates in the model. You can then also use Time Intelligence functions

model.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks, I set this up and I feel this is the right approach, but there is a new problem:

 

On the upper graph I plotted work progress (0...1) vs the newly set-up date table (red line), which shows correctly. The % hours used (dark blue) are displayed wrong vs the new date table. There is a factor 100 between the displayed and the calculated value and the order of the values linked to the new date table is wrong.

The lower graph shows the correct data of % hours used vs. the old date in the table.

Maybe you can see where I went wrong.

Screenshot 2022-03-16 at 15.04.49.png

AntonioHR
Helper I
Helper I

Hello @rogerk

You can change the active relationship in a measure.  Something like this:
MeasureForWork = CALCULATE(SUM(%WorkDone), USERELATIONSHIP(Date1,Date2))

Then use Date2 on the x axis and represent MeasureForWork and the %Hours column

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.