Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have 10 measures in a Stacked Area chart, in two sets of 5. One set is anything less than and equal to today and the other set is anything forcasted or greater than today. My issue is that the two measures create a gap in the visual between today and tomorrow. Is there a way to close this gap? If I make both measures where today is in the data then they stack up and it looks worse...
Solved! Go to Solution.
hi @taylorb
Just adjust the Forecasted measure as below:
Forecasted = IF(MAX('Date'[Date])= TODAY(),[Historical],
CALCULATE(
DISTINCTCOUNT(AssignmentsRef[ID]),
Filter(HistoricalTOAAssignmentsRef,
([STATUS] = "Cleared to Start" || ([STATUS] = "Cancelled" && AssignmentsRef[WAS_NEVER_STARTED] = false)) &&
AssignmentsRef[TYPE] = "Long Term" &&
AssignmentsRef[ActiveDate] > TODAY() &&
AssignmentsRef[ActiveDate] <= TODAY()+14 &&
AssignmentsRef[LOB] = "Manufacturing"
))
)
'Date'[Date] is the field which is in X-axis of Stacked Area Chart. if the date field in in X-axis of Stacked Area Chart is AssignmentsRef[ActiveDate], you just use it instead of 'Date'[Date].
Regards,
Lin
Can you post some sample data and your DAX forumlas? My first thought is to alter the "Past Values DAX" to somehow also include +1 Day in the future Data. So if you were looking at Past data for 8/10-14, change the code so it 'fakes' a 15th date = 8/15 from your future data? (Or Duplicates 8/14 data for 8/15 in the Past if you can't pull from the future data?)
FOrrest
Proud to give back to the community!
Thank You!
DAX Examples:
Forecasted =
CALCULATE(
DISTINCTCOUNT(AssignmentsRef[ID]),
Filter(HistoricalTOAAssignmentsRef,
([STATUS] = "Cleared to Start" || ([STATUS] = "Cancelled" && AssignmentsRef[WAS_NEVER_STARTED] = false)) &&
AssignmentsRef[TYPE] = "Long Term" &&
AssignmentsRef[ActiveDate] > TODAY() &&
AssignmentsRef[ActiveDate] <= TODAY()+14 &&
AssignmentsRef[LOB] = "Manufacturing"
))
Historical =
CALCULATE(
DISTINCTCOUNT(AssignmentsRef[ID]),
Filter(HistoricalTOAAssignmentsRef,
([STATUS] = "Cleared to Start" || ([STATUS] = "Cancelled" && AssignmentsRef[WAS_NEVER_STARTED] = false)) &&
AssignmentsRef[TYPE] = "Long Term" &&
AssignmentsRef[ActiveDate] <= TODAY() &&
AssignmentsRef[LOB] = "Manufacturing"
))
They are literally the same data, just want the line to change to dotted after Today(), if I make both sets where they have Today() in their data then it stacks all the lines together on one day and looks way worse than the gap. See this example where I had one of the forecasted measures be >= Today() instead of just >
hi @taylorb
Just adjust the Forecasted measure as below:
Forecasted = IF(MAX('Date'[Date])= TODAY(),[Historical],
CALCULATE(
DISTINCTCOUNT(AssignmentsRef[ID]),
Filter(HistoricalTOAAssignmentsRef,
([STATUS] = "Cleared to Start" || ([STATUS] = "Cancelled" && AssignmentsRef[WAS_NEVER_STARTED] = false)) &&
AssignmentsRef[TYPE] = "Long Term" &&
AssignmentsRef[ActiveDate] > TODAY() &&
AssignmentsRef[ActiveDate] <= TODAY()+14 &&
AssignmentsRef[LOB] = "Manufacturing"
))
)
'Date'[Date] is the field which is in X-axis of Stacked Area Chart. if the date field in in X-axis of Stacked Area Chart is AssignmentsRef[ActiveDate], you just use it instead of 'Date'[Date].
Regards,
Lin
Hi @taylorb ,
You need to decrease the inner padding from format:
Format -> X-Axis -> Decrease Inner Padding %
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
Hi @taylorb ,
Seeing the screenshot that you shared, it shows that one of your measure calculations has value till August 14 and the other one has value from August 15 to the last value on the x-axis.
Click on your visual, under format options on visualisation pane, go to x-axis option, there is a padding option. Check that if that helps.
Thanks,
Pragati
It doesnt look like there is a padding option for this visual
Hi @taylorb ,
Apologies for this. There is a Category Width option which you can check as highlighted below:
Thanks,
Pragati
Hi @taylorb
Do you have time component in the date column? that might be causing it otherwise I can't think of a way it can be done.
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
There is not a time component, only date.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |