I have a dataset that looks like this:
ID | Property | Status |
1 | red | A |
2 | blue | A |
3 | yellow | B |
4 | red | C |
5 | blue | D |
6 | yellow | D |
I want to count the number of rows that contains either A, B or C and show that count in my app.
CountIf(dataset; Status = "A" || Status = "B" || Status = "C")
I have tried this and a number of variations, but nothing works. This formula tells me CountIf is not supported by this connection.
So it turned out that the problem was related to the fact that the column was a text type. I changed it to a Choice type, and added .Value to my data column, like so:
CountIf(Dataset; Status.Value = "A" || Status.Value = "B" || Status.Value = "C")
@ErikKjellman , If CountIf and CountRows not working then could you try the Sum function as mentioned below?
Sum(
dataset,
If(
Status = "A" || Status = "B" || Status = "C",
1,
0
)
)
It is the same problem, it says that this connection does not support CountRows
Forgot to mention that my dataset is a sharpoint list. I get an error saying it expects 1 argument, not two. If I remove the second argument it counts my rows, but I need them filtered.
Can you try the below statement?
CountRows(Filter(MyDataset, MyColumn = "A" || MyColumn = "B" || MyColumn = "C"))
Hi @ErikKjellman ,
You can try the following code:
CountRows(
<DataSource>,
Status = "A" || Status = "B" || Status = "C"
)
Hope this helps
WarrenBelz
146,594
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional