Forum Discussion

BoringName's avatar
BoringName
Frequent Visitor
3 years ago
Solved

Line chart blank values +0 not working

Hiya,

I'm having trouble with a line chart refusing to show values as zero instead of blanks. I know many people on here have had similar issues, but none of the solutions seem to work on this one so I'd be super grateful if anyone can suss it out!

 

I've created some dummy data but can't upload the pbix file so please let me know if you need any additional info.

monthidperm_tempnewstarter
Jan-22id01perm 
Jan-22id02temp 
Jan-22id03permnew to org
Feb-22id01perm 
Feb-22id02temp 
Feb-22id03perm 
Feb-22id04tempnew to dep
Mar-22id01perm 
Mar-22id02temp 
Mar-22id03perm 
Mar-22id04temp 
Apr-22id01perm 
Apr-22id02temp 
Apr-22id03perm 
Apr-22id04temp 
Apr-22id05permnew to org
Apr-22id06tempnew to org
Apr-22id07permnew to dep
May-22id01perm 
May-22id02temp 
May-22id03perm 
May-22id04temp 
May-22id05perm 
May-22id06temp 
May-22id07perm 

*note that the empty cells in newstarter are null

 

I created a measure 'Starters' to plot the chart (as you can see, I already tried a number of variations and had a couple still commented out in there):

Starters =
VAR Result = count('Table'[newstarter])
//return Result
return Result+0
//return if(Result = blank(), 0, Result)
//return if(max('Table'[newstarter]) in values('Table'[newstarter]) , Result+0, blank())

What I want (sorry I forgot to erase the '(Blank)' line, but I should be able to just filter that out after anyway):
 
What I get ("return Result" vs. "return Result+0"):
 
On a side note, weirdly it works when using perm_temp as the legend instead, I imagine it's something to do with the nulls in the newstarter field but don't understand why ("return Result" vs. "return Result+0"):
(side, side note, I unintentially made the 'perm/temp' breakdown look the same as the 'new to org/dep' breakdown)
 
Thanks in advance!

4 Replies