How to hide legend element based on specific year in Tableau - tableau-api

I am pretty new to Tableau and I have a question about hiding a specific element from the legend box in Tableau software. I have legend based on year (2018,2019) and measure values ( which is calculation formula for retrieving the result for the current and previous year) for 2019 year. I would like in my legend box to hide targets for 2018(previous year). If I exclude Target(Budget) 2018 from the legend box, it is excluding the element Cost, 2018. Could someone help me how to solve this ?
enter image description here

Related

Qlikview Combo Chart - Series not aligning with Axis

I have a combo chart that I want to track Actual spending versus Budget over a 3 year period. The Budget line items are bar charts, the Actuals are displayed by a symbol. There is only one data point for Actuals, 2020, Budget data is for 2020-2022. My problem is that Actuals are aligning with 2021, not 2020. Viewing the data as a straight table, I know my data calculations are correct. I am not suppressing zeros and the order of expressions (promote, demote) has no effect. Any ideas why this is happening and how to fix it?
Image explaining the issue

Making a scatterplot in PowerBI

I'm used to using Tableau (similar to powerBI), and I'm now testing powerBI as well. I've been trying to receate a plot from Tableau, but I'm unable to do it (see the images).
Now I realize that this probably has a very simple solution, and I understand the general problem with how the data is aggregated together, but I'm just not able to find the solution on my own. What sort of buttons should I push in PowerBI to make this work?
Thanks for any help!
Tableau plot
PowerBI plot
In the Tableau plot, you're putting the Date at Day level on the x-axis. In the PowerBI plot, you've the Date at Year level at the the x-axis. That's why all points are displayed exactly on a year.
You should put the Day at Day level on the x-axis in the PowerBI plot, just like the Tableau plot. You can do this by dragging the date column in the X Axis field, and remove the Year, Quarter and Month level. The only remaining level will be Day.
Edit:
Or don't display the hierarchy, and display the date field:
Change the Date field from "Date Hierarchy" to plain "Date"
Power BI treats dates as hierarchies by default - this is useful for drilling (e.g. see the "big picture" of year-over-year performance, and than drill down to month or day resolution) in interactive reports, but less so when you just need a quick summary.
You can change this using the dropdown button next to the "date" field in the visual's field-well. Just choose "Date" instead of "Date Hierarchy":
For comparison, this is the same visual with date as date hierarchy:
There are some additional details in this 5 Minutes BI blog post.

Dual axis chart from the same measure in Tableau

I'm aware of how to create a dual-axis chart using two different measures for the Y-axis. Is there a way for me to create a dual-axis chart using a same measure but on two different range in the dual-axis? For example, I have a column which contains revenue, I want to create a dual-axis chart where one axis has revenue for Year 2013, and the other with revenue for Year 2014.
Edit: my aim is to create a line chart for revenue Year 2013, and bar chart for revenue Year 2014, on the same chart. See picture below is what I have done to have FY13 and FY14 values for each month and running monthly cumulative.
Now what I wanted to do is to have the two FY13 bar charts to be line charts superimposed on their corresponding FY14 bar charts.
I attach also my Tableau workbook that creates the charts above in the first tab.
https://dl.dropboxusercontent.com/u/5548442/StackOverflow%20attachments/FY13%20vs%20FY14.twbx
Yes, this is possible.
Drop the measure in the row shelf.
Then grab the same measure with Control key pressed and drop it again on the row shelf.
You will have two instance of the same measure on the row shelf.
Right Click the second measure on the row shelf and click dual axis.
Right click the axis on the worksheet and Edit axis to your choice.
Let me know if this solved your problem.
EDIT
Create 2 calculated feild:
If [FY] = "FY13"
then [Value]
end
call it- 2013
and
If [FY] = "FY14"
then [Value]
end
call it- 2014
Then just do as i have done in this image.

Tableau Public, Box Plots: combine 4 rows into 1 with 4 plots per month

I have a Tableau Public sheet with 4 years of data.
Each day has a value, and I am showing those daily values as a box plot - one for each month of each year.
Currently it is set up as 4 rows (1 for each year), and 12 columns.
See here:
https://public.tableausoftware.com/views/boxplotsbyyearmonth-dailyvalues/Sheet1?:embed=y&:display_count=no
What I want to do is drop to a single row, and show all 4 box plots side by side within each month, colored by year.
I can't elaborate what exactly I have tried, as I am new to Tableau, and have done a lot of clicking around looking for options, and have tried searching various sites and Google, to no avail.
Is there a simple trick to this, or is it something complex I have to do to?
UPDATE:
I have figured out how to get them lined up correctly, by dragging the year dimension to the columns section, which I had tried, but then I had to reset the other dimensions, and it took.
What I still can't figure out is the coloring.
By dragging the year to the color property, it colors the outliers, which are separate marks, but the box plots are not affected.
When you pull the year field to color it will color the marks (all of them, including the outliers). If you want to change the color of the box plot container you need to select it and right click.
I made some edits, let me know if this is what you were trying to accomplish:
https://public.tableausoftware.com/views/boxplots_0/Sheet1?:embed=y&:display_count=no

Tableau - Multiple Line Graphs Day by Day

I would like to create a dashboard showing Level Funnel for the users with respect to their register date on the same chart.
My data is like the following:
And from that data, I would like to create the graph like below:
But in tableau I couldn't manage to combine those graphs below, which are separated day by day:
I tried to follow this steps, http://downloads.tableausoftware.com/quickstart/feature-guides/combo_charts.pdf however I couldn't find 'Customize Marks' button in the menu.
That would be great if you can help me on how to combine these graphs into one graph.
Thanks.
Drag the DAY(Date) field from the row shelf to the color shelf
One way to think about it: When you have the DAY(DATE) field on the row shelf, and you've configured it to present as a discrete field, you are telling Tableau to "make a row for each day". When you move that field to the color shelf, you are instead telling Tableau to make a color for each day. The same mental substitution works for discrete fields on most of the other shelves, like columns, shapes, pages -- i.e. make a page for each day.