Creating a parameter filter to pick out consecutive data (Tableau Desktop) - tableau-api

I have a data set as following:
week number
date
item
location
Out of stock %
23
2022-06-05
apple
Seattle
55%
23
2022-06-06
apple
Seattle
60%
23
2022-06-07
apple
Seattle
50%
23
2022-06-08
apple
Seattle
50%
23
2022-06-09
apple
Seattle
50%
23
2022-06-10
apple
Seattle
50%
23
2022-06-11
apple
Seattle
60%
23
2022-06-06
orange
California
10%
23
2022-06-07
orange
California
5%
23
2022-06-08
orange
California
5%
23
2022-06-09
orange
California
30%
23
2022-06-06
orange
California
20%
23
2022-06-07
orange
California
10%
23
2022-06-08
orange
California
2%
My desired output is to have an Out of stock filter for the viewers so that when they enter a certain value, it returns a list of a certain week in which the out of stock is no lesser than the certain value.
For example, if I enter 40% in the filter, then apple at Seattle would only show up.
This apple would be then marked as continuously out of stock. Please help me!

Related

Is there a way to apply week-over-week growth rates from prior year to current year data in Tableau?

I have a Dataset in Tableau with fields: Date, City, Sales. The data is for all days of 2022
I created Week - over - Week growth rates for 2022. My worksheet look like this:
Iso-Year (Date)
Iso Week (Date)
City
SUM(Sales)
2022 Growth %
2022
W01
New York
2500
0
2022
W01
Boston
400
0
2022
W01
Minnesota
1300
0
2022
W02
New York
2600
4%
2022
W02
Boston
200
-50%
2022
W02
Minnesota
1340
3.07%
2022
W03
New York
2400
-7.69%
2022
W03
Boston
800
200%
2022
W03
Minnesota
1200
-10.44%
The calculated field I used to get 2022 W-o-W growth %:
(SUM([Sales]) - LOOKUP(SUM([SALES]),-1)) / SUM([Sales])
I want to use the 2022 growth rate for a specific City and Iso-Week combination to the same City and Iso-week combination for 2023. As an example,
New York grew by 4% from W01 to W02 of 2022, so I'm looking to apply the same 4% to calculate Sales in W02 of 2023 (W01 2023 Sales * 1.04) and so on. Like this, I want to apply growth rates for those week and city combination of 2022 to calculate Sales for all future weeks of 2023. I already have my W01 2023 data to start with.
Iso-Year (Date)
Iso Week (Date)
City
SUM(Sales)*Growth
New Sales
2023
W01
New York
4000
4000
2023
W02
New York
4000*(1+4%)
4160
2023
W03
New York
4160*(1-7.69%)
3840
I cannot find a way to do this with my dataset. I cannot use FIXED function because I've used a table calculation in my calculated field for growth rate.
My struggle is that I'm using a Dataset provided to me by my organization and cannot modify the table logic. After I created the calculated field, I cannot use the 2022 growth % if I have 2023 data filtered in.
I have an option to create a custom data source but I do not think that the effort is worth for this.
Does anyone have an idea to make this possible?
I can provide more information if the description is not clear enough. Thanks a lot!

Hello, I'd like to know how to compare a list of values with another list of values useing Tableau?

For example: GPC_germany x GDP anycountry and both are in the same column.
What I have:
2000 germany 1%
2001 germany 2%
2002 germany 3%
2000 austria 0%
2001 austria 0%
2002 austria 5%
2000 poland 2%
2001 poland -1%
2002 poland 2%
...
select country: germany
What I want:
YEAR COUNTY GDP GDP-selected country
2000 germany 1% 0%
2001 germany 2% 0%
2002 germany 3% 0%
2000 austria 0% -1%
2001 austria 0% -2%
2002 austria 5% 2%
2000 poland 2% 1%
2001 poland -1% -3%
2002 poland 2% -1%
I know I can create a paramether os a calculated variable, but I dont know exactly how to do.

How can I create a pie chart using only the value of a cell, based on certain criteria?

