Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using =Count (DISTINCT IncidentID) > 0, 'True', 'False') to find the status of it.but I need to set it as Dimension filter to make the selections.
Thanks in advance.
If you need to evaluate for another dimension whether IncidentIDs exist, you can use
=Aggr(If(Count(DISTINCT IncidentID) > 0, 'True', 'False'), YourDimension)
to apply a filter to your dimension for all values that do or don't have IncidentIDs.
Like this
=If(Aggr(Count(DISTINCT IncidentID), IncidentID) > 0, 'True', 'False')
If you need to evaluate for another dimension whether IncidentIDs exist, you can use
=Aggr(If(Count(DISTINCT IncidentID) > 0, 'True', 'False'), YourDimension)
to apply a filter to your dimension for all values that do or don't have IncidentIDs.
Hi @Raju_6952
Aggr works for this, but for performance you really want to do this in the load script.
If you just add a new field to the load of your Incident table you can have a filter with just yes:
Incident:
LOAD
IncidentID,
'Yes' as [Has Incident],
If you need to know if a particular site has an incident or not, and you want to have Yes/No filters you can do this with an ApplyMap statement. Assuming you have loaded an Incident table, which has ClientID, ahead of your Site table:
Map_HasIncident:
MAPPING LOAD DISTINCT
ClientID,
'Yes' as Incident
RESIDENT Incident;
Site:
LOAD
SiteID,
ApplyMap('Map_HasIncident', SiteID, 'No') as [Site Has Incident],
Your users will thank you for pre-calculating this in the load, rather than having to evaluate it at run time for a filter pane.
Hope that helps,
Steve
Hi,
=Aggr(If(Count(DISTINCT IncidentID) > 0, 'True', 'False'), YourDimension)
The above formula is working. Thanks for the replies.
Kind regards,
Raju