Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So to put it in a simple way, there is an if and else condition that is based on 3 fields and three tags associated to it. The app and logic was working before, the code is shown as below.
The logic works fine when you have selected the filter (i.e Registration Number =0), otherwise it shows 0 value. I am not able to understand why its not working anymore and how to resolve it.
Num((Count((If(MY_AUDI_Vehicle_VIN=VIN,
(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))),
If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))))
))
))
Hi, if an expression (or field) has more than one possible value it returns null, so maybe registrationNumber_tag=0 or [Reg. No._tag]=0 can only be evaluated when there is a selection that reduces the multiple values of those fields to a single value that can be evaluated.
You can check this adding a text box for each field with the expression =registrationNumber_tag or =[Reg. No._tag] and check how it changes with selections.
Without knowing the intention of your expression or the model behind I think the option here is to enclose in an aggr that evaluates the different combinations of values, like:
Num(Sum(Aggr((Count((If(MY_AUDI_Vehicle_VIN=VIN,
(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))),
If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))))
))
),MY_AUDI_Vehicle_VIN,registrationNumber_tag,[Reg. No._tag])))
Hi, if an expression (or field) has more than one possible value it returns null, so maybe registrationNumber_tag=0 or [Reg. No._tag]=0 can only be evaluated when there is a selection that reduces the multiple values of those fields to a single value that can be evaluated.
You can check this adding a text box for each field with the expression =registrationNumber_tag or =[Reg. No._tag] and check how it changes with selections.
Without knowing the intention of your expression or the model behind I think the option here is to enclose in an aggr that evaluates the different combinations of values, like:
Num(Sum(Aggr((Count((If(MY_AUDI_Vehicle_VIN=VIN,
(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))),
If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,
if([Reg. No._tag]=0, [Reg. No.]))))
))
),MY_AUDI_Vehicle_VIN,registrationNumber_tag,[Reg. No._tag])))
Thanku Ruben, I got the issue, it was from the data's end and I tried it using the aggr function it kind of worked but made the dashboard heavier, I resolved it from the backend only. To reduce the data load.