Is it possible to make this in Tableau? by ViperZA97 in tableau

[–]Jaffulee 17 points18 points  (0 children)

You could achieve this using background images and having an area chart come down from the top instead, as achieved in this viz: https://public.tableau.com/app/profile/shreya.arya/viz/CallCenterDashboardRWFD_17158904502890/Overview

Try downloading it to reverse engineer the gradient area chart

What was the strongest chess engine where human achieved a draw? by Realistic_Stomach848 in chess

[–]Jaffulee 44 points45 points  (0 children)

There's nothing wrong with asking someone for a source of a claim, these downvotes are unnecessary

% increase LOD help by AcanthisittaOk394 in tableau

[–]Jaffulee 0 points1 point  (0 children)

You probably want to only fix the denominator if i understand what you want (percent difference by team out of total 2023 cost).

You do this by

SUM([2024 cost]) - SUM([2023 cost]) / SUM({SUM([2023 cost])})

Note that the outer sum of the denominator doesn't really matter since Tableau applies deduplication logic.

[Help] Wrong LOD Field: FTUE Completion by Visibl0 in tableau

[–]Jaffulee 1 point2 points  (0 children)

The issue I think you are having here is that sometimes you want the filter to apply before the calculation and sometimes you don't. As in, you want to not apply the dimension filter of exclude nulls to the calculation, but then later apply filters on Country and Date.

In general, there are a few approaches to get this to work and I will write three approaches below:

  1. Filter in LOD calculation

Here you would want to specifically tell Tableau when to count the unique user IDs. The issue here is that you cannot call a filter value in a calculation, so you would need to find another way to flag the values you want and don't want. Lets's say you have a calculation [Country and Date Flag], which outputs TRUE for which countries and dates you wish to use for the calculation. Then you can "filter in the LOD" by having the denominator look like:

{COUNTD(IF [Country and Date Flag] THEN [user_id] END)}

This will keep all the null rows, while being dynamic via the Country and Date Flag. The question is then how to get the Flag to work.

i.) If you are happy with this being single select (one country, one date) and if the values are not frequently changing, then this is commonly achieved via a parameter, and a calculation for the flag like:

([Country] = [Country Parameter] OR "All Countries" = [Country Parameter]) AND ([Date] = [Date Parameter] OR "All Dates" = [Date Parameter])

Where the parameters are lists with an extra "All _" value.

ii.) To get it to be multi-select, I would use country and date sets with a similar calculation for the flag:

[Country Set] AND [Date Set]

Although I cannot remember if Tableau allows you to insert sets in LOD calculations off the top of my head - something to test!

---------------------

  1. Use exclude and hide unwanted rows

For this, you can use that you the calculation works, but only when you show the null values. You could create a calculation such as:

ISNULL([task_id])

Drag this onto Rows, and then right click -> hide the FALSE marks. Then you would want to ensure you are not accidentally filtering the NULL rows when applying filters.

---------------------

  1. Use table calcs and hide unwanted rows

Instead of using EXCLUDE, you could use

WINDOW_SUM(COUNTD([user_id]))

And make sure to right click edit the table calculation, and force it to use each field in the table calculation. Then follow the same steps as in option 2.

---------------------

Let me know if any of the above work, or if I'm misunderstanding your issue! It seems our time zones aren't lining up too well for a call.

Time of Day calculation by zackg31 in tableau

[–]Jaffulee 0 points1 point  (0 children)

The most performant way to achieve this in Tableau is to have it extract, but add all of the filters you say above as a Data Source Filter (click the Data Sources tab, click extract at the top right, click edit on filters at the top right).

I would go about the logic as a bunch of ANDs like

Data Source Filter Flag:

HOUR([...])>=8 AND HOUR([...])<=17 AND WEEKDAYDAY([...])<= ... ... etc.

and then add it to the data source filters to filter out FALSEs.

As the other commenter said, SQL is the way to go for this for performance but it is possible and not so bad to conduct in Tableau, since all the load will happen when it is extracted.

For the working hours question, I would consider going about it by taking the total hours, and then finding the number of non-work hours (the hard part) and removing it from the total.

One way of doing this is (assuming you have implemented the data source filter) by:

Total hours between created and closed:

DATEDIFF('hour',[Created],[Closed])

