Here is my problem. I have crystal 12.1 connected to an access database. I would like to create a crosstab to compare current year sales with prior year. I was able to create the initial cross tab, but I cannot figure out how to add the year(s) under the store name. Here is what I would like it too look like. (CY is current year, PY is prior year)
Store 1 Store2 Store3 ...
---------- --------- --------
CY PY CY PY CY PY
Toys 2 3 4 3 7 7
Clothes 1 4 3 8 8 2
Shoes 2 2 4 5 6 9
I have the store name and CY salses in the crosstab now. I have no idea how to add the the PY header and values. My crosstab has the Store in the columns and the summarized fields have the Toys, Clothes, Shoes, etc values.
Simply add your date field into the columns area of the cross-tab expert (below the store field).
The highlight and click group options, set it to group on year.
Related
I have to pick the highest value from col 2 in relation col 1 using Tableau. The data is as follows
col 1 col 2
category 1 5
category 2 6
category 1 4
category 1 3
category 2 10
category 1 1
category 2 3
The desired solution is
col 1 col 2
category 1 5
category 2 10
I tried using the fixed aong with max function but in this case it outputs boolean value which I do not need. Could someone help me!
Thank you
Drag col 1 in the rows shelf.
Double click col 2.
Right-Click col 2 --> measure --> Maximum
(Eventually) Drag Max(col 2) from row shel to Text Mark
EDIT
See the screenshot as an example.
[To be noted that you can achieve this simple result with differnt ways/clicks]
BTW: are you familiar with dimensions and measures? it seems to me that you may need some basics training/study in order to get familiar with Tableau basics.
You may start from here: https://www.tableau.com/en-gb/learn/training/20212
Given a table with data like:
A
B
Qty.
Running Total
5
5
5
10
5
15
I can create the running total using the formula =SUM($A$2:A2) and then drag down to get the running total after each quantity (here Qty.)
What may I do for calculating running total using two columns which may or may not be consecutive as shown below:
A
B
C
D
Qty. 1
Other
Qty. 2
RT
2
blah
2
4
2
phew
2
8
3
xyz
2
13
Place in cell D2 the formula =SUM(A2,C2,D1). Do not pay attention to the fact that the function will refer to a non-numeric cell D1 - the SUM() function will not break, unlike ordinary addition =A2+C2+D1. Now, just stretch the formula down.
I am new to tableau and need help in figuring this out.I have a dataset in below format:
hid:id for the house the customer belong
cid:customer id
hID CustomerID
1 A
1 B
1 C
2 D
2 E
3 F
3 G
3 H
3 I
4 J
5 K
5 L
5 M
5 N
5 O
So A,B belong to house 1 so count of hid '1' is 3 so:
hid count of members
1 3
2 2
3 3
4 1
5 5
I want to show a graph in tableau as size of house that is X-axis :Size of house and Y-axis :Count no of house with same size so for above data the values as below:
Size of house no of house
1 1
2 1
3 2
4 0
5 1
The final graph should be:
In Tableau jargon, you're looking to bin based upon an aggregate value. Take a look at the following blog post for a more detailed description/walk-through.
One way to accomplish this is by leveraging talbeau's level of detail calculations. Creating a calculated field along the lines of:
{FIXED [hID] : COUNTD([CustomerID])}
You can then create a bin field by right clicking on the new field and binning based on a parameter, or a a static size (1?) of your choosing.
To create the visual, place this second bin field on the row shelf and on the column shelf drag the hID dimension and right click to convert to a measure by selecting Count Distinct.
As a side note, depending on whether you set your bin field as continuous or discrete, the 4 bin in your sample data will or will not appear.
I am using a Crystal crosstab. My rows are lab results and my columns are dates. I am sorting the dates in descending order so that the most current dates are listed first. I know I can use the TopN formula for rows to limit to a certain number of rows but I need to limit it to a certain number of columns preferably 10. In the example below I would not want to show anything after 10/10/11.
10/1/12 9/3/12 7/16/12 5/8/12 4/22/12 3/17/12 1/9/12 12/3/11 11/15/11 10/10/11 9/23/11 8/18/11 7/7/11 6/8/11
Calcium 8.5 9 9.1 9 8.9 8.9 9 9 9 9 9 9 8.9 9
Vitamin D 45 45 51 49 56 50 51 55 60 66 60 59 60 61
Any guidance would be greatly appreciated.
Thanks
Jill
I think the cross tab can only limit columns if the names are specified which will not be possible with dates.
There are two possible work arounds I can think of:
1 - limit via the query:
Go to Report > Select Expert > Record and select the date field, click formula then add this formula (for 10/10/2011):
{Mytable.DateField} < Date (2011, 10, 10)
or for a dynamic date (older than 1 year):
{Mytable.DateField} < DateAdd ("yyyy", -1, CurrentDate)
2 - The other option is to create cross-tab as a standard report, this means the dates will be vertical rather than horizontal.
You can add a group to the report by date then add values for each type as summaries, let me know if you prefer this and I can explain in more detail.
i am working with crystal report 2008
in crosstab I have:
A aa 1
bb 2
cc 0
dd 1
**Total** 4
B tt 0
yy 1
hh 0
jj 1
**Total** 2
Where A and B are 1st group by data, aa, bb, cc....are 2nd group by data.1,2...are summary values.Total is column total below the 2nd group by.
I want the Total field to be as A Total and B Total...
Can anyone plz help me out from this.
thanks in advance
I think the only way to do this is with a calculated member row.
But this gets very complex as you need to hide the totals, and a calculated member by default is listed as a total so you will need a calculated member for each level of the groups.
This Link give some useful information.