vefherbal.blogg.se

Nxfilter modify dashboard
Nxfilter modify dashboard




nxfilter modify dashboard

Now you can use this step for your chart widgets (Drag and drop the step you just created) and delete the first chart widget and step you had to create in steps 1-3. Step 6: Here is where you can switch to the SAQL mode and write your query using data from both datasets and then join them together either using UNION or COGROUP.Ĭlick “Run Query” to make sure it’s working how you need it to and then click “Done” to finish creating the step. Step 5: Now in this step select the other dataset that you need, the one you didn’t select in Step 2. If you are in edit mode and you do not see “Create Step” then click somewhere on the background of the dashboard. If it isn’t displaying, ensure you are in “Edit” mode (a Pencil Icon will be displaying in the buttons at the top right if you are not in Edit mode, click this button).

nxfilter modify dashboard

Step 4: Now click on the “Create Step” button in the right column of the Dashboard builder. You don’t need to change anything here – just click “Done.” Step 3: Waveahem, Einstein Analytics will have a default chart for Count of Rows. Step 2: Select one of the datasets you want to access in your query. Step 1: Drag a chart widget onto the dashboard, then click into the middle of the widget where it says “Chart.”

NXFILTER MODIFY DASHBOARD CODE

Here’s how you can use the same code (as above) but not get this error: “You can’t use the following datasets in this query because they aren’t included in the dashboard:” We UNION these together (not really much different than a UNION in SQL) as “x” and run the division to get our ‘Deaths per Capita.’ We have to filter out a state that is listed in both datasets as “United States” as again, just like the “All Causes” scenario, these totals are already included within each individual state. Then we are just getting the total # of deaths by state. We are making sure we filter down to just 2010 and filtering out a cause of “All Causes” as these are already included in each granular cause. Then we are loading “a” which is our dataset that contains the # of deaths by state by year for the top 10 leading causes. We are loading “q” which is our 2010 Population by State Dataset (dataset #1 above) and simply grouping by state and providing the total population by state. X = filter x by 'State' != "United States" įirst, some notes on the code above. X = foreach x generate 'State' as 'State', sum('sum_DEATHS') / sum('sum_X2010_Census_Population') as 'Deaths per Capita'

nxfilter modify dashboard

Q = foreach q generate 'State' as 'State', sum('X2010_Census_Population') as 'sum_X2010_Census_Population' Ī = load "Deaths_for_top_10_causes_by_State" Ī = filter a by date('YEAR_Year', 'YEAR_Month', 'YEAR_Day') in, )] Ī = filter a by 'CAUSE_NAME' != "All Causes" Ī = foreach a generate 'STATE' as 'State', sum('DEATHS') as 'sum_DEATHS' We also have to add a place-holder step/chart to the dashboard for both of the datasets we want to access before we can combine both datasets into a single step.įor example, if I just create a new dashboard, drag on a chart widget, click on it and then create a new step and navigate to the SAQL and create the query I want to use, which is this by the way: q = load "X2010_Census_Population" A Lens is explicitly tied to a single dataset. The primary rule with joining more than one dataset into a single SAQL query/widget/chart is that you have to use a dashboard. Combining Multiple Datasets Into Single Widget We want to take the # of deaths by state in 2010 and divide by the population of each state in 2010 to calculate deaths per capita. The reason we want Dataset #1 is that some states have more people living in them than others (shocking, I know). We can also use a timeline chart to see the # of deaths by cause over time: With Dataset #2 we can do some really cool things like a donut to show the # of deaths by cause for a single year: We are going to use data downloaded from the US Government – thrilling!ĭataset 1: US Population by State from 2010 Censusĭataset 2: Top 10 Causes of Death by State (Years 1999-2013)

nxfilter modify dashboard

(2) Create a static step to present a variety of fixed options that will be fed into the query from #1 as a parameter that will control the results and make the dashboard interactive! The Data Today we are going to cover two primary objectives: (1) Combine at least two datasets into the same stream/chart widget.






Nxfilter modify dashboard