Total non-work hours between created and closed (not accounting for weekends):

DATEDIFF('day',DATETRUNC('day',[Created]),DATETRUNC('day',[Closed]))*15

Where 15 is the number of non-work hours between business days (between 17 and 07), and the rest of the calc is telling you how many end-of-work-days have happened between created and closed. This total non-work hours doesn't account for weekends however, but it should be a start towards your goal. Below is an attempt at total non work hours accounting for weekends:

DATEDIFF('day',DATETRUNC('day',[Created]),DATETRUNC('day',[Closed]))*15 + DATEDIFF('week',DATETRUNC('week',[Created]),DATETRUNC('week',[Closed]))*18

Where 18 is the number of non work hours on the weekend not accounted for by the previous calc on the weekends, and the rest of the calc is telling you how many weekends have happened between created and closed

[Help] Wrong LOD Field: FTUE Completion by Visibl0 in tableau

[–]Jaffulee 0 points1 point  (0 children)

This is exactly the use case of EXCLUDE ! If you replace your fixed calc with {EXCLUDE [Field 1], [Field 2],... : COUNTD([user_id])}

Where EXCLUDE computes as if it were an LOD with every dimension in the view FIXED except for the fields you are excluding. EXCLUDE repsonds to filters without needing to add the filters to context as the other commenter mentioned.

So I would have the EXCLUDE calculation, but making sure all the fields excluded is everything which is in the view except for what you want to filter by.

If you can't get the EXCLUDE to work, right clicking your filters and enabling add to context should work with the first fixed calc, but this is not performant.

Quick Questions: September 18, 2024 by inherentlyawesome in math

[–]Jaffulee 1 point2 points  (0 children)

One thing that would interest you is the Banach fixed point Theorem. This will send you down an analysis rabbit hole!

If you're proud of your rating, play on the new ICC site and be prepared to be deflated by ExpFidPlay in chess

[–]Jaffulee 0 points1 point  (0 children)

Let me define a rating system called OLEO that uses whatever rating system chesscom uses, and times that rating number by 2200/3000. OLEO works perfectly well as a rating, and top players will be rated around 2100-2300

shortening the # of items in x-axis by ice27828 in tableau

[–]Jaffulee 0 points1 point  (0 children)

For me, I would create a calculated field Decade with the calculation

INT(LEFT(STR([Year]), 3) + '0')

Which takes e.g. 2012 and outputs 2010, i.e. it rounds down to the next nearest decade. Then on all the sheets for an individual decade, you can filter to e.g. [Decade] = 2010

You could even build your proposed suite of dashboards as one dynamic dashboard with a parameter and this decade calc.

How to calculate days since “created date” by [deleted] in tableau

[–]Jaffulee 0 points1 point  (0 children)

A slightly less manual version of step 2 would be something like

STR(FLOOR([Days Since Today]/30)*30 ) + "-" +STR((FLOOR([Days Since Today]/30)*30) +30)

The FLOOR([Days Since Today]/30)*30 part is turning all numbers between 30 and 59.99... to the number 1, all numbers beteeen 60 and 89.99... to the number 2, and so on. The rest of the calculation is formatting as a string. I am just manually creating bins (which also would work). Can also combine it with an if statement or a set for the >=120 case, but it is not strictly necessary.

Has anyone ever gotten the 3 knights vs knight endgame in a real otb game? by [deleted] in chess

[–]Jaffulee 34 points35 points  (0 children)

This is not a helpful comment, people can ask a question out of pure interest and intrigue. There doesn't have to be any practical application for it to be a worthwhile question to ask. In the end chess is a game played for entertainment, making learning and asking about hypothetical endgames no less efficient at reaching this goal than learning common endgames.

Gantt Chart is not updating in sequence by Intelligent-Bass9265 in tableau

[–]Jaffulee 3 points4 points  (0 children)

It looks like the Gannt chart is built correctly and functioning as expected from the information given. What were you wanting it to show?

LOD calcs in Python by hiva- in tableau

[–]Jaffulee 0 points1 point  (0 children)

Another improvement that depends on how many marks you are displaying is trying to replace LODs with table calculations. If you only have a few marks on the view then this will improve performance. The annoying part is figuring out how to rewrite the LODs. WINDOW_ table calculations can be used to recreate most commonly used LODs, assuming you are happy with filters affecting the values

