

{"id":40311,"date":"2018-11-09T16:14:27","date_gmt":"2018-11-09T10:44:27","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=40311"},"modified":"2018-11-09T16:14:27","modified_gmt":"2018-11-09T10:44:27","slug":"qlik-sense-mathematical-functions","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/","title":{"rendered":"Qlik Sense Mathematical Functions &#8211; e, pi, rand, false &amp; true"},"content":{"rendered":"<h2><span style=\"font-weight: 400\">1. Objective<\/span><\/h2>\n<p><span style=\"font-weight: 400\">In our last Qlik Sense tutorial, we discussed <strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-null-functions\/\">Qlik Sense Null Functions<\/a><\/strong>. Today, we will see Qlik Sense Mathematical Functions. The mathematical functions are specifically there for the users to perform mathematical operations on the values used in data script. So, we can use these functions both as a script and as chart functions. As we proceed with learning the mathematical functions in Qlik Sense script and chart, you might notice there are no parameters used in these functions but still putting the parenthesis along with the functions is necessary to make an expression valid.<\/span><\/p>\n<p>So, let&#8217;s start the Qlik Sense Mathematical Functions tutorial.<\/p>\n<div id=\"attachment_40558\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-40558\" class=\"size-full wp-image-40558\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg\" alt=\"Qlik Sense Mathematical Functions\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-40558\" class=\"wp-caption-text\">Qlik Sense Mathematical Functions &#8211; e, pi, rand, false &amp; true<\/p><\/div>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-mapping-function\/\">Let&#8217;s take a tour of Qlik Sense Mapping Functions<\/a><\/strong><\/p>\n<h2>2. Qlik Sense Mathematical Functions<\/h2>\n<p>Following are the mathematical functions in Qlik Sense &#8211;<\/p>\n<h3><span style=\"font-weight: 400\">i. e() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function evaluates values to return their e value i.e. base of natural logarithm. Where the value of e is fixed i.e. 2.718281828459. For a number n, the function e() evaluates that e to the power of what will be equal to the number n. For instance, if we evaluate the e value for the number 7.5 it will be 2.0149 (on rounding up). <\/span><\/p>\n<p><span style=\"font-weight: 400\">Which in mathematical notation will be shown as e <\/span><span style=\"font-weight: 400\">2.0149\u2026<\/span><span style=\"font-weight: 400\">= 7.5. <\/span><\/p>\n<p><strong>The syntax for Qlik Sense e() function<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">e()<\/pre>\n<h3><span style=\"font-weight: 400\">ii. pi() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">The pi() function returns the value of pi or \u03c0 which is<\/span> <span style=\"font-weight: 400\">(3.14159&#8230;). It is used in Qlik Sense\u2019s script when you are performing mathematical operations and need the system to evaluate an expression using the pie value, then just pi() is written on the script and it is automatically evaluated as 3.14159.. by the system.<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-scatter-plot\/\">Do you know about Qlik Sense Scatter Plot<\/a><\/strong><\/p>\n<p><strong>The syntax for Qlik Sense pi() function:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">pi()<\/pre>\n<h3><span style=\"font-weight: 400\">iii. rand() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This function is used to return numbers be it integer values or character values at random. You cannot control what values are going to be generated using this function because a set of values is generated randomly by this function. <\/span><\/p>\n<p><strong>The syntax for Qlik Sense rand() function:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rand()<\/pre>\n<p><span style=\"font-weight: 400\">For instance, if we want to generate 100 records of uppercase characters automatically by the system, we will use the rand() function and specify the values for uppercase characters according to the ASCII code.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Load\r\n\u00a0\u00a0\u00a0\u00a0Chr( Floor(rand() * 26) + 65) as UpperCaseChar,\r\n\u00a0\u00a0\u00a0\u00a0RecNo() as ID\r\n\u00a0\u00a0\u00a0\u00a0Autogenerate 100;<\/pre>\n<h3><span style=\"font-weight: 400\">iv. false() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">We use this function to evaluate a value such that if the given condition doesn&#8217;t satisfy upon evaluation then a Boolean value returns. This Boolean value has a dual character, i.e. the result is both a text \u2018False\u2019 and a number \u20180\u2019. <\/span><\/p>\n<p><strong>The syntax for Qlik Sense false() function:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">false()<\/pre>\n<h3><span style=\"font-weight: 400\">v. true() function<\/span><\/h3>\n<p><span style=\"font-weight: 400\">As a counterpart to the false() function, this function returns a Boolean value as True or -1 if the condition for which an expression evaluates holds true. Usually, we use such functions<\/span><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-line-chart\/\">You must read Qlik Sense Line Chart<\/a><\/strong><\/p>\n<p><strong>The syntax for Qlik Sense true() function:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">true()<\/pre>\n<p>So, this was all in Qlik Sense Mathematical Functions. Hope you like our explanation.<\/p>\n<h2><span style=\"font-weight: 400\">3. Conclusion <\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, these were all the important mathematical functions which we use in Qlik Sense charts and scripts to perform mathematical functions.<\/span><\/p>\n<p>Still, if you have any query regarding Qlik sense Mathematical Functions asked in the comment tab.<\/p>\n<p><strong>See also &#8211;\u00a0<\/strong><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/treemap-visualization\/\">Qlik Sense Treemap Visualization<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/help.qlik.com\/en-US\/sense-cloud\/Subsystems\/CloudHub\/Content\/Sense_Hub\/Scripting\/MathConstantsAndParamFreeFunctions\/mathematical-functions.htm\">Reference for Qlik Sense<\/a><\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1741,&quot;href&quot;:&quot;https:\\\/\\\/help.qlik.com\\\/en-US\\\/sense-cloud\\\/Subsystems\\\/CloudHub\\\/Content\\\/Sense_Hub\\\/Scripting\\\/MathConstantsAndParamFreeFunctions\\\/mathematical-functions.htm&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective In our last Qlik Sense tutorial, we discussed Qlik Sense Null Functions. Today, we will see Qlik Sense Mathematical Functions. The mathematical functions are specifically there for the users to perform mathematical&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":40558,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17408],"tags":[17602,17604,17605,17601,17603,17607,17606],"class_list":["post-40311","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlik-sense-tutorials","tag-mathematical-function-in-qlik-sense","tag-qlik-sense-e-function","tag-qlik-sense-false-function","tag-qlik-sense-mathematical-function","tag-qlik-sense-pi-function","tag-qlik-sense-rand-function","tag-qlik-sense-true-function"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true - DataFlair<\/title>\n<meta name=\"description\" content=\"Qlik Sense Mathematical Functions,e function, pi function, rand function, false function, true mathematical function in Qlik Sense\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Qlik Sense Mathematical Functions,e function, pi function, rand function, false function, true mathematical function in Qlik Sense\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-09T10:44:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true - DataFlair","description":"Qlik Sense Mathematical Functions,e function, pi function, rand function, false function, true mathematical function in Qlik Sense","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/","og_locale":"en_US","og_type":"article","og_title":"Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true - DataFlair","og_description":"Qlik Sense Mathematical Functions,e function, pi function, rand function, false function, true mathematical function in Qlik Sense","og_url":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-11-09T10:44:27+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Qlik Sense Mathematical Functions &#8211; e, pi, rand, false &amp; true","datePublished":"2018-11-09T10:44:27+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/"},"wordCount":560,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg","keywords":["Mathematical Function in Qlik Sense","Qlik Sense e function","Qlik Sense false function","Qlik Sense Mathematical Function","Qlik Sense pi function","Qlik Sense rand function","Qlik Sense True function"],"articleSection":["Qlik Sense Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/","url":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/","name":"Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg","datePublished":"2018-11-09T10:44:27+00:00","description":"Qlik Sense Mathematical Functions,e function, pi function, rand function, false function, true mathematical function in Qlik Sense","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/11\/Qlik-Sense-Mathematical-Functions.jpg","width":1200,"height":628,"caption":"Qlik Sense Mathematical Functions - e, pi, rand, false &amp; true"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/qlik-sense-mathematical-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Qlik Sense Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/qlik-sense-tutorials\/"},{"@type":"ListItem","position":3,"name":"Qlik Sense Mathematical Functions &#8211; e, pi, rand, false &amp; true"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/40311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=40311"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/40311\/revisions"}],"predecessor-version":[{"id":41719,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/40311\/revisions\/41719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/40558"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=40311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=40311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=40311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}