The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey guys, I've ran into an issue when trying to make a chart visualising how many ,,statuses" have been achieved in relation to date.
Here's how my tables look like
,,Planned schedule" table: https://gyazo.com/6a1ae11cb8782c35fb4b6643041046c9
,,Actual schedule" table: https://gyazo.com/c25038d117c8e35a90b075e513daf649
empty records in ,,actual" table mean a status hasn't been achieved yet.
The chart im trying to get is one showing a sum of a certain status achieved by date (for example how many ,,installation" status were achieved by 08.11.2020)
Example of what i'm trying to achieve:
https://gyazo.com/43aab2d9ea655754acdc7a0d077d3155
And if its possible i'd like to then compare it to the plans:
https://gyazo.com/8e74808990d2fbb2155b86f60d37963e
How would you guys approach that problem?
For some reason i can't edit the previous message, anyways. Here's the proper ,,actual" table because i sent the same one two times:
Line | OP No. | MC No. | Planned | Arrival |
1 | a | 1 | Planned | 03.11.2020 |
1 | b | 4 | Planned | 03.11.2020 |
1 | c | 5 | Planned | 03.11.2020 |
1 | d | 7 | Planned | 03.11.2020 |
1 | e | 8 | Planned | 03.11.2020 |
1 | f | 9 | Planned | 03.11.2020 |
1 | g | 10 | Planned | 03.11.2020 |
1 | h | 11 | Planned | 04.11.2020 |
1 | 50B | 14 | Planned | 04.11.2020 |
1 | i | 12 | Planned | 04.11.2020 |
1 | j | 15 | Planned | 04.11.2020 |
1 | k | 16 | Planned | 04.11.2020 |
1 | l | 17 | Planned | 04.11.2020 |
1 | m | 13 | Planned | 04.11.2020 |
1 | n | 18 | Planned | 04.11.2020 |
1 | o | 19 | Planned | 05.11.2020 |
1 | p | 6 | Planned | 05.11.2020 |
1 | r | 20 | Planned | 06.11.2020 |
1 | s | 21 | Planned | 06.11.2020 |
1 | t | 3 | Planned | 06.11.2020 |
1 | y | 2 | Planned | 07.11.2020 |
In 3 parts because the forum doesn't allow me to send it otherwise
Hi @jellyjoe ,
Could you please provide specific calculation logic and final results based on the sample data you gave? Not sure how to calculate the number of machine with arrived status? Is it equal to the number of machines on the corresponding date in Schedule Actual table? Or is it to compare Schedule Actual table with the Schedule pLAN table to get the number of machines on that day? Thank you.
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Sorry for the late answer @Anonymous .
Here's the data in tables:
,,Actual" Table:
Line | OP No. | MC No. | Planned | Arrival | Unpacking |
1 | a | 1 | Planned | 03.11.2020 | 03.11.2020 |
1 | b | 4 | Planned | 03.11.2020 | 03.11.2020 |
1 | c | 5 | Planned | 03.11.2020 | 03.11.2020 |
1 | d | 7 | Planned | 03.11.2020 | 03.11.2020 |
1 | e | 8 | Planned | 03.11.2020 | 04.11.2020 |
1 | f | 9 | Planned | 03.11.2020 | 04.11.2020 |
1 | g | 10 | Planned | 03.11.2020 | 04.11.2020 |
1 | h | 11 | Planned | 04.11.2020 | 04.11.2020 |
1 | 50B | 14 | Planned | 04.11.2020 | 04.11.2020 |
1 | i | 12 | Planned | 04.11.2020 | 05.11.2020 |
1 | j | 15 | Planned | 04.11.2020 | 05.11.2020 |
1 | k | 16 | Planned | 04.11.2020 | 05.11.2020 |
1 | l | 17 | Planned | 04.11.2020 | 05.11.2020 |
1 | m | 13 | Planned | 04.11.2020 | 06.11.2020 |
1 | n | 18 | Planned | 04.11.2020 | 06.11.2020 |
1 | o | 19 | Planned | 05.11.2020 | 06.11.2020 |
1 | p | 6 | Planned | 05.11.2020 | 06.11.2020 |
1 | r | 20 | Planned | 06.11.2020 | 06.11.2020 |
1 | s | 21 | Planned | 06.11.2020 | 07.11.2020 |
1 | t | 3 | Planned | 06.11.2020 | 07.11.2020 |
1 | y | 2 | Planned | 07.11.2020 | 07.11.2020 |
And the ,,Planned" table
Line | OP No. | MC No. | Planned | Arrival | Unpacking |
1 | a | 1 | Planned | 03.11.2020 | 03.11.2020 |
1 | b | 4 | Planned | 03.11.2020 | 03.11.2020 |
1 | c | 5 | Planned | 03.11.2020 | 03.11.2020 |
1 | d | 7 | Planned | 03.11.2020 | 03.11.2020 |
1 | e | 8 | Planned | 03.11.2020 | 04.11.2020 |
1 | f | 9 | Planned | 03.11.2020 | 04.11.2020 |
1 | g | 10 | Planned | 03.11.2020 | 04.11.2020 |
1 | h | 11 | Planned | 04.11.2020 | 04.11.2020 |
1 | 50B | 14 | Planned | 04.11.2020 | 04.11.2020 |
1 | i | 12 | Planned | 04.11.2020 | 05.11.2020 |
1 | j | 15 | Planned | 04.11.2020 | 05.11.2020 |
1 | k | 16 | Planned | 04.11.2020 | 05.11.2020 |
1 | l | 17 | Planned | 04.11.2020 | 05.11.2020 |
1 | m | 13 | Planned | 04.11.2020 | 06.11.2020 |
1 | n | 18 | Planned | 04.11.2020 | 06.11.2020 |
1 | o | 19 | Planned | 05.11.2020 | 06.11.2020 |
1 | p | 6 | Planned | 05.11.2020 | 06.11.2020 |
1 | r | 20 | Planned | 06.11.2020 | 06.11.2020 |
1 | s | 21 | Planned | 06.11.2020 | 07.11.2020 |
1 | t | 3 | Planned | 06.11.2020 | 07.11.2020 |
1 | y | 2 | Planned | 07.11.2020 | 07.11.2020 |
The goal is to calculate the sum of how many machines achieved for example the ,,Arrival" state by a certain date, and compare it to how many machines were planned to achieve the state by that day.
So for example:
Lets say that on
01/01/2020 - 3 machines achieved state Arrival
02/01/2020 - 4 other machines achieved state Arrival
03/01/2020 - 2 other machines achieved state Arrival
I want the line chart to show me a value of 4 on 01/01/2020, then a value of (3+4) = 7 on 02/01/2020, and then a value of (7+2) = 9 on 03/01/2020.
And the same would go for the ,,planned" table so that i could compare that for example on day X/X/2020 12 machines achieved state Y and the plans were to achieve for example 15.
Thanks for your answer @Anonymous ,
It semi-works however im still having trouble achieving a certain effect that i wanted to get from the line chart.
Currently it shows the count of achieved statuses for each day separately.
https://gyazo.com/c26b093d1461b15e953ec7ea429ac2eb
What i want to achieve is the aggregated values for each day. Something like this:
https://gyazo.com/b93aa078b57ab4e0cc0f5aa0c62d295c
Hi @jellyjoe ,
What's the meaning of the aggregated values for each day? It equals to count of actual status plus count of planned status? Could you please provide some sample data with text format and desired result with calculation logic? Thank you.
In addition, please create the below measure and drag this measure onto your line chart to replace the original Values fields. Later check whether you can get the desired result.
Measure =
VAR _curdate =
SELECTEDVALUE ( 'Date'[Date] )
VAR _actual =
CALCULATE (
COUNT ( 'Actual schedule'[Planned] ),
FILTER ( 'Actual schedule', 'Actual schedule'[Installation] = _curdate )
)
VAR _palnned =
CALCULATE (
COUNT ( 'Planned schedule'[Planned] ),
FILTER ( 'Planned schedule', 'Planned schedule'[Installation] = _curdate )
)
RETURN
_actual + _palnned
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Hi @jellyjoe ,
First, you need to create a date dimension table and create relationships with Actual schedule and Planned schedule table base on date field as below screenshot:
Then create a line chart (Axis: Date field in Date table Values: count of Actual and count of Planned)
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.