Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Distance Between Lat-Long Points

SQL code to find the distance between two lat-long points on a globe.Additional information can be found here: Calculating Distance Between Data Centers on a Globe2 * 3960 * asin(sqrt((sin(radians(([latitude_2] - [latitude_1]) / 2))) ^ 2 + cos(ra...

intapiuser by Community Team Member
  • 209 Views
  • 0 comments
  • 0 kudos

Filters In Case When Statements

I came across an interesting use case with a customer where they had a name and ID column on a dataset: Select a filter value for name, and not id -> show results for nameSelect a filter value for id, and not name -> show results for idIf values are ...

intapiuser by Community Team Member
  • 1957 Views
  • 0 comments
  • 0 kudos

Filter Out Selected Filter Values

Occasionally, we would want to have a chart show everything except the values selected in a filter. For this use case, we recommend using the following SQL in your chart query. where case when '[Filter_name|Default]'= 'Default' then 1 = 1...

intapiuser by Community Team Member
  • 232 Views
  • 0 comments
  • 0 kudos

Your Guide To Default Filters

Filters are a great way to slice and dice your data into a variety of views. There are a couple ways you can set default filter values, on the dashboard level and on the query level.   Dashboard Level Default Filters If you want all your users to vi...

intapiuser by Community Team Member
  • 1332 Views
  • 0 comments
  • 0 kudos

Confidence Interval Printout - R

Let's say we want a printout of our confidence interval for an entire sample (Note, if you're looking for a visual of a confidence interval over time, check out the post here!) The solution here requires Sisense for Cloud Data Teams' Python/R Integr...

intapiuser by Community Team Member
  • 277 Views
  • 0 comments
  • 0 kudos

SQL Order Of Operations

The first thing you'll learn in SQL is the order in which we write various clauses in our queries (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, then LIMIT). However, the order in which the database interprets the query is slightly different. Unde...

intapiuser by Community Team Member
  • 21619 Views
  • 0 comments
  • 0 kudos

Window Functions In Python

I've come across a few use cases where customers would like to apply a SQL window function, but are limited to using a version of MySQL that does not support window functions. Traditionally our recommendations would have been one of the following:Cac...

intapiuser by Community Team Member
  • 1307 Views
  • 0 comments
  • 0 kudos

Resizing And Scaling Charts In R Python

You have you have an R or Python chart but it renders very small. How can you resize it?  The Functions to Resize the Canvas These functions will set the max size that the image is capable of rendering.  For R, you can append the following line befo...

intapiuser by Community Team Member
  • 301 Views
  • 0 comments
  • 0 kudos

Hyperlink To Email - Gmail, Yahoo, And Outlook

Sisense has a lot of cool functionality around converting links to a simpler format using Markdown language. However, doing things that require more advanced functionality such as bringing up an email takes a little more maneuvering. Luckily, the int...

intapiuser by Community Team Member
  • 453 Views
  • 0 comments
  • 0 kudos

Fixing DISTINCT ON Not Supported

Ever seen the following error when materializing a view?SELECT DISTINCT ON is not supportedThe DISTINCT ON clause is a Postgres function which selects the first value for a group given the order by clause. With no order by clause, it gives a random v...

intapiuser by Community Team Member
  • 2331 Views
  • 0 comments
  • 0 kudos

Everything About CTEs!

CTEs (common table expressions - also commonly referred to as "with clauses") are an extremely powerful tool in SQL! Similar to subqueries, they can pull "a query in a query," but can be called multiple times within the same query especially easily! ...

intapiuser by Community Team Member
  • 1003 Views
  • 0 comments
  • 0 kudos

Average Time Interval Between A Start And End Time

Looking to get the average time interval between a start and an end time (ex: Given the start and end times for runners in a race, find the average time it takes for a runner to complete the race)? Find exactly how to write this up in each flavor of ...

intapiuser by Community Team Member
  • 6996 Views
  • 0 comments
  • 0 kudos

Generate Series Of Timestamps (1 Second Intervals)

There may be several reasons why you want to create a list of dates or timestamps. The primary use case is to left join a dataset that has missing dates onto this full list of dates so you can clearly show where no data is reported.Postgres has a han...

intapiuser by Community Team Member
  • 558 Views
  • 0 comments
  • 0 kudos

Normalizing Parameters With SQL

If you have multiple metrics that you want to weigh together, it may make sense to normalize the data so one metric (that is measured on a larger scale), doesn't disproportionately sway the composite score.   This SQL snippet (which uses CTEs), is o...

intapiuser by Community Team Member
  • 334 Views
  • 0 comments
  • 0 kudos

US County GeoJSON

Here are the GeoJSON boundaries for all US counties. Join this data to your datasets to create beautiful GeoJSON Map charts!

intapiuser by Community Team Member
  • 374 Views
  • 0 comments
  • 0 kudos

CASE WHEN Statements

OverviewCASE WHEN statements provide great flexibility when dealing with buckets of results or when you need to find a way to filter out certain results. You can think of these almost as IF-THEN statements similar to other coding languages. Below you...

intapiuser by Community Team Member
  • 2240 Views
  • 0 comments
  • 0 kudos
Labels