Forum Discussion
Fill in missing values in a line graph with max date value
Thanks for the reply from lbendlin , Sahir_Maharaj, please allow me to provide another insight:
Hi anshenterprice ,
Based on the data you provided, I ran tests.
When I check ABC and Equity, the line in the line chart stops at 5/15/2024 because the Equity values after that date are all null.
Therefore, would you like to draw a line for these dates that have no Equity value as well?
If so, changes can be made to your Line graph Selected Measure Name measure.
If Equity is null, then this Equity is 0.
Line graph Selected Measure Name =
VAR MySelection =
SELECTEDVALUE (NameTable[Name])
RETURN
SWITCH(
TRUE(),
MySelection = "NAV", SUM(sourceTable[NAV])/100,
MySelection = "Equity",
IF(ISBLANK(SUM(sourceTable[Equity])),0,SUM(sourceTable[Equity])/100),
SUM(sourceTable[NAV]))
In this way, a continuous line can be plotted for Equity up to the max date in the line chart.
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you Anonymous Actually it should display 3 instead of 0 incase if its blank on equity data after max date values.. so whatever max date values that should go at the end (max date of NAV)
because in the above dax whenever its blank then it should display 0 but we dont want that ..we are only focusing on the max date value of equity