Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Using set analysis to limit some records, but I am having trouble including conditional logic.
The set analysis results in a 0 sometimes, I need this 0 to be replaced with a '-'. If I wrap an if statement around the set analysis I can no longer limit the records, because the set analysis is ignored. How do I replace 0 with '-' in a chart and use set analysis?
You can use something like below
IF(YourExpression = 0,'-',YourExpression)
doesn't work because the if will return something on every record and we need the set analysis to be respected
You need to provide more details if you think this isn't going to work. Because from the looks of it, I think it should work, but you might be right. Before you provide more details it would be hard to troubleshoot.
Best,
Sunny
yes, something more complex must be going on ... in my simple examples it does seem to work:
if(
flag = 0,
'-',
sum({<flag={1}>}data)
)
Let me put together my exact example.
Try
if(sum({<flag={1}>}data) = 0,'-',sum({<flag={1}>}data))