How to Use Extend to Add Calculated Columns in Kusto | Kusto Query Language Tutorial (KQL)

Topic: How to Use Extend to Add Calculated Columns in Kusto Query Language.

In this article, we are going to learn about the extend operator that creates a calculated columns and append them to the result set. Azure Data Explorer is a fast, fully managed data analytics service for real-time analysis on large volumes of data streaming from applications, websites, IoT devices, and more. Ask questions and iteratively explore data on the fly to improve products, enhance customer experiences, monitor devices, and boost operations. Quickly identify patterns, anomalies, and trends in your data.

 // extend operator : Create calculated columns and append them to the result set.  
 .clear table TotalSale data   
 .create table TotalSale (  
   id: int   
   ,SalePersonFName: string  
   ,SalePersonLName : string  
   ,ProductName : string  
   ,ItemsSold : int  
   ,SoldPrice :real  
   ,SoldDate: date  
   ,City : string  
   ,State : string  
   ,Country : string  
   ,Region : string  

      //Insert data  
       .ingest inline into table TotalSale <|  
 11,Tamara,Tony,Cell Phone,2,1200,2015-03-03,Frankfurt,Hesse,Germany,Europe  
 11,Tamara,Tony,Cell Phone,2,1200,2015-03-03,Frankfurt,Hesse,Germany,Europe  
 3,Christy,Ladson,TV,3,1600,2015-04-02,High Point,NC,USA,North America  
 7,Chirag,Patel,Cell Phone,5,1500,2015-06-23,AhmadAbad,Gujrat,India,Asia  
 2,M,Raza,Cell Phone,2,800,2015-07-15,Charlotte,NC,USA,North America  
 4,John,Rivers,Laptop,5,2400,2014-03-09,Jersey City,NJ,USA,North America  
 1,Aamir,Shahzad,TV,1,700,2015-07-15,Charlotte,NC,USA,North America  
 12,aamir,shahzad,TV,1,7000,2015-07-15,Charlotte,NC,USA,North America  

 // extend operator : Create calculated columns and append them to the result set.  
 //get all columns with data from table  

 //add a calculated columns  
 | extend fullname=strcat(SalePersonLName,' ',SalePersonLName),DayofYear=dayofyear(SoldDate)  

 // extend the columns to result set  
 | project id,SalePersonFName,SalePersonLName,ItemsSold, SoldDate  
 | extend fullname=strcat(SalePersonLName,' ',SalePersonLName),DayofYear=dayofyear(SoldDate)  

Video Demo: How to Use Extend to Add Calculated Columns in Kusto | Kusto Query Language Tutorial (KQL)


  1. my name is Albert Roy , and I am a student. Just finished reading this article. Excellent Accept my gratitude for your post. How to Use Extend to Add Calculated Columns in Kusto (KQL). you describe this post-January color scheme. I sincerely hope that these suggestions end up being beneficial to you in the future. Excellent post with all the necessary details. But right now, I'm looking for the top writing a report help service for my work. The website is, in my opinion, educative. Students should use it as support, in my opinion. And right now, complete your assignment.

  2. If you need an essay done but are diesel gas stations near me now
    unsure of your ability to do it, you may go through the profiles of the people who are offered by reviews.

  3. Our Assignment Help in Qatar will deliver you the best quality assignments at an affordable rate. Our team of experts aims to cater to the best solutions in almost every field with assignment help in Qatar. Our customized and well-formatted solutions will enhance your score level without putting heavy weight on your budget. Some reasons for being unable to prepare assignments with quality solutions are a lack of time management skills, lack of guidance, not having in-depth subject understanding, and improper knowledge of formatting style. The benefits of using Gradespire services are discounts and offers, economical prices, expert solutions, privacy policy, well-researched and analyzed assignments.

  4. This article explains how to add calculated columns to Kusto using extend. At the HR assignment writing company, I work as a professional writer. It is teaching me new things and increasing my knowledge.