Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How would I go about Creating a pie-chart for a single column set of data.. I have two columns, one with items(Item), and another with values(price_changes) which are 0, or positive or negative. I need to create a pie chart with the sum of price changes that are 0, that are greater than 0 and price changes that are lesser than 0..
I am trying with these dimensions
=count({<Price_Changes={'=0'}>}Price_Changes)
=count({<Price_Changes={'>0'}>}Price_Changes)
=count({<Price_Changes={'<0'}>}Price_Changes)
and my Expression is Count(Item)
I keep getting an error.. Can anyone point me in the right direction?
I'm an absolute noob with qV.. Kindly be gentle.. ![]()
You're expressions in the dimension, whether or not correct, results in the values of Price_Changes, no matter what the if condition is. In the calculated dimension you want to group the Price Change values, something like:
=if(Price_Changes=0,'Zero',if(Price_Changes>0,'Positive',if(Price_Changes<0,'Negative')))
This will create three grouped values of price change named Zero,Positive and Negative
Hi,
You can use if condition.
=If(Price_Changes=0,Price_Changes)
=If(Price_Changes>0,Price_Changes)
=If(Price_Changes<0,Price_Changes)
You're expressions in the dimension, whether or not correct, results in the values of Price_Changes, no matter what the if condition is. In the calculated dimension you want to group the Price Change values, something like:
=if(Price_Changes=0,'Zero',if(Price_Changes>0,'Positive',if(Price_Changes<0,'Negative')))
This will create three grouped values of price change named Zero,Positive and Negative
Hi,
You can use below code. I think it is helpful to you.
In dimension,
=if(Price_Changes=0,Price_Changes,if(Price_Changes>0,Price_Changes,if(Price_Changes<0,Price_Changes)))
In expression,
Sum(Item) or Count(Item)
Thank you for explaining the logic behind it. I understand now. Thanks a ton!!
Thank you, your solution did give me a pie chart, but it listed the no. of items with respect to their price changes. I mean the actual value..
=if(Price_Changes=0,'Zero',if(Price_Changes>0,'Positive',if(Price_Changes<0,'Negative')))
^ This worked perfectly for me though. I still want to thank you for taking the time to help me. I appreciate it a lot.