Worklog - Remove Null values

Hey team,

I have been looking for a report for worklogs and have found one as below:

Generate(
  Filter(
    [Worklog].[Worklog].Members,
    [Measures].[Hours spent] > 0
  ),
  [Worklog].CurrentMember.GetString('Comment'),
  Chr(10)
)

And it works, but I want it to not show “null” fields, only show worklogs with text in them.

Can this be done?

Thanks in advance.

Dave

Hi @David_Horne,

You might want to add one more filter criterion to check if there is any text in the comment before adding it to the list. Use function Len() to check on the text length:

Generate(
  Filter(
    [Worklog].[Worklog].Members,
    --check if there is a comment on the work log
    Len([Worklog].CurrentMember.GetString('Comment')) > 0 AND
    [Measures].[Hours spent] > 0
  ),
  [Worklog].CurrentMember.GetString('Comment'),
  chr(10)
)

Best,
Zane / support@eazyBI.com

1 Like

Hi @zane.baranovska Perfect, thanks so much for your help. :+1:

1 Like