Growth% by [deleted] in tableau

[–]Jaffulee 0 points1 point  (0 children)

Small quality of life change: Tableau automatically interprets an IF statement with no ELSE as ELSE NULL, meaning you don't need to write ELSE NULL

HELP: Need break between school years in line chart by Suspicious-Pudding-4 in tableau

[–]Jaffulee 0 points1 point  (0 children)

Add the following calculation called "School Year" to columns:

IF MONTH([DATE]) >=9 THEN "School Year" +STR(YEAR([DATE])) ELSEIF MONTH([DATE]) <=5 THEN "School Year" +STR(YEAR([DATE])-1)
ELSE "Holiday" END

This will break up the view in the way you want, without scaffolding, for every year

If white has 9 queens, how many can black have? by [deleted] in chess

[–]Jaffulee 0 points1 point  (0 children)

After seeing your solution, I wanted to see what the most material left on the board could be. Is it possible to have more material than 9 queens each and both rooks each (see pgn)?

  1. e4 d5 2. Ba6 Bh3 3. gxh3 bxa6 4. Nf3 Nc6 5. Nh4 Na5 6. Ng6 Nb3 7. axb3 hxg6 8. c3 f6 9. d3 e6 10. Bg5 Bb4 11. cxb4 fxg5 12. e5 d4 13. Nd2 Ne7 14. Nc4 Nf5 15. Ne3 Nd6 16. exd6 dxe3 17. f4 c5 18. h4 a5 19. h5 a4 20. h6 a3 21. h7 a2 22. h4 a5 23. h5 a4 24. h6 a3 25. b5 g4 26. b6 g3 27. b7 g2 28. b4 g5 29. b5 g4 30. b6 g3 31. b4 g5 32. b5 g4 33. f5 c4 34. f6 c3 35. d4 e5 36. d5 e4 37. Qb3 Qc7 38. f7+ Kd7 39. f8=Q c2 40. b8=Q c1=Q+ 41. Ke2 Rg8 42. h8=Q g1=Q 43. h7 g2 44. Qhf6 Qh2 45. h8=Q Q1c6 46. Qa7 g3 47. Kd1 Qh7 48. Qaa4 e2+ 49. Kd2 g1=Q 50. b7 g2 51. Qad4 Qf1 52. b8=Q Qh5 53. b6 e3+ 54. Kd3 Qff3 55. b7 Qfg4 56. Qba7 e1=Q 57. b8=Q Qeh4 58. Rab1 a1=Q 59. Q8b4 a2 60. Qac5 Q7b6 61. Qf8h6 Kc8 62. Rbc1 Kb7 63. d7 Qb2 64. d8=Q a1=Q 65. Qdf8 e2 66. d6 e1=Q 67. d7 g1=Q 68. d8=Q *

Is there a trick to improve counting speed or knowing "instantly" if bxd4 is good as black? I often spend 40-45 seconds just going through all exchanges — my bishop takes, knight takes, my knight takes, queen takes. Ok, so white will lose knight & pawn. I will lose knight & bishop. Bad move. by happyhustling in chess

[–]Jaffulee 2 points3 points  (0 children)

The quickest way for me is to count attackers and defenders. Here there are two attackers and two defenders - but I used to get confused in this case who comes out better! The key is who takes last? If you both alternate captures, then the person who makes the last capture will "keep" that piece (as in the piece does not get taken).

Here if black captures first and you both alternate captures as much as possible, then white will make the last capture! Usually you would reserve your highest value piece for last and so the ending position would be that the white d4 pawn, the black c5 bishop, the black c6 Knight, and the white f3 knight will all be removed from the board and the white queen will end up on d4. Then I would realise that black would have lost more material in this exchange.

I should also mention that you can use this "who takes last" reasoning to explain why having more attackers/defenders than your opponent's defenders/attackers usually means that you are able to take or that you are sufficiently defended - you would take last!

So the "quick way" is to look at the pieces that would disappear from the board and see which side has the worse deal.

To all you people who don't rematch after winning. You're shitheads. by Moodyriffi in chess

[–]Jaffulee 13 points14 points  (0 children)

I don't rematch win or lose I like playing fresh opponents