I am trying to make a pie chart that consists of the actual value (%) in a given cell, which will be selected by some filters.
I have a data set that consists of an employee per row, with several metrics in each column.
Filters:
First filter on employee: person_1
Second filter on wk_no: 01
and I would like to return that value for metric x_5 >> so I want to have a pie-chart that is divided in a 65%-slice and also in a 35%-slice...
I have added an extra column: x_8 = 100%-x_5; but still haven't figured it out...
Data table:
employee
emp_no
wk_no
x_1
x_2
x_3
x_4
x_5
x_6
x_7
person_1
51926
01
152
4%
90
35
65%
8%
56%
person_2
53260
01
143
17%
22
86
39%
46%
39%
person_3
55138
01
244
30%
204
236
64%
46%
71%
person_4
56884
01
446
23%
142
301
61%
24%
41%
person_5
52484
01
150
16%
31
77
55%
70%
94%
Files:
datastudio report
dataset sheet
You can make a Lighthouse Gauge chart, see Community visualizations.

Group Mulitple Rows into 1 email in mail merge

I have to send an email out to all the team managers of my company providing the individual stats for each member of their team. Unfortunately I am not very well acquainted with mail merge and have been running into multiple knowledge gaps. I was hoping somebody here could help me understand how I can do this. If the sample data looks like this:
TM Email
Employee Name
Call Goal
Actual
% Goal Met
# of Audits
Accuracy
email1#fakeemail.com
John Doe
100
50
50%
4
92%
email1#fakeemail.com
Jane Doe
100
50
50%
4
92%
email1#fakeemail.com
Eric Stultz
100
50
50%
4
92%
email1#fakeemail.com
Christian Noname
100
50
50%
4
92%
email1#fakeemail.com
Fakename Mcgee
100
50
50%
4
92%
email1#fakeemail.com
senor chapo
100
50
50%
4
92%
email2#mail.com
Duck Werthington
100
50
50%
4
92%
email2#mail.com
Myster Eeman
100
50
50%
4
92%
email2#mail.com
Ion No
100
50
50%
4
92%
email2#mail.com
No Idea
100
50
50%
4
92%
email2#mail.com
Mail Man
100
50
50%
4
92%
Assume that there are over 2 dozen Team Managers with varying team sizes. and the email will be sent in the same format as listed above. How would I go about this, I don't even know where to begin. Please help.

Creating a column to correctly group by effort

I'm trying to create a column to correctly label changes in effort by Estimator.
I've been able to get close using the below code with DENSE_RANK() function, but it's not quite what I'm looking for. I'm having trouble identifying the start and end points to organize by. I've include the current and desired output below.
Current Code:
SELECT *,
DENSE_RANK() OVER (ORDER BY Estimator, Effort) AS Group
FROM #Estimating_with_Breakpoints
ORDER BY Estimator, Date, DateType
Current output:
Job Name DateType Date Effort Group
Hidden Lakes Apartments Start 3/8/2017 50 6
Hidden Lakes Apartments Breakpoint 4/13/2017 50 6
Hidden Lakes Apartments Finish 4/13/2017 0 4
Dr. Biggs Joint Institute Breakpoint 5/1/2017 0 4
Dr. Biggs Joint Institute Start 5/1/2017 33 5
Bonita Springs Library Breakpoint 5/22/2017 33 5
North Ft. Myers Library Breakpoint 5/22/2017 83 7
Bonita Springs Library Start 5/22/2017 83 7
North Ft. Myers Library Start 5/22/2017 133 9
Dr. Biggs Joint Institute Breakpoint 6/5/2017 133 9
Dr. Biggs Joint Institute Finish 6/5/2017 100 8
Bonita Springs Library Breakpoint 6/19/2017 100 8
North Ft. Myers Library Breakpoint 6/19/2017 50 6
Bonita Springs Library Finish 6/19/2017 50 6
North Ft. Myers Library Finish 6/19/2017 0 4
Desired output:
Job Name DateType Date Effort Group
Hidden Lakes Apartments Start 3/8/2017 50 1
Hidden Lakes Apartments Breakpoint 4/13/2017 50 1
Hidden Lakes Apartments Finish 4/13/2017 0 2
Dr. Biggs Joint Institute Breakpoint 5/1/2017 0 2
Dr. Biggs Joint Institute Start 5/1/2017 33 3
Bonita Springs Library Breakpoint 5/22/2017 33 3
North Ft. Myers Library Breakpoint 5/22/2017 83 3
Bonita Springs Library Start 5/22/2017 83 3
North Ft. Myers Library Start 5/22/2017 133 4
Dr. Biggs Joint Institute Breakpoint 6/5/2017 133 4
Dr. Biggs Joint Institute Finish 6/5/2017 100 5
Bonita Springs Library Breakpoint 6/19/2017 100 5
North Ft. Myers Library Breakpoint 6/19/2017 50 5
Bonita Springs Library Finish 6/19/2017 50 5
North Ft. Myers Library Finish 6/19/2017 0 5