Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have used the following script to load a new variable called "RaisedByField" to indicate whether or not certain employees raised Notifications
AllNotifications:
LOAD
"Created by" as [User Name],
"Changed by",
"Completn date"
EmployeeNotifications:
LOAD
"User Name",
"Employee Name",
"Building Code"
MapEmployeeNotifications:
MAPPING LOAD
[User Name],
'1'
RESIDENT EmployeeNotifications;
New_Table:
LOAD
[User Name],
ApplyMap('MapEmployeeNotifications',[User Name],'0') AS RaisedByField
RESIDENT AllNotifications;
When I do a manual count of the Notifications raised by employees from the "EmployeeNotifications" table I get 9
When I use the expression: count ({<RaisedByField={'1'}>}[User Name]) or count ({<RaisedByField={'1'}>}[RaisedByField]) I get 10
Why is the mapping load not working properly? The count should be 9.
try
count (distinct {<RaisedByField={'1'}>}[RaisedByField])
When I do that I get a count of 1
Share your app with sample data