Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I've attached a sample dataset. The goal is to create a pie chart that visualises the proportion of IDs that were included in the plan versus those that weren't.
The pie chart should count the distinct occurrences of each ID. If an ID appears multiple times, either as "Yes" or "No," we should consider Yes because it was in the Plan.
For example, if ID A1234 appears once as "Yes" and once as "No," we should only count the "Yes" occurrence, ignoring the No occurrence. Similarly, if ID E1000 appears multiple times as "No," we should only count it once and it was not in the Plan
The primary objective is to determine the number of assets/IDs that were included in the maintenance plan, avoiding double-counting.
Appreciate your guidance on this, thanks.
Hi, you can just do a resident load using group by to have a table with one value by ID:
Grouped:
LOAD ID,
MaxString(IN_THE_PLAN_DIMENSION) as ID_IN_PLAN
Resident DataTable
Group By ID;
In the pie chart just use ID_IN_PLAN as dimension and "Count(ID_IN_PLAN)" as expression.
To make it work based on actual selections you can make a pie chart with:
- Dimension: =Aggr(MaxString(IN_THE_PLAN_DIMENSION),ID)
- Expression: Count(DISTINCT ID)
Hi, you can just do a resident load using group by to have a table with one value by ID:
Grouped:
LOAD ID,
MaxString(IN_THE_PLAN_DIMENSION) as ID_IN_PLAN
Resident DataTable
Group By ID;
In the pie chart just use ID_IN_PLAN as dimension and "Count(ID_IN_PLAN)" as expression.
To make it work based on actual selections you can make a pie chart with:
- Dimension: =Aggr(MaxString(IN_THE_PLAN_DIMENSION),ID)
- Expression: Count(DISTINCT ID)
Hi, Thanks for the help, it worked, cheers.