How to create an Dependent measure in Tableau? - tableau-api

I have 2 reports displaying data as
Filter Partner Name (Applies only to Report1)
Report 1:
Country Name : XXX
Members Count:1500
Report 2:
Partner name : XYZ
Members Count:1203
On applying filter only to Report 1 : Member count changes
now how can i show the data on Report 2 for the Members Count displayed on Report 1?
Report 2 should have members count that is displayed on Report 1 only
What i'm looking is like a dynamic Count(ID) in Report 2 that changes every time there is a change in Count(ID) of Report 1
on Applying Filter to Report 1
On clicking on bar like above the Data in Report 2 must display only for the (72 members) as Shown Below
How to do this in Tableau 8?

Don't understand, why can't you just apply Partner Name filter to both reports (right click, apply to worksheets,...)?
That way both reports will only display data for the selected partners. You can even build a dashboard with both reports side by side, an put a quick filter so you can select the partners you want to show, and apply the filter to both sheets at the same time.
If this does not work, I'm going to need a little more detail of what you're trying to do, how your database is organized, and how you built the sheets.

Related

Changing Group Count By Adding Fields in Crystal Reports

New but learning!. Using Crystal Reports for this task
I am trying to do a complicated report but I am breaking it down to some manageable questions piece by piece. I have a table for Work orders. I need to start my report by listing all the different departments with in the Work Order Table whit a count of how many work orders by department .. then for each Department a sub report of the different status of Work Orders and count. It seems simple but i keep on getting a count of 1.
What I have done:
Started a new report
Added in WOCATEGORY (Departments)
-selected that field and chose the sigma button to
sum that field
Added a sub report
- addded in WOCATEGORY
- added in STATUS
- chose Select Expert and chose {Status} =
"Closed"
- Chose STATUS and selected that field and chose
the sigma button to sum that field
Added a sub report
- addded in WOCATEGORY
- added in STATUS
- chose Select Expert and chose {Status} =
"OPEN"
- Chose STATUS and selected that field and chose
the sigma button to sum that field
What i end up with is list of all my departments with no count, status of closed with not count and a status of open whit a count of 1?
I need to list all the differet types of Work Orders not just open and closed as well...?
Thanks for you help!
liked are a few photos that might help describe what is above.
Preview
Design
This is what worked for me with some help..
the insert summary button (Sigma button) and
pick the field as WorkerID
Type as DistinctCount
location = Group 1 (repeat for group 2).
This will insert a summary field into each group footer that you select. You can drag it into the header group header.

Merge data inside group Crystal Reports

I have a Crystal Report setup in my WPF Application. The report is grouping data based on VENDOR NAME field as shown in attached image. Now what i want is to show data inside a group only once.
I mean as in first group TOYOTA HOUSE the Vendor name is repeating although other column values are different. i want is under this group just show this record once and for other columns ADD/sum their values and show. I know i can do that in SQL query but can i do this in crystal report ?
Instead of showing in the details section add it to the group footer section.
suppress details section
and add totals in group footer

Crystal reports - Can't filter on custom formula number field

Crystal reports don't let me use a custom count formula field to filter which transactions to show in a manager report.
I'm creating a Crystal report that team leaders are supposed to take out to see on how many occasions their employees have reported in sick. A record is only supposed to show if that person has reported in sick 6 or more times the last 12 months.
The report shows a record (a page) for each employee belonging to the managers organisational unit. Below the employee information is a subreport where I show the transactions from the salary/time system. Using select expert, I have filtered out the transactions that is supposed to show. I have then created a database field that count which day was 12 months back from today, and filtered so that only the transactions falling into this period shows.
My last problem is that I only want to show the record that has a minimum of 6 such transactions during the period. I created a formula field named #Antal ("amount" in Swedish) that simply counts the distinct number of dates in the "from"-date for the salary transactions I'm showing (since a change of law 2019-01-01 we needed to create a new transaction type, so some of the occasions after 2019 may have two transactions referring to one sick leave, thus I'm counting the first day of the period instead), DistinctCount ({P_LSTAT.P_SXXX06})
Now, the subreport has a new column with Antal (amount) that counts the amount of the desired salary transaction. I then try to use the selection formula to only show records where {#Antal} >= 6 but I get the following error:
This formula cannot be used because it must be evaluated later
Is there any other (better) way of doing this, or am I simply missing something?
For your selection based on {#Antal} >= 6 you need to use the group selection formula, not the record selection formula. Record selection is used to select records which meet the criteria before reading in the data. Group selection is used to filter out entire groups of records based on summarised values, after the records have been read in and the summaries calculated - which sounds like exactly what you need here.
The value of a Formula Field is out of scope when the Select Expert is evaluated.
There is no process for calculating the value of a Formula Field before it is printed within the section of the report it is placed. The Select Expert is evaluated prior to any section of the report being printed, so at this time all Formula Fields are effectively Nothing.

How to get individual group totals in report

I have a jasper report being made with iReport, which is basically a list of pages received the day prior. The report has total pages for the whole day and then individual totals for each group of page types.
The requirements state I need to display all the totals above the listed records and groups (ex. display in the title band). I created a variable for the total of all pages and that works but am having trouble getting each individual group total.
It should look like:
Total pages received: 50
Total GROUP_A: 20 Total GROUP_B: 30
When I try to use the variable set up for group totals, it only gives me the last used group, so it would say 30. I'm unsure how to create a variable to get the total for only a specific group.
I could include in my SQL result set the totals but was asked to do it within iReport.
If I understand the problem right you need to put a copy of the variable that you are using in the group and put it in your title band. the trick is on the object in the title band make sure you have set the evaluation time & evaluation group group or report depending on what you are truing to get a total of.

Crystal Report-Running Total

I have a problem with running Total in Crsystal report9
if their is no values available for a Paticular field how can we return the running total as '0'
Instead of display the Running Total directly in your report create a Formula Field based on the Running Total and drag it into the report.
Your formula should look like this (Crystal Syntax)...
if ISNULL({#RunningTotalField}) then
"0.00"
else
ToText(RunningTotalField, 2)
If there is no data for that particular group, then Crystal won't show it easily. Your options are :
1) Use subreports to display the values for a particular group, and keep the main report just looking at the table(s) containing the group headers.
2) Use a stored procedure as the source so you have full control over the SQL that is run.
The problem is that as soon as you use a field to group, Crystal will only return records where that field has been used. If it was simply in the Details section you could modify the link to a LEFT JOIN and it wouldn't matter, but the group forces the INNER JOIN which means the groups without data are not returned.
Unfortunately Running Totals don't show up if there are no records that match your criteria. An alternative is to use a set of formulas calculated in various sections of the report. The technique is widely described in the Crystal literature. For example, this TekTips gives a very succinct overview of your options.
You set up an initialising formula in each header, with the evaluation time directive "WhilePrintingRecords". This approach was the only one available for doing running totals in the "good ol' days" before RunningTotal objects were available.