IFS/IF expression for list result does not work

I’m trying to create custom report with some expression to let the list callback from some tables but unfortunately the list does not work when its wrapped by IF/IFS

my form script like this:

Expression 1: opt1/opt2/opt3
result =>
wrapping expression:
ifs(
expression1 = opt1,
select(table1[col], condition),
expression1 = opt2,
select(table2[col], condition),

)
You can see the list result in report revReport_fixDate section. I’m sure that I have data in the table what I select and the condition of select formular is work already when I move it out of IF/IFS wrapper

Im trying to do this because I dont want to expand alot of virtual column in this table. I have 4 - 6 tables to create custom reports, it will spend alot of times

0 5 224
5 REPLIES 5

Bit of a guess, but try enclosing it in LIST() and see if that works. If not, post the actual formula and describe what the relevant colmuns are for

It’s not work, brother

Here is my actual formula:

    IF(
	[report_type] = "Doanh thu", 
	SELECT(
		revenue_log[sapo_code],
		AND(
			DATE([report_date]) >= DATE([from_date]), 
			DATE([report_date]) <= DATE([to_date]) 
		)
	),
	LIST("")
)

This is my result:

If i use standalone select formular (without IF/IFS wrapper), revReport_customDate printed the list.

SELECT(
		revenue_log[sapo_code],
		AND(
			DATE([report_date]) >= DATE([from_date]), 
			DATE([report_date]) <= DATE([to_date]) 
		)
	)

Try

IF(
[report_type] = “Doanh thu”,
SELECT(
revenue_log[sapo_code],
AND(
DATE([report_date]) >= DATE([from_date]),
DATE([report_date]) <= DATE([to_date])
)),
“”
)

or

IFS(
[report_type] = “Doanh thu”,
SELECT(
revenue_log[sapo_code],
AND(
DATE([report_date]) >= DATE([from_date]),
DATE([report_date]) <= DATE([to_date])
)))

Also check that [report_type] does equal “Doanh thu”

What I’d do is to create a virtual column with an App Formula of [report_type] = “Doanh thu” The result Sshould be TRUE or Y. If its not, thats your issue

I resolved my case due to using Filter inside IF/IFS. It’s worked already.

Thanks alot bro

Top Labels in this Space