Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I make a If-function to generate a value in a kolom in the table. Now I want to count how many times value a is generated en how many value B is generated. For example I generated the modulo from how many a buyer buy (Sales) and how many of this item are in a box (Packages). When modulo is equal to zero than the value is a otherwise it will be value b.
item modulo
1 a
2 a
3 b
So i thought that I can use the next function: count (if(mod(Sales, Packages)=0, 'a', 'b')='a') or count (if(mod(Sales, Packages)=0, 'a', 'b')='B')
But it look's like he only count all the items, so he gives me the answer 3. Can you help me?
It looks like you might want to create a table or graph with modulo being the dimension and count(item) being the measure?
If this needs to be done script-side instead, perhaps:
Load modulo, count(item) as myCount
From YourTable
Group by modulo;