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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.