Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
Senario:
I have year filter in app. I have a chart in which expressions I have coded as follows:
count({<Year={"$(=GetFieldSelections(Year))"} >}id)
.Problem:
if any selection is made in year filter which is in app(outside the chart), then the expression is fine. else it shows nothing as year will get assigned to null. But it should get assigned to *
is there any way to write using set intersection or any way without using if block in side chart?
Maybe like
=count({<Year1 = {"$(=If(GetSelectedCount(Year2), Concat(DISTINCT Year2, ','), '*' ))"} >} id)
[
If your Year2 value set is smaller than Year1 set, but you want all Year1 values in case of no Year2 selection.
Otherwise, the p() function as shown by Sunny should do it, too.
]
yes, fields are different say as below:
Yearpole={"$(=GetFieldSelections(Year)
yearpole is field and year is another field.
year is filter outside the chart whose selected value must be assigned to yearpole.
if no selection is made for year it is taking null. but it should take * i.e . all values. can u tell me the way without using if block as it increases load.
fields are different say as below:
Yearpole={"$(=GetFieldSelections(Year)
yearpole is field and year is another field.
year is filter outside the chart whose selected value must be assigned to yearpole.
if no selection is made for year it is taking null. but it should take * i.e . all values. can u tell me the way without using if block as it increases load.