Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following table below:
Month | Class | Fruits |
---|---|---|
JUN | 2 | Apple |
JUN | 4 | Orange |
JUN | 6 | Banana |
JUN | 2 | Pear |
JUN | 4 | Pear |
I want to make a table that shows as below:
Month | Total Fruits that is Class 2 and 4 |
---|---|
JUN | 3 |
hi
you can use
count({<Class={"2,4"}>}distinct Fruits)
Try this, If this is in script
Table:
Load * From Table;
Final:
Load Month, Count(Fruits) as [Total Fruits that is 2 and 4] Resident Table Where Match(Class, 2,4) Group By Month;
If Design, you may try like below?
count({<Class={"2,4"}>} Fruits)
Or
Count(If(Match(Class, '2','4'), Fruits))
I got invalid dimension
Add it as a measure
I got it working now. Thanks!