So I have two tables (Sharepoint lists)
One uses a lookup from the other.
I have two galleries displaying them, basic set up is top gallery consists of Customers, lower gallery Customer orders.
What I'm trying to achieve is I want to do with AddColumns a calculation that gives me the percentage of items in the order delivered.
The idea with this to count the rows in Customer Order Based on the Customer ID, where status is "Levererad"(delivered), exclude Articles that contains "Behöver" divide those by the number of articles in the customer order that doesn't contain "Behöver" or that doesn't contain "Makulerad" in the field Status.
This is the item property in the gallery
AddColumns(
Huvudorder,
"PR",
RoundDown(
CountRows(
Filter(
Artikel_Order,
Artikel_Order[@Status] = "Levererad" && Anställd.Id = Huvudorder[@ID] && (IsMatch(
Artikel.Value,
"Behöver",
Contains
) = false)
)
) / CountRows(
Filter(
Artikel_Order,
Anställd.Id = Huvudorder[@ID] && (IsMatch(
Artikel.Value,
"Behöver",
Contains
) = false) && (IsMatch(
Status,
"Makulerad",
Contains
) = false)
)
) * 100,
0
)
)
If I change the / to either a +,- or * it works. But the / just leaves me with a blank gallery.
If I skip the AddColumns Part and inject the same formula into a TextLabel in the gallery it works.
Any idea on why this just won't work?