Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I create a pie chart that counts the number of a type of field against a field that I've created from a mapping table?

I had two tables originally - one with all "Notifications" created and a table of all employee user names. I created a mapping table to determine which Notifications were created by the employees in my list.

AllNotifications:

LOAD

    Notification,

    Notif.date,

    "Notifictn type",

    Description,

    "Created on",

    "System status",

    "User status",

    "Functional Loc.",

    Equipment,

    "Changed on",

    "Created by" as [User Name],

    "Changed by",

    Coding,

    "Completn date",

    "Operations Centre",

    Township,

    "Req. start",

    "Order",

    "Main WorkCtr"

EmployeeNotifications:

LOAD

    "User Name",

    "Employee Name",

    "Building Code"

FROM [lib://1C Metrics/Employee ID Ops Centre.xlsx]

(ooxml, embedded labels, table is [Employee ID and Ops Centre]);

MapEmployeeNotifications:

MAPPING LOAD

   [User Name],

   'Yes'

RESIDENT EmployeeNotifications;

New_Table:

LOAD

   [User Name],

   ApplyMap('MapEmployeeNotifications',[User Name],'No') AS RaisedByField

RESIDENT AllNotifications;

I want to create a pie chart that counts the number of each type of Notification (Notifictn type) but ONLY for those Notifications that were created by the employees in my list (RaisedByField).

I've created a pie chart now:

Dimension=[Notifictn type]

Measure=count([Notifictn type])

But this includes all of the notifications from the first table, and not only the ones that were RaisedByField

I am able to get the result I want by adding a filter pane for "RaisedByField" and only selecting "Yes", but can I embed this into the pie chart somehow?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try this Set analysis in your expression;

count({<RaisedByField={'Yes'}>}[Notifictn type])

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Try this Set analysis in your expression;

count({<RaisedByField={'Yes'}>}[Notifictn type])