A little help please. I have set up a CSV export and everything seems fine - except the output file has headers only (no row content). The export is against a Slice "User_filtered_OSM_data". I have included screenshots of the slice expression, as I've seen this to be an issue for others. The slice returns data as expected in the UI, but the CSV is stubbornly empty.
Suggestions and pointers gratefully received.
Solved! Go to Solution.
If [column] is a List, then table[column] returns a List of Lists. This causes issues in several situations.
To flatten a List of Lists, do this:
SPLIT( TEXT( table[column] ) , ' , ' )
Is the view within a dashboard view?
No, it's on it's own.
FYI: I have created a new version of the view to try and pin down the problem. I have rewritten the Row Filter Condition. The issue persists: header only CSV files.
The updated Row Filter Condition is:
if(
isnotblank(FiltersForCurrentUser[F_group]),
AND(
OR(
in([v_1st_nearest], FiltersForCurrentUser[F_group]),
in([v_2nd_nearest], FiltersForCurrentUser[F_group]),
in([v_3rd_nearest], FiltersForCurrentUser[F_group])
),
in([v_section], FiltersForCurrentUser[F_section])
),
FALSE
)
Investigating further, I think I've located where the problem is occurring - in the slice Row Filter Condition statement, still not sure what's wrong though:
in([v_section], FiltersForCurrentUser[F_section])
In the UI preview/live view this appears to work as expected:
the FilterForCurrentUser slice reports the following result at run time;
Looking at v_section this is a virtual column calculated as below. It appears to be working as expected, returning a single result for each row.
if([v_decimal_age]<4,"Too young",
if([v_decimal_age]<5.75,"Squirrels",
if([v_decimal_age]<7.5,"Beavers",
if([v_decimal_age]<10,"Cubs",
if([v_decimal_age]<14,"Scouts",
if([v_decimal_age]<17.5,"Explorers",
if([v_decimal_age]<25,"Network","Adult")
)
)
)
)
)
)
v_section is type TEXT
F_section is type ENUMLIST
...could that be the issue? Nothing is flagged by the expression designer.
I don't understand why, but after a lot of trial and error, the following expression solves for my situation:
AND(
CONTAINS(FiltersForCurrentUser[F_section],[v_section]),
OR(
in([v_1st_nearest], FiltersForCurrentUser[F_group]),
in([v_2nd_nearest], FiltersForCurrentUser[F_group]),
in([v_3rd_nearest], FiltersForCurrentUser[F_group])
)
)
It seems that in the situation where F_section is an EnumList {"Beavers","Cubs"} the IN() doesn't behave as I would have expected.
If [column] is a List, then table[column] returns a List of Lists. This causes issues in several situations.
To flatten a List of Lists, do this:
SPLIT( TEXT( table[column] ) , ' , ' )
User | Count |
---|---|
36 | |
32 | |
30 | |
18 | |
16 |