2 Replies Latest reply on Nov 9, 2012 11:24 AM by Jason Back

# COUNTIF Visualization

Hello,

Please fine the attached file with simple data.

I am trying to create two graphs:

- what % of total stores have sales >=100 in 2012.

- what % of total store improved (>0% growth) their sales from 2011 to 2012.

It seems always easy in excel but still getting used to tableau formulas and features... I would apprecaite the help.  Thanks.

Jason

• ###### 1. Re: COUNTIF Visualization

For the Sales <100 or >=100, I created a Group based on Sales.

For the Percent Change, I created 3 formulas.  There is probably a more efficient way but this works...

//2012

If Year([Date]) = 2012 then [Sales] end

//2011

If Year([Date]) = 2011 then [Sales] end

//Percent Change

((Sum([2012])-Sum([2011]))/(Sum([2011])))*100

See attached Visualization.

Hillary

1 of 1 people found this helpful
• ###### 2. Re: COUNTIF Visualization

Thank you Hilary,

That solves my question to build a first graph.  Is there a way to create a graph for % of total stores that have improved sales in 2012 from 2011?

Grouping may be the answer like the way you did it for the first grapg but it seems that calculated results can't be grouped.  Thanks.

Jason