Hello good people of Power Community.
It's getting late, and I have used way to much time allready, so hope someone can help me out.
Im looking for a clever way to count the number of reports and display it as a piechart
I have a category list with 4 categories (but it can be as many as the user like)
I have a report list with HSEQ reports that has one of the category listetd i Category list.
I tried as follow:
Clear(_dataResult);;
ClearCollect(
_dataKlassifiseringer;
LVL_HSEQ_Klassifisering
);;
ClearCollect(
_dataRapporter;
LVL_Kvalitet_Forbedring
);;
ForAll(
_dataKlassifiseringer;
Collect(
_dataResult;
{
ID:ID;
Title:Title;
Antall: CountIf(LVL_Kvalitet_Forbedring;klassifiseringsID=ID)
}
)
)
I have tried CountRows(Filter(....)), with same result, allways 1 for each item. The result is as follow:

Column 3 is the Antall from code above. Column 4 is coded in a textbox inside the gallery and give me the correct result I want, but its useless when its calculated inside the gallery. All these codes should run in the background onVisible or onStart and display a graph on the dashbord for the user.
Any help, tip or alternative methods is greatly appreciated.
Best Regards
Tommy