cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PBl
Regular Visitor

Problem with date & data linking

Hello everyone!

 

I'm trying to build a model where I present different kinds of data over time, and I would like to be able to put all kinds of data on the same timeline. First of all, I want to create a stacked column + line graph like below.

PBl_0-1600238838825.png

 

Now, I have multiple rows for capacity, which all have different initial capacities. In addition, I have dates when improvements are made (then the capacity is 0 for a while) and then greater than initial capacities.
The need for capacity (line in the graph) comes from a different table.
I tried creating a "master date table", and with a following measure i got it to work - given that i set the source of the capacity (n001, n002,..) as a legend.

PBl_1-1600238897315.png

 

if(FIRSTDATE(Capacities[Improvement start date])>FIRSTDATE('Date'[date]),sum(Capacities[Initial capacity]),if(FIRSTDATE(Capacities[Improvement end date])>FIRSTDATE('Date'[date]),0,sum(Capacities[New capacity])))

 

Of cource, it doesn't work without the legend, because it always checks the first date. However, in the future, I would like to present the type of capacity, not the source of it, so I'll need it fixed. Any ideas how to do it?

 

Thanks!

1 REPLY 1
daxer
Solution Sage
Solution Sage

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors