Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Is it possible to display N for null values in a dimension?
I have a field(List) with Y and null values, on the front end I'd like to display the null values as N in a straight table, the expression if(IsNull(List),'N',List) works correctly when used as a measure however I need the column to be a dimension to allow users select values.
Any thoughts?
Thanks
May be this:
If(Len(Trim(List)) = 0, 'N', List)
Thanks Sunny, I tried your suggestion and the null still displays as null
Hi Ugonna,
I am attaching a sample application for you , this will solve your purpose.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
Rohit Kumar
Hi Ugonna,
Please add Calculated Dimension in your Dimension.
=If(len(Dimension)=0,'Null',Dimension)
Example:
=If(len(List)=0,'Null',List)
Table:
Hi Rohit,
I'm trying to implement your solution but it doesn't work with my data model, here's a bit more detail on what my data looks like;
table 1
ID , Name
A, Apple
B, Banana
C, Car
D, Doll
E, Egg
table 2
ID , List
A, Y
D, Y
Now, I need to create a table with fields Name and List, displaying N when List is null.
thank!
Hi Nikhil, thanks for your suggestion.
It appears these expressions only work in QS when used as a measure, and I need the field to be a dimension to allow for user selections.
Hi Nikhil,
Please create a new application and go to script editor and paste the below code :
table1:
load
*
inline
[
ID , Name
A, Apple
B, Banana
C, Car
D, Doll
E, Egg
];
table2:
load
ID,
If(Len(Trim(List)) = 0, 'N', List) as List
inline
[
ID , List
A, Y
D, Y
C ,
];
Now go to app overview and select drag and drop two column , ID and List and let me know if still you need anything