tableau

Regex for Parsing JSON

↘锁芯ラ 提交于 2020-01-03 03:32:06
问题 I have a column of data I'm reading in Tableau directly from Redshift. This column contains a JSON object. It looks like this: {"Age": 58, "City": "Wisconsin Rapids", "Race": "Other", "State": "Wisconsin", "Gender": "Female", "Country": "United States"} I wish to extract this data by generating a column with a calculated field for each data point of interest using Tableau's REGEXP_EXTRACT function. I.e. an Age column, a City column etc. How do I write a line of regular expressions to get the

Tableau split string and take from x token until the end of tokens

孤街浪徒 提交于 2020-01-03 03:27:35
问题 I have a field of strings and want to take all the "Elements from position x until the end. For example there is a "Field Name" column with the following values: /one/two /three/three/four /five/six As result I would like to have: two three/four six I tried with SPLIT([Field Name], '/', 2) but then the " four " is missing. Is there a way to talk from token 2 until the end of tokens? 回答1: This should work: RIGHT([Field Name],LEN([Field Name]) - FINDNTH([Field Name],"/",2)) This is returning

Set the latest date value to the Quick Filter in TABLEAU

会有一股神秘感。 提交于 2020-01-01 18:18:10
问题 There is a live worksheet called Person with columns - Names & Birthdays. Need to create a quick filter with a default value pointing to the latest birthday. For example: If there are 3 Records as follows, Names Birthdays A 8/9/1993 S 6/5/1994 Z 8/15/2000 The filter should hold the default value 8/15/2000 in it with other values unchecked in the drop down list. 回答1: I believe I see what you are asking. When you add your filter click the little drop down arrow in the filter --> edit filter--

Set the latest date value to the Quick Filter in TABLEAU

感情迁移 提交于 2020-01-01 18:18:10
问题 There is a live worksheet called Person with columns - Names & Birthdays. Need to create a quick filter with a default value pointing to the latest birthday. For example: If there are 3 Records as follows, Names Birthdays A 8/9/1993 S 6/5/1994 Z 8/15/2000 The filter should hold the default value 8/15/2000 in it with other values unchecked in the drop down list. 回答1: I believe I see what you are asking. When you add your filter click the little drop down arrow in the filter --> edit filter--

Tableau count number of times same value appears in column

雨燕双飞 提交于 2020-01-01 09:23:29
问题 I have a field such that Color Pink Blue Pink Blue Pink Pink Pink Pink Pink Blue Blue Pink Pink Pink Blue Pink Blue Pink Blue How to create calculated field to count number of times Pink appears? Total numbers of Blue? 回答1: If you're grouping by Color and only Color in the view, then you can simply use SUM(Number of Records) . For example, put Color in the Rows shelf and SUM(Number of Records) into Text, and you'll get a table with the counts for each Color. If you need to specify the level

举个栗子!Tableau技巧(21):轻松使用参数实现数据增长分析

情到浓时终转凉″ 提交于 2019-12-30 20:37:03
使用电子表格做数据增长分析时,需要先在表格里增加一个现实对比结果的字段,然后使用函数计算得到分析结果。接着,再把得到的分析结果制作成图表,往往事倍功半。 并且,假如你的数据不是excel文件,而是系统或者数据库里的数据,并且数据量非常庞大,事情可就没有那么简单了。 怎样能轻松实现数据增长分析呢? 其实,在Tableau里面,你只需要使用一个参数。 本期《举个栗子》,阿达要给大家分享的Tableau技巧是:轻松使用参数实现数据增长分析。 该栗子以实现数据的同比增长分析为应用场景,具体步骤如下: 创建日期参数 创建计算字段 将分析维度拉到工作表 把你想要分析的维度拖到工作表,就可以开始分析同比增长情况了。例如:想分析2016年产品的同比增长,就可以得出下面的分析结果。 如此,一个数据同比增长分析就完成了。是不是很简单?赶紧打开你的Tableau,试试看吧! 文章部分信息来源于网络,如有侵权请告知 来源: CSDN 作者: 阿达_优阅达 链接: https://blog.csdn.net/weixin_45588393/article/details/103770634

It is possible to sort by “valid” percentage in my data?

隐身守侯 提交于 2019-12-25 08:57:07
问题 Using Tableau, I have arranged some data in a 100.00% stacked bar: I want to sort the data descending (largest to smallest) by Valid component type (green) - is this possbile? UPDATE (26th July 2017) merawalaid's answer ALMOST worked; I followed the steps, adjusted the code to match my specific project, and it resulted in this: As you can see, it is somewhat sorted, but not quite as it should be (for example, the fourth and sixth rows are featured too high in the chart. Is there something

Connecting Spark Streaming to Tableau

☆樱花仙子☆ 提交于 2019-12-24 21:16:52
问题 I am streaming tweets from a Twitter app to Spark for analysis. I want to output the resulting Spark SQL table to Tableau for real-time analysis locally. I have already tried connecting to Databricks to run the program but I haven't been able to connect the Twitter app to Databricks notebook. My code for writing the steam looks like this: activityQuery = output.writeStream.trigger(processingTime='1 seconds').queryName("Places")\ .format("memory")\ .start() 来源: https://stackoverflow.com

A ratio measured within one dimension shown across another dimension

故事扮演 提交于 2019-12-24 19:19:00
问题 For the sake of the exercise, let's assume that I'm monitoring the percentage of domestic or foreign auto sales across the US. Assume my dataset looks like: StateOfSale | Origin | Sales 'CA' | 'Foreign' | 1200 'CA' | 'Domestic' | 800 'TX' | 'Foreign' | 800 'TX' | 'Domestic' | 800 How would I show the percentage of Foreign Sales, by State of Sale, but each State is a line/mark/bar in the visual? So for CA, the Foreign Percentage is 60%. For TX, the Foreign Percentage is 50%. 回答1: This is what

Max date should appear automatically in Tableau after extract refresh

∥☆過路亽.° 提交于 2019-12-24 18:37:56
问题 I am creating a report in Tableau and wanted to show the latest date in dashboard whenever I refresh the data. My data also contains last one month's data points. And on daily basis, we are refreshing the data. 回答1: If you just want to show the latest date in your dashboard you can just have a sheet with max(date_field) and drag that sheet onto your dashboard. If you want that date to change dynamically with the users choice of periods that you just need to look at "Apply to worksheets" on