
Hello everyone,
I'm currently building a risk matrix and trying to filter it based on probability of occurrence and impact. My gallery looks like this:
In the Items property I have the following:
Distinct(Risikobewertung;Projekt)
I determine the numbers in the respective text property as follows:
CountRows(Filter(Risikobewertung;Eintrittswahrscheinlichkeit * Schadensauswirkung <=4)) (for example)
Now I want the gallery to just show the number of each risk category, sorted by project. For example, project A has 1 green, 1 yellow and 1 red risk. The other projects have no green risk, etc. It currently shows the total number of risk categories found in all columns.
How can I filter this please?
Thanks in advance and greetings!
I'm not sure I fully understand, but I'd use a Collection to work out the values, and then use that as the .Items, something like ClearCollect(colRisk,AddColumns (GroupBy (Risikobewertung, "Projekt", "Grouped"), "CountRiskCategory", CountRows (Distinct (Grouped, "RiskCategory"))))
This may not be quite right, but the key is to use GroupBy to aggregate. Using a Collection can also make it easier to diagnose the problem. Then set your Gallery.Items to colRisk.