Power BI Complete Course 2026 - Beginner to Expert in 20 Hours (Free Tutorial) — Transcript
Full transcript
- 0:00Hello friends hope you had a really good
- 0:03start of 2025 I Amit chandak a Microsoft
- 0:07data platform MVP and a powerb community
- 0:09super user I also chief altic officer at
- 0:13caner I welcome you to this video learn
- 0:16powerbi yes it is a full video of 20
- 0:20hours in 2023 I released a similar video
- 0:24of 11 hours and 30 minutes I'm taking a
- 0:28next step to bring you even bigger and
- 0:31better content we are going to cover
- 0:33visualization Texs and power query in
- 0:36details I'm hopeful this video will help
- 0:39you to enhance your journey of power bi
- 0:44in a great way start this journey with
- 0:47me and I will take you through a Content
- 0:50which consists of more than 140 plus
- 0:53videos which has been recorded and
- 0:56edited throughout
- 0:582024 you will find some of the uis has
- 1:01changed over a period of time but I've
- 1:04taken care that I have Incorporated the
- 1:07new UI at the right place so let's begin
- 1:11this journey learn
- 1:16powerbi and data analytics industry is
- 1:19continue to grow and it creates lot of
- 1:22opportunities for business intelligence
- 1:25data analytics and visualization tools
- 1:28powerbi is leading the that weave today
- 1:31with the emergence of Microsoft fabric
- 1:33it has taken next step in that Journey
- 1:38so learning powerbi as a skill can be
- 1:41really useful and I have done an attempt
- 1:44to make sure that I cover all those
- 1:47aspect in this particular video I would
- 1:50also like to take this opportunity to
- 1:53thank each and everyone of you who have
- 1:55watched the previous video where over
- 1:57last two years there were more than
- 2:00200,000 views and 4,000 like you have
- 2:04really appreciate that video you have
- 2:06asked many question on that video and
- 2:09based on that I have created many other
- 2:12videos the channel now have more than
- 2:15850 videos and you can take full
- 2:18advantage of those videos more than 500
- 2:21videos are only on powerbi and there are
- 2:24more than 80 plus videos on Microsoft
- 2:26fabric including English and Hindi so my
- 2:30advice would be to watch all these other
- 2:33videos other than this course to take
- 2:36the full advantage of powerb there are
- 2:39detailed videos on each and every
- 2:41function of Dex and power query on my
- 2:45channel and you should also watch other
- 2:48than watching this full course I wish
- 2:50you a very successful power ba Journey
- 2:54with this video and hoping that this
- 2:57video will make your powerbi journey
- 2:59really easy in case you have some
- 3:02questions you can ask them in comments
- 3:04but with that let's begin our journey in
- 3:0720125 to learn powerbi and take a next
- 3:12step in your data analytics career so
- 3:15friends the question arise why powerbi
- 3:17powerbi is leading business intelligence
- 3:19Analytics tool and for last many years
- 3:23every business intelligence analytics
- 3:25industry reports put powerbi as the top
- 3:28leading tool in terms of feature and
- 3:31capabilities with the launch of
- 3:32Microsoft fabric an integrated
- 3:35environment where powerbi is also part
- 3:37of it which has capabilities of having
- 3:40lake houses warehouses realtime Antics
- 3:43all together on integrated platform as a
- 3:46powerbi developer you have a leap to
- 3:49take my recommendation is with the help
- 3:52of this video you learn powerbi and then
- 3:54take the advantage of various other
- 3:56videos on my channel to learn Microsoft
- 3:58fabric 202 4 is expected to be the era
- 4:01of Microsoft Fabric and you have a
- 4:04pivotal role to play as a powerbi
- 4:06developer and enhancing your skill to
- 4:08the next level to the Microsoft fabric
- 4:10becoming a Microsoft fabric developer so
- 4:12let's start together this exciting
- 4:15journey of learning powerbi taking the
- 4:18analytics experience to the next level
- 4:20for the end user and then take it to the
- 4:23next level using Microsoft
- 4:27fabric so let's understand what is is
- 4:29powerbi powerbi is a business
- 4:32intelligence and analytics service that
- 4:35delivers Insight from analyzing the data
- 4:37powerb is a collection of software
- 4:39Services app and connectors that work
- 4:42together to turn your unrelated sources
- 4:45of data into coherent visually immersive
- 4:48and interactive Insight it can share
- 4:50those insights through data
- 4:51visualization which can make up reports
- 4:54and dashboards to enable the fast
- 4:56informed decision power ba scales across
- 4:59and organization and it has built in
- 5:01governance security allowing business to
- 5:04focus on using data more than managing
- 5:07it in the today's datadriven world
- 5:09powerbi stands out as a pivotal tool in
- 5:13the data visualization and business
- 5:15intelligence it is not just presenting
- 5:17the data it's about unlocking the
- 5:19insights and for decision making so
- 5:21let's begin this interesting journey in
- 5:23the world of powerbi so whether you're
- 5:25beginner or eager to dive into the data
- 5:28visualization or a professional looking
- 5:30to update your skills this video is a
- 5:32gateway mastering powerb together let's
- 5:35transform the way we understand the
- 5:38data so the first term is data itself so
- 5:42data is a set of values of qualitative
- 5:45or quantitive variable means something
- 5:47which we want to measure against
- 5:49something which we want to measure and
- 5:50it's not only about data it's about
- 5:52quality data see in business
- 5:54intelligence and data analytics we use a
- 5:56term garbage in garbage out what does
- 5:58that means if you if you don't have
- 6:00quality data you'll not be able to get
- 6:01quality analysis and that's really
- 6:03important here and that might require
- 6:06transformation and powerbi is capable of
- 6:09doing the transformation then we have a
- 6:12term data analytics data analytics is
- 6:14the process of examining and analyzing
- 6:17the data sets in order to draw insights
- 6:19conclusion and make data driven decision
- 6:21making so we are talking about data
- 6:23driven decision making it involves using
- 6:26statistical and analytical techniques to
- 6:28extract and interpret relevant
- 6:30information from data and can be applied
- 6:33in wide range of fields and industries
- 6:35so basically we are driving out the
- 6:37information from the data we are taking
- 6:39decisions which will drive our
- 6:40businesses we have another term which is
- 6:43business intelligence and business
- 6:44intelligence refers to decision making
- 6:46now according to o.com the term business
- 6:48intelligence bi refers to the technology
- 6:51application and practice for collection
- 6:54integration analysis and presentation of
- 6:56business information the purpose of
- 6:58business intelligence is to support B
- 7:00better decision making now here we are
- 7:02talking about collection of data
- 7:04integration of data analysis of data and
- 7:06presentation of data power ba can do all
- 7:08four means it can collect data from
- 7:10different sources it can integrate them
- 7:11it can analyze and present also it could
- 7:14happen that most of the time this
- 7:15collection and integration is happening
- 7:16outside maybe in a data warehouse and
- 7:18Analysis and presentation is going to
- 7:20happen in powerbi now data could be
- 7:24structured semi- structured or
- 7:25unstructured most of the time we are
- 7:26going to deal with the structure data
- 7:28and this structure data can come from
- 7:30rdbms and sometime it may be also
- 7:32available in Excel files or csvs where
- 7:36targets and budgets are commonly kept
- 7:39now ideally we should move them into the
- 7:41data warehouse or a common storage so
- 7:43that they can be managed properly but in
- 7:46any project you will not have 100% data
- 7:49coming from rdbm you may have some data
- 7:51coming outside now semi- structure data
- 7:53and un structure data would be dealt
- 7:55little bit outside the powerbi or maybe
- 7:58converted into some useful information
- 8:00or data and then maybe U given in power
- 8:03ba for analysis now you will come across
- 8:06the term tables and fact now table is
- 8:09basically a collection of related data
- 8:11entries and it consists of numerous
- 8:13columns and rows so there are rows and
- 8:14columns and it contains data now table
- 8:17could be a fact table or table could be
- 8:18a dimension table fact table is the
- 8:20table which containing the majors or the
- 8:22facts facts means truth about your
- 8:23organization my sales my purchase my
- 8:26inventory number of employees their
- 8:28salary all these are the facts of your
- 8:30organization they are the truth about
- 8:32your organization that are used to
- 8:33analyze data as well as Dimension Keys
- 8:36against which they need to be analy so
- 8:37it will also contain the dimension Keys
- 8:39against which you need to analyze this
- 8:41data you will also hear this term major
- 8:43matrices kpi and then you will also hear
- 8:47the term parameter filter Dimension so
- 8:49what is measor so something which you
- 8:50want to measure measure for your success
- 8:52of your organization and then you will
- 8:54measure it against something against
- 8:56time against geography against customer
- 8:58against vendor against items articles so
- 9:01you say I have done good sales sales is
- 9:03a major or matrices what is what do you
- 9:05mean by good have you done good against
- 9:07your competitor have you done good
- 9:09against last year have you done good
- 9:11because your margin has increased all
- 9:13these questions are there and such
- 9:15questions we will be trying to answer
- 9:17using business intelligence and data
- 9:18analytics so these are the terms you
- 9:20should be hearing time and again then
- 9:23there are two kind of matrices lead
- 9:24matrices and lag matrices lead mattress
- 9:27is something which can indicate what is
- 9:28going to happen lag is something which
- 9:31is actually analyzing what has already
- 9:33had happened sales is basically
- 9:34something already has happened but is
- 9:36sales going to decrease how you are
- 9:37going to know so it's basically size of
- 9:39your funnel how many opportunities or
- 9:40leads you have if your leads are
- 9:42decreasing your opportunities are
- 9:43decreasing at 1 F day your sales will
- 9:46decrease so there are lead indicators
- 9:48and that is how the prediction happens
- 9:50so somebody's saying okay downtime is
- 9:52coming or how this is coming because
- 9:53they look at the lead in mates and once
- 9:56lead and mat is going down we know that
- 9:58the lag mattress is will follow it soon
- 10:00these kind of metrices you should also
- 10:02remember in your analysis what you plan
- 10:04to analyze now you will hear about
- 10:06relational schema star schema and
- 10:08snowflake schema and star schema is very
- 10:11common term which you will hear while
- 10:12you are doing your analysis now without
- 10:14going into lot of details of this one
- 10:16let me explain you one quick example in
- 10:18typical in a relational schema what
- 10:20happens we try to store information in
- 10:22such a manner that it doesn't repeat at
- 10:25all so let's say if I store state in a
- 10:27city table what would happen the state
- 10:29name will repeat for many cities so
- 10:31instead of storing the state name what
- 10:33I'll do I'll create a state ID and state
- 10:35name in a separate table and I'll only
- 10:37store the state ID in the city table so
- 10:40if the state name changes or updated I'm
- 10:42only updating one record so in such a
- 10:44manner we create a set of table using a
- 10:47process called normalization and
- 10:49relational schema or the oltp system
- 10:52online transaction processing system
- 10:54which are our base core erps or CRM they
- 10:57typically follow relational schema back
- 10:59because of which they are able to handle
- 11:01thousands of transaction or millions of
- 11:04transaction in a day so this is
- 11:05typically how a relational schema looks
- 11:07like you might have a sales table sales
- 11:09might have a detail sales might join to
- 11:11city and state it might join with time
- 11:14and time may be further classified as
- 11:16date month quarter year there could be
- 11:18Separate Tables or one table it could be
- 11:20joining with customer customer can join
- 11:22further with customer group CS detail
- 11:24can join with item item can join with
- 11:26brand category subcategory and all so
- 11:27many tables could be there what what
- 11:29happens is then this is relational
- 11:31schema we have a dimensional schema
- 11:32there are two dimensional schema which
- 11:34are pretty common one is Snowflake and
- 11:35second one is star schema now what
- 11:37happens in case of snowflake schema you
- 11:39can still have subdimensions like I
- 11:41combined sales and sale detail here I
- 11:43combined also customer and customer
- 11:44group but I still have item and brand
- 11:46means item table is there and it's also
- 11:48connected to Brand you can also have
- 11:49city and state means still separate out
- 11:51table time is one combined it maybe
- 11:53previously also combined I also combined
- 11:55but when you come to Star schema what
- 11:57happens is that you do do not have any
- 12:00join between Dimensions also so no fact
- 12:02join with other fact no Dimension join
- 12:04with other dimension and the distance of
- 12:07information is one so I want to know
- 12:09brand wise sales item wise sales the
- 12:11distance is one one joint I want to know
- 12:13statewise sale one joint I will get
- 12:15State I want to know customer group wise
- 12:16one join with customer table I'll get
- 12:18that information so I can have many join
- 12:20but all these joins are just one step
- 12:23apart that's what the star schema and in
- 12:25that one fact will not join with fact
- 12:27Dimension will not join with Dimension
- 12:28so these are basic few concept which
- 12:30should be aware and you will hear all
- 12:32these terms time and again so let's
- 12:34begin this journey of learning powerbi
- 12:36to start this journey let's first
- 12:38understand Microsoft powerb ecosystem
- 12:40this ecosystem does not include
- 12:42Microsoft fabric ecosystem I have
- 12:45knowingly excluded that which we can
- 12:47discuss in a separate video of Microsoft
- 12:50fabric you can watch the introduction
- 12:52videos in Hindi and English on my
- 12:54channel explaining the various
- 12:57components that Microsoft fabric
- 12:59provides you so the Journey of any
- 13:00business intelligence analytics tools
- 13:02start with the sources so what kind of
- 13:04sources we can have for powerbi the
- 13:06usual sources are external sources like
- 13:08Excel databases Etc then we will discuss
- 13:12later on about these remaining two
- 13:14sources you import that into the powerbi
- 13:16desktop for databases we do have option
- 13:18for direct query what is Import in case
- 13:21of import the data would be residing in
- 13:23the powerbi and we will be creating the
- 13:26model into the powerbi and we will be
- 13:28creating measures and would be analyzing
- 13:31the data also so powerbi own meta as
- 13:34well as data in case of direct query we
- 13:37create the connection we do not import
- 13:39the data but we create the metadata we
- 13:42create the model we create the
- 13:45definitions we create the relationship
- 13:47we create measures we create
- 13:49visualization finally analyze so power
- 13:52VI will have model power VA will have
- 13:54visualization but will not have data
- 13:56that is direct query mode now once you
- 13:58create your power bi report on the
- 14:00desktop with help of transformation
- 14:02using power query and measures and
- 14:06calculation using Dex and finally
- 14:08creating visualization using powerbi you
- 14:11can publish this file on powerbi
- 14:17service powerbi service is the ecosystem
- 14:21where you are going to share this report
- 14:23and do the collaboration with other user
- 14:25powerb desktop is a development tool it
- 14:28does not have security you can create
- 14:30roles to apply the security on powerbi
- 14:33service but unlike Excel where it is
- 14:36password protected that's not powerb
- 14:38desktop powerb desktop all the
- 14:40information is available you can
- 14:42restrict what you wanted to load but the
- 14:44entire information is available so once
- 14:46you are done with your development on
- 14:48powerb desktop you publish it orto the
- 14:50powerbi service now if you are using on
- 14:52promise sources you need on promise
- 14:55Gateway way that include on promise
- 14:56databases like SQL server or Excel
- 14:59sheets you need on promise Gateway if
- 15:00your sources are Cloud you don't need on
- 15:03promise Gateway they can directly be
- 15:04refreshed on service remember in powerbi
- 15:07desktop you have a refresh button to
- 15:09refresh the data on the service we can
- 15:11schedule the data set refresh
- 15:13automatically to happen 8 times for pro
- 15:1648 times for premium users when when it
- 15:19goes to powerbi service the report which
- 15:23you publish the PBX which we have on the
- 15:25desktop it get divided into two parts
- 15:27one is data set or what we call a
- 15:30semantic model and another one is report
- 15:33the data set or what we call a semantic
- 15:35model it can also act as a source again
- 15:38and you can create report paginated
- 15:41report and dashboard on top of it you
- 15:44can take it back to the powerbi desktop
- 15:47and again create a report which you can
- 15:48publish you can re use it on the report
- 15:51developer paginated reports can be
- 15:54created using this data set and that can
- 15:56be published again on powerbi service
- 15:59known as paginated report so it means
- 16:01once you create the data set you will be
- 16:03able to use that it again and the
- 16:06connection this time we are going to
- 16:07create when we use the data set is known
- 16:09as live connection reports will have a
- 16:12live Connection in this case you can
- 16:14finally create a powerbi app and
- 16:16distribute the content and this is
- 16:18really helpful when you want to
- 16:20distribute it to the large number of
- 16:22user you can combine multiple reports
- 16:24along with the dashboards and share it
- 16:27with user you can create create multiple
- 16:29audiences and share different set of
- 16:31reports with them now let's talk a
- 16:33little bit about two components of the
- 16:35powerb desktop so one of the component
- 16:37of the powerb desktop was power query
- 16:39power query is used for data preparation
- 16:41data cleaning and data transformation
- 16:43Dex is used for creating complex measure
- 16:47calculations which help you to finally
- 16:49create the
- 16:53analysis so what happen is in power
- 16:56query whatever you transformation you
- 16:58create remain with that file but what
- 17:00happens if we have to do same kind of
- 17:02transformation again and again how do we
- 17:04keep its record across various users or
- 17:08various files so to address that power
- 17:10ba has come up with the online version
- 17:12of power query and that is known as data
- 17:14flow in powerbi world we use data flow
- 17:17gen one or data flow in Microsoft Fabric
- 17:20World we use the next version of data
- 17:22flow which is known as data flow Gen 2
- 17:24data flow Gen 2 is the online version of
- 17:27the power query and you can use it for
- 17:30data preparation data cleaning and data
- 17:32transformation now data flow Gen 2
- 17:34stores the data but it cannot create a
- 17:37data set so you have to bring it back to
- 17:39the powerbi desktop and then create your
- 17:41data set after you create the data set
- 17:44without creating a visualization you can
- 17:46publish that data set you can use that
- 17:48data set back to create the
- 17:49visualization and this is one of the
- 17:51pattern we use now in the data flow we
- 17:53may not have all the heavy tables
- 17:56Dimensions or the small table which
- 17:58which have lot of transformation can be
- 18:00part of data flow so have the dimension
- 18:02table or small table having lot of
- 18:04transformation in the data flow take it
- 18:06to the powerb desktop merge it with
- 18:08other fact tables create relationship
- 18:11create measures create all the complex
- 18:13calculation which you require without
- 18:15creating a visualization publish it and
- 18:17create a powerb data set or what we call
- 18:20a semantic model so the term which we
- 18:23are using now for few months is semantic
- 18:26model create your semantic model and use
- 18:29that in the live connection on powerbi
- 18:31desktop or in powerbi service itself you
- 18:33can create the report and visualization
- 18:35same can be used in power P now now you
- 18:38would have understood why I kept PBI
- 18:40data flow
- 18:44here then what is this one Lake and what
- 18:47is this almost very similar icon what
- 18:50happens is basically in Microsoft fabric
- 18:53we have a direct Lake connector in
- 18:54Microsoft fabric most of the things
- 18:57resides on Lake where whether it is the
- 18:59structure data or unstructured data we
- 19:01save it using lakehouses or warehouses
- 19:04and lak houses and warehouses create a
- 19:06data set or what we call a semantic
- 19:09model the data set or what we call a
- 19:12semantic model directly gives you data
- 19:15from lake houses and warehouses and it
- 19:17doesn't need a direct query it is a best
- 19:20possible merge of import and direct
- 19:22query so there is a new connection type
- 19:25which is direct Lake connection type so
- 19:27when you connect to the one L Lake you
- 19:29get a new kind of connection which is a
- 19:31direct Lake connection semantic model
- 19:33created on the lake houses or warehouses
- 19:36or the custom semantic models created on
- 19:39lake houses or Warehouse so in this
- 19:40manner you can use the direct Lake
- 19:43connection and you can now create the
- 19:45reports using the direct Lake connection
- 19:47and then publish them it again to the
- 19:48power
- 19:49ba there is one different version of
- 19:52powerb which is known as powerbi report
- 19:55server which can be installed on premise
- 19:57there is a special IAL version of
- 19:59powerbi desktop available for that that
- 20:01is known as powerbi desktop optimized
- 20:04for report it is usually 3 to 6 month
- 20:06behind from the current powerbi and it
- 20:08also does not include preview features
- 20:10there's a whole list of comparison what
- 20:12you don't get available on the Microsoft
- 20:14side powerbi desktop or powerbi we get
- 20:1811 releases per year other than January
- 20:22every month we will have one release so
- 20:24your powerb desktop keep on updating
- 20:26every month but that's not true with
- 20:28reports or we have only three releases
- 20:30in a year and because powerbi does 11
- 20:33releases it's really important that you
- 20:36keep eye on blog. powerbi.com and always
- 20:41keep on monitoring the latest update
- 20:44because feature keep on changing fast
- 20:46one of the reason of creating this video
- 20:49again that we have got quite a few new
- 20:52features and there is so many changes in
- 20:54the UI that it could not have been done
- 20:57without creating a new new video and
- 20:59that is why we again created this entire
- 21:02video for you to learn the powerbi on
- 21:05the latest version which has been
- 21:07released in December
- 21:102023 so now let us understand the
- 21:13process of creating a powerbi login one
- 21:17of the best method is that admin of the
- 21:20tenant should use admin.
- 21:23microsoft.com if you have your own a
- 21:26registered domain for that domain you
- 21:29should go ahead and register yourself to
- 21:32admin.
- 21:34microsoft.com and once an organization
- 21:36able to register and admin on admin.
- 21:40microsoft.com you will be able to create
- 21:43users and able to assign the licenses to
- 21:46them so let me go ahead and showcase you
- 21:50how you are going to do that on admin.
- 21:53microsoft.com so first of all log to
- 21:56admin. microsoft.com
- 21:59I'm assuming you already have the admin.
- 22:02microsoft.com access and you are admin
- 22:05if not then this step need to be
- 22:07executed by your admin the admin need to
- 22:10go and register a new user and under the
- 22:15user management either you will click on
- 22:17the users active users and you should
- 22:19get that option add users or on the
- 22:21homepage you will also get it so click
- 22:23here on add a
- 22:27user you will get let a popup here you
- 22:29start giving details of the user
- 22:33Amit
- 22:36Amit will display name let me give a
- 22:38username here Amit
- 22:40C so I'm creating a new user on the
- 22:43Microsoft portal usually you can share
- 22:47this password to another email ID which
- 22:49could be the email ID of that person the
- 22:51personal email ID or the manager's email
- 22:53ID or the admin's email ID then go ahead
- 22:56and press next button
- 22:59and in the next button you can assign
- 23:00the licenses right now what I'm going to
- 23:03do is I'm not going to assign the
- 23:04license to this particular user I have
- 23:08the only thing which I can assign here
- 23:10is the Microsoft fabric free licenses I
- 23:13don't have any pro licenses to assign to
- 23:15it usually the organizations will have
- 23:18Pro
- 23:19licenses in my case in this tenant I
- 23:22don't have Pro licenses so I'll not be
- 23:23able to assign so I'll say create user
- 23:26without product licenses and press on
- 23:30next then it will ask for additional
- 23:32options which I'm going to
- 23:34skip these are the details anything I
- 23:37want to edit right now I can edit it and
- 23:39finish adding post that this user need
- 23:42to log in and change its password right
- 23:45now it is showing us the password which
- 23:47is this user is going to
- 23:51get so right now it is showing the
- 23:53details along with the password which
- 23:55this user is going to get for the first
- 23:57time this user need to log to app.
- 24:01powerbi.com or any other Microsoft
- 24:03application and reset its password if
- 24:06you have enabled two Factor
- 24:07authentication that also need to be
- 24:09enabled and by executing this exercise
- 24:12on app. powerbi.com the user will be
- 24:16able to claim the Microsoft fabric free
- 24:19license or the powerb free
- 24:21license if your organization has not
- 24:24disabled
- 24:25that I'm going to show you the next step
- 24:28how user in this case when we have not
- 24:31assigned him the license we go ahead
- 24:33reset its password and going to get the
- 24:36Microsoft fabric free license which is
- 24:39available for all the users in this
- 24:42particular
- 24:43tenant admin has registered your login
- 24:48and now the time has come to log to app.
- 24:52powerbi.com in the first login it may
- 24:56ask you to reset the password as as well
- 24:58as set up the two Factor authentication
- 25:01if that is the requirement from your
- 25:04tenant side or from your organization s
- 25:07so let's jump onto the app. powerbi.com
- 25:11open app. powerbi.com
- 25:16once it is open enter your email ID
- 25:20which has been provided to you by your
- 25:22admin once you give that email ID post
- 25:26that you can click on submit it will
- 25:29take you to the next page and ask for
- 25:31the password you have to give the
- 25:33password which admin has provided to
- 25:38you enter the password and click on sign
- 25:46in after you enter Because admin has set
- 25:50up your account and you are loging for
- 25:51the first time you need to reset the
- 25:54password by giving the new password and
- 25:57click on sign in
- 25:58then press next on the next screen now
- 26:02you need to set up the Microsoft
- 26:04authenticator or any other authenticator
- 26:06which you want click on that and
- 26:10next then you need to scan the code and
- 26:14you will be able to set up your
- 26:17authenticator provide the six-digit code
- 26:20from your authenticator here and then
- 26:23again press
- 26:26next your authentic is successful once
- 26:30the authentication is successful you
- 26:31should be able to sign in to app.
- 26:34powerbi.com once you log in you should
- 26:38be able to see a free account for you so
- 26:42authentication is successful let's go
- 26:44onto the right top the user details
- 26:47click on the user icon you should be
- 26:49able to see your email ID and the type
- 26:53of license what you have
- 26:55here here you can see I have got a free
- 26:59account and Microsoft fabric trial is
- 27:02also available for me in this manner you
- 27:05will be able to set up your account so
- 27:09now let's understand powerbi licenses
- 27:12typically powerbi licenses can be
- 27:14divided into three
- 27:16categories free license Pro license and
- 27:20premium license premium has two part PPU
- 27:23and premium capacity with the emergence
- 27:25of Microsoft fabric you have more
- 27:29options to know the information about
- 27:32powerbi licenses what you can do is
- 27:34search for Power bi licenses on the web
- 27:40and you will get the product pricing for
- 27:42Microsoft
- 27:43powerbi now when you go to the pricing
- 27:47depending on the country which you are
- 27:48in you can see the
- 27:49pricing and what I can do is in instead
- 27:53of in I can make itus
- 27:58so now I got the US pricing so depending
- 28:00on Country you can change it and get the
- 28:02pricing so first of all Microsoft
- 28:06powerbi in free fabric account you have
- 28:09a Microsoft fabric free account there
- 28:11you can get the free Microsoft powerbi
- 28:15Microsoft powerbi desktop is already
- 28:16free you have you can create a powerbi
- 28:19free account Fabric and you can get it
- 28:22then we have the powerbi pro license
- 28:24which is basically the user based
- 28:26license which is $10 per user per
- 28:29month and you can publish and share
- 28:32report powerbi Pro is included in
- 28:34Microsoft 365 E5 also and you can buy it
- 28:38using the credit card also then we have
- 28:40powerbi premium per user premium per
- 28:43user include the features that available
- 28:45in powerbi Pro additional feature in the
- 28:48powerbi premium there are few premium
- 28:51capacity features which are available
- 28:52here and you can buy it it is $20 per
- 28:55user per month so double the cost now
- 28:58when you further go
- 29:01down it talks about the capacity
- 29:04basically because of the merge with
- 29:05Microsoft fabric this is power be
- 29:07premium capacity can also be used for
- 29:09fabric so that is why Microsoft fabric
- 29:11power be premium capacity SKU the skus
- 29:14which start with P1 so those SKU you
- 29:17have do
- 29:194,500
- 29:224,995 which is P1 capacity include all
- 29:26the features available in power gain
- 29:28access to rest of the Microsoft fabric
- 29:30workloads as a unified product use Auto
- 29:33scale to respond to occasional unplanned
- 29:35outage and spike in the capacity by
- 29:38automatically adding one Vore at a time
- 29:41per hour so if you want to Auto scale
- 29:43then there are separate charges now when
- 29:45you go to Microsoft fabric capacity
- 29:47which is f64 equivalent of P1 you get
- 29:51licensed to your organization access for
- 29:53Microsoft Fabric in unified product
- 29:55experience that uses the same compute
- 29:58capacity and
- 30:00storage smaller entry level start from
- 30:03F2 so the capacity start from F2 in
- 30:05powerbi the premium capacity only start
- 30:07with one which is equivalent of f64 but
- 30:09here it start from F2 Microsoft as your
- 30:12consumption commitment
- 30:14eligible and gain access to full
- 30:17Microsoft fabric workload through
- 30:18unified product experience
- 30:20capacity that is also there then we have
- 30:25per month f64 SKU P1 equivalent
- 30:30Microsoft capacity pay as you go this is
- 30:33pay as you go this is very similar to
- 30:35the f64 but you can shut down this
- 30:38capacity pay as you go and this is
- 30:41basically you kind of hourly capacity
- 30:44which you again these kind of capacities
- 30:45start with F2 so F2 F4 f8 F32 f64 these
- 30:50kind of capacities are available then
- 30:53when you further go down it talks about
- 30:55E5 powerb desktop which is free you it's
- 30:58available Microsoft powerbi
- 31:02for mobile powerbi embedded when you
- 31:06further go down it compares the feature
- 31:08of powerbi with powerbi free account Pro
- 31:12account premium account and premium per
- 31:14capacity if you go down
- 31:17here look at
- 31:19this
- 31:21comparison so create reports with
- 31:24desktop available everywhere publish
- 31:26report and share collaboration
- 31:28see you can't do the collaboration
- 31:30without having any license so you so you
- 31:33at least need Pro license for
- 31:34collaboration then Advanced Ai and data
- 31:37flow data M xmla endpoints are only
- 31:39available in the premium feature all
- 31:41user can consume bi without paid per
- 31:44user license is only available with
- 31:46premium capacity P1 or f64 onwards so
- 31:51viewers viewers don't need license from
- 31:55those capacities onward
- 31:58access to all Microsoft fabric workload
- 32:01including data factory data engineering
- 32:04data
- 32:04warehousing data science realtime
- 32:07analytics and data activator is only
- 32:10available with P1 capacity or f64
- 32:13capacity premium capacity memory size
- 32:17limit for you will very get very small
- 32:20memory size limit for free account 1 GB
- 32:22for pro 100 GB for PPU and 400 GB for P1
- 32:26premium capacity refresh rates for
- 32:29powerbi data sets 8 per day for pro 48
- 32:32per day for PPU and 48 per day for
- 32:34premium
- 32:35capacity maximum
- 32:38storage powerbi native storage when you
- 32:40are using powerbi then this is
- 32:42applicable 10gb PPU 100 TB and premium
- 32:46capacity P1 100 TB data security
- 32:49encryption available everywhere one L
- 32:51Storage one L B CDR storage one Lake
- 32:54cache one networking only available with
- 32:57premium prium capacity or Microsoft
- 32:59fabric capacities there are additional
- 33:01notes and comments I will also provide
- 33:04the link of this one into the
- 33:07description so those who have looked at
- 33:10the older pricing now you will see few
- 33:13difference in the pricing and these
- 33:14differences have came because of the
- 33:16availability of Microsoft fabric and
- 33:18fabric capacities previously without
- 33:20having a premium capacity you cannot buy
- 33:22a capacity that's not true in case of
- 33:24Microsoft Fabric World you can buy a F2
- 33:27Capac and start with that and you can
- 33:29buy priv Pro licenses and can start
- 33:32using the all the features of Microsoft
- 33:35Fabric and
- 33:37powerbi
- 33:39so now you have lot M options to buy
- 33:42capacity because of Microsoft fabric
- 33:45allows you to to have capacity as low as
- 33:47F2 and the pricing start very low you
- 33:51can check out the prices on Microsoft
- 33:53fabric page for that
- 34:00let's understand various options to
- 34:03install
- 34:04powerbi there are two very common
- 34:07options to install powerbi download and
- 34:10install so you can go to the powerbi
- 34:13site or you can search on the internet
- 34:16download and install
- 34:18it what is the advantage of this you can
- 34:22control the installation version you can
- 34:25decide when to upgrade
- 34:29it is supported on the most of the
- 34:30versions of Windows and you don't need
- 34:34Microsoft store for that so if the
- 34:35Microsoft store is not there you don't
- 34:38need it but what is the
- 34:40disadvantage see powerbi updates
- 34:44almost once in a
- 34:47month if you don't update it is fair
- 34:50chances that you will be lagging behind
- 34:53and sometime I've seen users are as
- 34:55behind as one year and it is is really
- 34:58difficult from that stage to upgrade
- 35:02it you will miss out on the feature and
- 35:05new launches because you continue to
- 35:07work on older version and you might have
- 35:10a better solution available in the newer
- 35:13version which you may miss
- 35:17out the second way to install powerbi is
- 35:20use Microsoft
- 35:21Store you don't require admin privilege
- 35:25for the installer to install this one so
- 35:28if the Microsoft store is enabled you
- 35:31can install
- 35:33it as the power ba releases new versions
- 35:37it will get automatically updated so you
- 35:39will get
- 35:42it what is the disadvantage of this
- 35:44frequent update sometime what happens is
- 35:47when the new release comes in it has its
- 35:49own changes which has come in and some
- 35:52certain things may break because of that
- 35:55all of sudden you will start seeing
- 35:57those those
- 36:00changes now this is a better method
- 36:02because everybody in the organization
- 36:04would be on the same version if you
- 36:06download and install not everybody would
- 36:08be in the same version but yes there are
- 36:12methods where the it can install or push
- 36:17the powerbi version on all the desktop
- 36:20that can also be controlled using it so
- 36:23that is one more method where it can
- 36:25control what version you have and then
- 36:28they can keep the entire organization on
- 36:29the latest
- 36:32version to install powerbi I have opened
- 36:37my browser and in that I have used the
- 36:40search engine and searched for download
- 36:44powerbi after the search I got few
- 36:47results and the first result is the most
- 36:50appropriate result for me which is
- 36:53giving me link for HTTP power p by.
- 37:00microsoft.com us downloads depending on
- 37:03the country and language you can get
- 37:06different links once you click on this
- 37:10link you will get this page which is the
- 37:14powerbi download page scroll down on
- 37:18that and use Advanced download
- 37:24options once you click on the advanced
- 37:27download option you will come to the
- 37:29download page which will allow you to
- 37:32select the language and the download
- 37:36option if you go further down it will
- 37:39let you know which version and when that
- 37:42was release so right now when I'm
- 37:46recording in the latest version is
- 37:48published in December
- 37:512023 and the version is
- 37:562. 1
- 37:5924
- 38:012124 do1
- 38:07052.0 if you further scroll down it will
- 38:11tell you about the uses of powerbi
- 38:14desktop and most importantly is the
- 38:18system requirement what all are
- 38:21supporting operating system and
- 38:24installation instruction
- 38:28you can also search for how to install
- 38:33powerbi and you will get link of this
- 38:38document I will share the link of this
- 38:41document in the
- 38:44description and if you go down it shows
- 38:48you the various options to
- 38:51install the link is also available on
- 38:54app. powerbi.com and we can can install
- 38:58by download and what are the different
- 39:02requirement so I can go back to the
- 39:04download page and download powerbi but
- 39:09this is not the mechanism I'm going to
- 39:12install as I've already told you there's
- 39:15an
- 39:16advantage of installing powerbi using
- 39:20Microsoft store so I'm going to use that
- 39:24but just for your reference I'll click
- 39:26on the download button button and use
- 39:2964bit because I'm working on a 64bit and
- 39:33click on
- 39:35download once it is downloaded you can
- 39:38doubleclick on it and follow the
- 39:42installation
- 39:45instruction powerb desktop download of
- 39:50exe file has been completed and if I
- 39:53click on it it will open the installing
- 39:57a
- 39:59window I can select a language and move
- 40:10forward it will ask for the
- 40:22permission and it will start installing
- 40:26the power B
- 40:30desktop and it will give you the
- 40:34visard so you can press on the next
- 40:38accept the
- 40:39agreement next you can choose a
- 40:44location next and click on install
- 40:48button I'm not going to click on the
- 40:51install button because I'm going to
- 40:53install the version which is provided by
- 40:57Microsoft store so you can install if
- 41:00you want the downloaded version the
- 41:04advantage of this that you can control
- 41:07which version you want it to have on
- 41:10your
- 41:11desktop but in any case make sure that
- 41:15you are not 3 to 6 month behind in the
- 41:22release I'm cancelling it
- 41:31and now let me search for store and open
- 41:37Microsoft
- 41:39store in Microsoft store I will search
- 41:43for
- 41:46powerbi once I search Power bi I get few
- 41:50option
- 41:53powerbi powerbi desktop power powerbi
- 41:57report
- 41:58Builder powerbi is powerbi app which is
- 42:04same as
- 42:05your iPhone app as well as your Android
- 42:10app it is Windows app what we need here
- 42:14is for our learning is power ba desktop
- 42:19and I'll click on
- 42:23get it will start downloading I double
- 42:26clicked on it it I can see the install
- 42:33button I can click on the install button
- 42:37and it will start downloading it and we
- 42:41install powerbi
- 42:43desktop on my Windows
- 42:51machine it may take little bit of
- 42:55time the the advantage of this method is
- 42:59every month Whenever there is a new
- 43:02release powerbi desktop will get
- 43:07automatically
- 43:10update once the installation is finished
- 43:14we will go ahead and start
- 43:18powerbi
- 43:22desktop continuing installing
- 43:25powerbi has has installed and time to
- 43:29open I can click open in the Microsoft
- 43:33store or I can search
- 43:38powerbi and open powerbi
- 43:43Desktop let me click on
- 43:51open power VI desktop is opening up
- 43:55and let let me give you a quick overview
- 43:58of powerbi desktop powerbi desktop has
- 44:03opened and it is showing me welcome
- 44:05screen some of you will not get the
- 44:08welcome screen because you might have
- 44:10enabled powerbi home from options and
- 44:15setting option preview feature that we
- 44:17will discuss in some time when you open
- 44:21the powerb desktop for the first time
- 44:23you'll get this welcome screen the get
- 44:25data option
- 44:27on the left hand side and recent sources
- 44:30you might not have recent sources for
- 44:32the first time but as you start creating
- 44:35content you will be able to see recent
- 44:37sources and also be able to see some of
- 44:40your reports under this left hand side
- 44:43section open other reports so what we
- 44:46will do now is we will cross this screen
- 44:49and enter into the powerbi desktop you
- 44:52can start the Journey of the powerbi
- 44:54desktop by signing in into the
- 44:57appropriate
- 44:59account or you can start your
- 45:02development and when you want to publish
- 45:03you have to sign in now before I tell
- 45:06you how to sign in I would like to show
- 45:10you what all we have on the powerb
- 45:13desktop and some of this what we are
- 45:16seeing is because of the settings I have
- 45:18done on December
- 45:202023 and one of the setting which I have
- 45:23done is available from December 2023 3
- 45:27if you go down into the release notes of
- 45:30December 2023 you will find that we have
- 45:33been offered option when we opened it
- 45:36for the first time is choose the pain
- 45:40Arrangement that works for you you can
- 45:42always customize the setup later by
- 45:46going to settings keep current setup use
- 45:49more classic pan setup I like this
- 45:52classic pain setup where I have the
- 45:54build visual I have the visualization
- 45:56type
- 45:57and I have used update setup now the old
- 46:01setup which was there was because of own
- 46:04object interaction which is still
- 46:06enabled in my case and I will let you
- 46:09know about that
- 46:11setting those who want to follow this
- 46:13video and want to learn I would
- 46:17recommend them to use this option update
- 46:21setup in case they are getting it but I
- 46:23will let you know how you are going to
- 46:26get some more options in your options
- 46:29and setting where you will be enabled
- 46:32these
- 46:35things even if you have not chosen for
- 46:38them for the first time so let me jump
- 46:41back onto the powerbi desktop and give
- 46:44you an overview of powerbi desktop on
- 46:48the powerbi desktop on the top we have
- 46:51this ribbon which contains the menu item
- 46:54for file home which is currently open
- 46:58insert modeling view optimize help and
- 47:02external tools we will use them as we go
- 47:06forward inside the Home tab you can see
- 47:09get data using which you will be able to
- 47:12get the data from various sources and we
- 47:15will start our journey by getting Excel
- 47:19Source at Excel workbook we have a quick
- 47:23connector data Hub again we have quick
- 47:25connector
- 47:27powerbi semantic models data Mars lakeh
- 47:30house warehouse and and kqal databases
- 47:34equal server we can enter the data we
- 47:37can use data verse as a connection and
- 47:39we can use some of the recent
- 47:41connection transform data is there to go
- 47:44to Power query power query is used for
- 47:47transformation of data and then you can
- 47:50alter your data source setting or you
- 47:52can modify some of the data source
- 47:54setting using data source setting option
- 47:56those of you who has enabled on object
- 47:59interaction will get this visualization
- 48:01option but if you don't see this option
- 48:04it means the on object interaction is
- 48:06not enabled when I'll go to the preview
- 48:08feature I'll let you know more about
- 48:12that in the insert tab again you have
- 48:15the visualization insert option along
- 48:18with the more
- 48:21option then you have key influencer
- 48:24decomposition tree narrative page report
- 48:27power app power automate text boxes and
- 48:29Etc all these are the visualization
- 48:32which you can insert into the powerbi
- 48:36desktop or the components which you can
- 48:39insert to make or beautify your powerbi
- 48:43desktop report and once you publish it
- 48:46it will become the powerbi service
- 48:48report under the modeling tab you will
- 48:51get quite a few options right now some
- 48:53of these options are disabled because of
- 48:56the reason we have not added any data
- 49:00once you add data depending
- 49:03on what is available one or more option
- 49:07will be enabled so manage relationship
- 49:09once you want to create the relationship
- 49:11new major once you have the data quick
- 49:13measure to Quick create measures new
- 49:15column to create new calculated column
- 49:17new table is available back because we
- 49:20can start our modeling by creating a DEX
- 49:24table new parameter we will explore this
- 49:27option later to create dynamicity in the
- 49:29content and then we have language and
- 49:31linguistic schema options in the view
- 49:34options you have the theme which is one
- 49:37of the first thing we are going to do
- 49:39then we have the page view and the
- 49:42mobile layout then we have grid lines
- 49:44snap to grid lock objects etc for
- 49:48various options on the top you have
- 49:50various pan options which you can use to
- 49:54enable and disable various panes so like
- 49:57for filter
- 50:00pane I can enable or disable it using
- 50:04the filter
- 50:07pan so as you can see now there is no
- 50:09filter
- 50:12pan I have enabled it again similarly
- 50:14you can see the data pane here the build
- 50:17visual pane here format pan here and
- 50:19then you can customize by clicking here
- 50:22or you can add by checking it here so
- 50:25both of them are going to do the same
- 50:27job let me enable The Bookmark tab I got
- 50:29a bookmark Tab and as you would have
- 50:31noticed the moment I pressed this and I
- 50:34got this I this is also enabled so let
- 50:38me disable let's say format
- 50:42pan so there is no format pan available
- 50:44let me disable the data pan now there is
- 50:46no data pan we got the data pan we got a
- 50:49format pan here now we got a selection
- 50:52pan also and as you can see the
- 50:54selection is enabled here
- 50:58also and to get the selection pan you
- 51:01can click some of the panes will open in
- 51:03a mode where they are not expanded so if
- 51:05they are not expanded you can actually
- 51:07click on the pan here and expand it
- 51:11similarly we have performance analyzer
- 51:13pan again on the top and on the
- 51:18left and once it is open and if it is
- 51:20not visible you can click on the left
- 51:22hand side to check it out performance
- 51:24analyzer help us to analyze the
- 51:26performance of the visual and we can see
- 51:28the timing and we can go ahead and
- 51:31analyze that in a better manner syn
- 51:33slices is another pan which we can open
- 51:36to sync these slices the feature we will
- 51:38explore
- 51:39later I'm collapsing all
- 51:43these and take my focus to the one of
- 51:47the pane on the left hand side which
- 51:49contains the various views the report
- 51:52view which currently we are on then we
- 51:54have the table View model view and
- 51:57recently we also got Dex query view now
- 52:02table view right now would be empty once
- 52:03we have the table and which is which can
- 52:07be seen on the right hand side on the
- 52:09data view we will be able to see some
- 52:11table and data table table view or the
- 52:14data display is dependent on which kind
- 52:16of
- 52:18mode usually all the import mode tables
- 52:20are available in case of pure play
- 52:23direct query and live mode we might not
- 52:25even get the table View then we have the
- 52:27model view where we will be able to see
- 52:29our model and the Dex query view where
- 52:32we will be able to run the Dex query
- 52:35inside the Dex query View and inside the
- 52:38relationship view both views contain
- 52:42something known as model and this will
- 52:45help us in creating calculation
- 52:47groups calculation groups were
- 52:51previously created using external tools
- 52:54like tabular editor
- 52:57but now we can create calculation group
- 52:59inside the powerbi desktop and we will
- 53:03explore that
- 53:06also before we go into the options and
- 53:09setting just let's quickly look at which
- 53:11version of powerb are
- 53:14on I know we have installed a particular
- 53:17version but in case you wanted to check
- 53:19because there are monthly updates
- 53:20ongoing and you want to know which
- 53:21version you are on click on file go to
- 53:25about and you will be able to see which
- 53:28version of powerbi desktop you are
- 53:39on what we are going to do now is we are
- 53:42going to
- 53:44enable the preview features or I'm going
- 53:48to tell you what preview features I have
- 53:50enabled so when we take this journey you
- 53:53are on the same page where I am now now
- 53:56as power beer releases almost One
- 53:59release per month some of these features
- 54:02will change over a period of time from
- 54:04the public preview they will went to GA
- 54:07and there would be no options for that
- 54:09in public preview there might be option
- 54:12in some other setting for enabling and
- 54:13disabling and same way there will be
- 54:17some new features which are coming in
- 54:19which will appear in the preview
- 54:20features so first of all let's go ahead
- 54:23and explore what all we have inside the
- 54:25options and setting an option to go
- 54:28there you need to click on
- 54:30file options and setting
- 54:36options and you will get a popup and in
- 54:40this popup you have options like data
- 54:43load and inside the data load you have
- 54:46type detection like detect type and
- 54:49header of unstructured source according
- 54:52to each file setting means the file
- 54:54setting is going to decide whether we
- 54:56need to do it or not background data
- 54:58allow the data previews to download in
- 55:00the background according to each file
- 55:02setting means it is depending on the
- 55:04file setting parallel data loading when
- 55:07you load the data into powerbi via
- 55:11import mode or direct query mode each
- 55:13table is backed by power query these
- 55:15query are evaluated simultaneously
- 55:17instead of one by one so how much
- 55:19parallelism you want you have enabled
- 55:21that typically we keep this enabled
- 55:25autod date time intelligence but I
- 55:27personally don't prefer it but at least
- 55:29I would like to show you what does that
- 55:31mean so I'm keeping it right now clear
- 55:33cach a data management cache if you want
- 55:35to clear you can clear from here or you
- 55:38can change the size if you have a pretty
- 55:40big file I will recommend you to keep it
- 55:43from 8 to 10 GB like 81 9
- 55:492 Q&A cache for the
- 55:52Q&A and folder artifact cache if you
- 55:55want to clear that then you have option
- 55:58for power query editor display the power
- 56:01query setting Pane and display form up
- 56:04bar is default enabled data import enabl
- 56:07web table interface is enabled data
- 56:10preview I have enabled show white spaces
- 56:12and new line correctors and if you don't
- 56:15enable it you will not see it display
- 56:17preview content using monospaced font is
- 56:20disabled parameters Al always allow
- 56:23parameterization in data source and
- 56:25transformation dialogue as of now it is
- 56:27disabled but we can enable this feature
- 56:30which will allows the
- 56:32parameterization and formula enable M
- 56:35intelligence in the formula bar Advanced
- 56:36editor and custom dialogue and there is
- 56:39the information given here changing this
- 56:41setting will take place when you next
- 56:43time open the powerquery editor so it
- 56:45means some of these settings will not
- 56:47apply as soon as you press okay you have
- 56:50to open the power VI again me you could
- 56:53close it and open it
- 56:54again Direct query sap Hana as relation
- 56:58sources now we are not planning to work
- 57:00on sap Hana so we'll leave it as is
- 57:04scripting right now I'm not updating any
- 57:06R script option also not updating any
- 57:09python script option whatever options
- 57:11you are seeing is because I already have
- 57:14installed python on my system security
- 57:16option this is another important option
- 57:19now in this option there are few
- 57:21important things which you should do
- 57:23here is one of the thing is if you want
- 57:25to enable the argis and field map visual
- 57:28make sure they are enabled similarly
- 57:31authentication browser you should always
- 57:34choose use my default browser unless it
- 57:36stopped working sign in experience use
- 57:39updated signin experience you can use
- 57:41that approved adfs authentication
- 57:44Service you have not approved any
- 57:47authentication Service so there is no
- 57:49option coming in then for privacy I'm
- 57:52keeping combined data according to each
- 57:54file privacy setting
- 57:58in the regional setting I'm keeping my
- 58:00default Windows setting and language it
- 58:03it means it's going to follow my windows
- 58:06display language setting and I'm going
- 58:07to keep it like that in case you want
- 58:10you can use the model
- 58:12language updates I'm not going to change
- 58:15anything here uses data you can disable
- 58:19this feature if you don't want to send
- 58:21any data to
- 58:24Microsoft diagnosis right now I have not
- 58:26enabled
- 58:27tressing or crash T collection but at
- 58:32few places the diagnosis is on is
- 58:35basically query diagnosis enable in
- 58:37report and query editor diagnosis level
- 58:40Aggregate and detail additional details
- 58:43are also
- 58:44enabled review feature and one of the
- 58:47most important feature which we are
- 58:48talking about shape map visual is
- 58:51enabled here as you can see Q is enabled
- 58:55connect external semantic model shared
- 58:58with me is enabled modern tool tip is
- 59:00enabled Park line is enabled metric is
- 59:03visual is enabled quick major suggestion
- 59:06is enabled field parameter is enabled
- 59:09inhance lowlevel security editor is
- 59:11enabled on object interaction is enabled
- 59:14powerb home desktop is not enabled which
- 59:16I'm going to enable
- 59:18now
- 59:23similarly also I'm enable set
- 59:26sensitivity label on PDF is enabled
- 59:29Dynamic format string major is enabled
- 59:31save to one drive and SharePoint is
- 59:33enabled enhance publish dialogue is not
- 59:36enabled I'm not enabling that
- 59:39also how bi project. pbip option of
- 59:44saving is enabled new card visual is
- 59:46enabled new button viser visual is
- 59:49enabled model Explorer and calculation
- 59:52group authoring this is this is the new
- 59:54model view which is available in the
- 59:57relationship as well as the text view we
- 1:00:01have enabled that text query view you
- 1:00:02have seen we have enabled that summary
- 1:00:05with co-pilot visual is enabled improve
- 1:00:07Q&A with co-pilot is also
- 1:00:10enabled I can press okay here but let's
- 1:00:13have a quick look at save and Recovery
- 1:00:15as of now I have set up the store Auto
- 1:00:19Recovery information every 10 minutes
- 1:00:20but if you have a really big file please
- 1:00:23make sure to increase it otherwise it
- 1:00:25may slow down if because it start
- 1:00:28automatically saving the reports inside
- 1:00:30the report settings these are the
- 1:00:32important things which we have also seen
- 1:00:35when we were viewing the December
- 1:00:37release notes display smart grid line
- 1:00:40aligned suggest a visual type by default
- 1:00:42is enabled inbit visual menu always
- 1:00:46allow show all in the visualization
- 1:00:49type and then the pain switchers always
- 1:00:52show the
- 1:00:54pain Switcher always show build menu
- 1:00:57visual in the panes which are always
- 1:00:59open in New pane these are the option
- 1:01:02which are already selected here other
- 1:01:04than that I am leaving accessibility and
- 1:01:06Page alignment as is now these are the
- 1:01:09global features which we have looked at
- 1:01:11it as you can see they fall under the
- 1:01:13global feature there are file specific
- 1:01:16features which is there inside the
- 1:01:18current file and one of them is data
- 1:01:20load and as you can see in the data load
- 1:01:22detect column types and header for
- 1:01:26structure data sources so it's going to
- 1:01:27detected import relationship from the
- 1:01:29data sources if it
- 1:01:31is if it is supported on that Source it
- 1:01:34will be imported update and delete
- 1:01:35relationship while refreshing it can do
- 1:01:37that auto detect new relationship now
- 1:01:40this is the feature you will realize
- 1:01:42when I am going to load the data into
- 1:01:44the import mode it's going to get the
- 1:01:46relationship and this is the reason for
- 1:01:49that that's going to Auto detect the
- 1:01:51relationship again I can disable time
- 1:01:53intelligence at the report level which
- 1:01:56I'm not disabling right now I'm going to
- 1:01:57show you what going to happen in that
- 1:02:00case and post that will come and disable
- 1:02:02that if required background
- 1:02:04data allow data previews to download in
- 1:02:07the background we keep it parallel
- 1:02:10loading of table is default we taking it
- 1:02:12from the global level and Q&A I'm not
- 1:02:15changing anything here Regional Regional
- 1:02:18setting I'm keeping is default privacy
- 1:02:21default Auto Recovery is disable auto
- 1:02:24recovery on this file if you want you
- 1:02:25can disable able but I'm keeping it
- 1:02:27default publish data source setting I'm
- 1:02:29keeping everything as default sap
- 1:02:31variables right now I'm not enabling
- 1:02:33direct query connection to data set this
- 1:02:36prevents user from creating direct query
- 1:02:38connection to the data set on the
- 1:02:40desktop if you change the setting you
- 1:02:42need to republish your report to save it
- 1:02:45discourage direct query connection we
- 1:02:46don't want to discourage it so we will
- 1:02:48keep it query reductions keep the
- 1:02:50default settings and query reduction uh
- 1:02:53instead of adding apply button to each
- 1:02:56slicer it is recommended apply all
- 1:02:58slicer slicer button to each page and
- 1:03:01that we are going to explore instantly
- 1:03:03apply basic changes add
- 1:03:06apply button to all basic Fielder so
- 1:03:09this we can use to you know what happens
- 1:03:11is the moment you select anything the
- 1:03:14visual get refreshed we have apply all
- 1:03:17slicer button and or we can use apply on
- 1:03:20each filter but what we are going to use
- 1:03:23is we going to use the default setting
- 1:03:25and if needed we go comeand explore and
- 1:03:27Report setting these are few of the
- 1:03:29report setting like use of the modern
- 1:03:31visual header is enabled hide visual
- 1:03:34header in reading mode is by default
- 1:03:37disabled we keeping it export data allow
- 1:03:40the end user to export data current
- 1:03:42layout summarized data from the powerbi
- 1:03:45service and powerbi Report service I'm
- 1:03:47going to keep it because it allows you
- 1:03:49the currently out means as whatever it
- 1:03:52is looking like in powerbi service it
- 1:03:53should be going in that particular
- 1:03:55manner so I'm keeping it filtering
- 1:03:57experience I'm keeping both of them
- 1:03:59tagged and this is also default allow
- 1:04:02user to change the filter type enable
- 1:04:04search for the filter pan cross report
- 1:04:08drill through right now we don't need so
- 1:04:10I'm not enabling it personalized visual
- 1:04:12is something we can allow on the report
- 1:04:14level modern visual tool tip is enabled
- 1:04:16and we'll keep it tool tip Auto scale
- 1:04:19tool tip size affected by the canvas
- 1:04:21size this a preview feature so let's
- 1:04:23enable it default summarization for
- 1:04:25aggregated Fields always show default
- 1:04:28summarization type means if the field is
- 1:04:30numeric field or aggregated type we will
- 1:04:32have a default summarization and that's
- 1:04:34where it is asking for query limit
- 1:04:37simulation if you want to simulate which
- 1:04:39kind of capacity you have shared
- 1:04:41capacity premium capacity SQL Ser
- 1:04:43analysis Services aor analysis Services
- 1:04:45custom limit no query limits I'm keeping
- 1:04:48it auto as of now this is 1 GB shared
- 1:04:52capacity
- 1:04:53uh as of now I'm keeping it same but in
- 1:04:57case you want to see if you're on a
- 1:04:59premium capacity or you want to go to
- 1:05:01premium capacity how it is going to
- 1:05:03behave so that you can enable it I'm now
- 1:05:07going to press okay button on the bottom
- 1:05:09right and once I press this okay button
- 1:05:11on the bottom right I might have to
- 1:05:14restart my power bi desktop to get all
- 1:05:18these features
- 1:05:19enabled so this is a quick overview and
- 1:05:21now I'm pressing
- 1:05:23okay and it is asking that it requires a
- 1:05:26restart so I'll restart my power via
- 1:05:29desktop and come back again to
- 1:05:32you so let me give you overview of the
- 1:05:35data whatever data I'm using for this
- 1:05:39particular video and most of the videos
- 1:05:41on my channel is available on
- 1:05:44GitHub some of you has complained that
- 1:05:48you are unable to download the data from
- 1:05:50GitHub so so this year I will also
- 1:05:52provide the data on Dropbox and I'll
- 1:05:54share the link in the descript
- 1:05:55description data primarily is a sales
- 1:05:58data or the retail data which we are
- 1:06:00going to use the GitHub contains lot
- 1:06:02many other type of data which we are
- 1:06:04going to use like for power query I have
- 1:06:07pyot dat. XLS there are many other files
- 1:06:11which are used in different videos
- 1:06:12available there so whenever you watch a
- 1:06:14video and if there's a file required you
- 1:06:16will get that here on the
- 1:06:18GitHub this time what I've also done is
- 1:06:20I loaded some icons I taken the help
- 1:06:23from AI tools to generate some random
- 1:06:26icons and then I loaded all those icons
- 1:06:29on the GitHub so that you can use those
- 1:06:31icons when you are creating your
- 1:06:33visualization to make your visualization
- 1:06:36look much
- 1:06:37better
- 1:06:40so you can take the full advantage of
- 1:06:42the data available from my
- 1:06:44side so let us quickly have a look at
- 1:06:49what all data is available at the GitHub
- 1:06:52all the data which I'm going to use in
- 1:06:55this
- 1:06:57video is available on
- 1:07:02github.com slamit chandak PBI
- 1:07:08slav
- 1:07:13bi on GitHub you have various file one
- 1:07:17of the most important file which we are
- 1:07:19going to use in this video is sales data
- 1:07:24used in
- 1:07:27video do XLS let's download this Sal
- 1:07:31data used in video and keep with us we
- 1:07:33will need it to understand the data
- 1:07:36click on this file sales data used in
- 1:07:38video and once you click on this you
- 1:07:39will get an option here to download this
- 1:07:42file so you can download it we are also
- 1:07:45going to
- 1:07:47use P tata. XLS for power
- 1:07:52query you don't need to download these
- 1:07:55file FES you can download for
- 1:07:58understanding the data but I'll tell you
- 1:08:00a technique you using that you will be
- 1:08:03able to use these files without
- 1:08:08downloading now for understanding of the
- 1:08:12data you can download these files some
- 1:08:15of the users have complained last year
- 1:08:18that they are unable to download from
- 1:08:20the GitHub what I'm going to do is I'm
- 1:08:23also going to give you a Dropbox link
- 1:08:25into the description form where you can
- 1:08:27download these
- 1:08:30files download of last year's data is
- 1:08:33available here and for this year also
- 1:08:35I'm going to load the PB as well as
- 1:08:39the PPT used for the video CSV files are
- 1:08:45available here and some of the icons
- 1:08:47which I'm going to use in the video are
- 1:08:49made available here
- 1:08:56I will add the GitHub link also in my
- 1:08:58description so that you can download the
- 1:09:00data from there before we move forward
- 1:09:03let's understand what is there in sales
- 1:09:07data used in video which is the primary
- 1:09:10file we are going to use let me give you
- 1:09:13the overview of the data which we plan
- 1:09:15to use
- 1:09:18first this data is the one which will be
- 1:09:21used as the primary data throughout the
- 1:09:23series
- 1:09:25this is a perfect star schema which
- 1:09:27already
- 1:09:29contain pack and dimension table so
- 1:09:32First Dimension table which I have is
- 1:09:34the item table which contain item id
- 1:09:37name brand ID category id subcategory id
- 1:09:42brand and
- 1:09:46subcategory so the first table which I
- 1:09:48have is item table and item table
- 1:09:52contains columns like item id name name
- 1:09:56brand ID category id subcategory id
- 1:09:59brand category and
- 1:10:02subcategory as this is a dimension table
- 1:10:05Item ID is unique and would be used in
- 1:10:07my sales fact which I'm going to show
- 1:10:09you a little bit later the second
- 1:10:11dimension which I have is a customer ID
- 1:10:14contains customer ID age of the customer
- 1:10:17city state and name of the customer city
- 1:10:21and state here are the city and state of
- 1:10:24the customer customer's address it is
- 1:10:27not where customer is ordering its data
- 1:10:30customer may be in travel while it is
- 1:10:32ordering or ordering for the relative so
- 1:10:36this is not the same this is the
- 1:10:37customers Master
- 1:10:39data the third dimension which we have
- 1:10:41is the geography table it contains City
- 1:10:44ID city and state and this is the order
- 1:10:49City or the sales City uh which we have
- 1:10:52in the
- 1:10:54data now let me explain you the fact
- 1:10:56table the fact table is a retail sales
- 1:10:59data every line represent a single order
- 1:11:02only
- 1:11:03means every line contains only one order
- 1:11:07and one order don't have multiple
- 1:11:10lines and this is my sales table sales
- 1:11:13fact which I'm going to call
- 1:11:15here for
- 1:11:17this is this is sales table all the
- 1:11:21sales fact for our current
- 1:11:27analysis and it contains order number
- 1:11:29the order number which is unique for
- 1:11:31each line item id repeating referencing
- 1:11:34item Dimensions sales date on the date
- 1:11:36on which the sales has happened delivery
- 1:11:38date the date on which delivery has
- 1:11:40happened customer ID referencing the
- 1:11:43customer master table or customer table
- 1:11:45City ID referencing the geography T
- 1:11:48table quantity which has been sold for
- 1:11:50each line price which is size
- 1:11:54of that particular item on that date
- 1:11:58cost what cost we are inquiring for that
- 1:12:00and discount percentage as you can see
- 1:12:03we have not calculated the cross amount
- 1:12:06the net amount the discount amount also
- 1:12:09the discount percentage is an absolute
- 1:12:12number it is not .12 it is actually 12
- 1:12:16when we are doing the calculations we
- 1:12:17need to take care now in this data what
- 1:12:20we have to do is we require some of
- 1:12:22those calculations and those
- 1:12:23calculations will be done either as a
- 1:12:26calculated column which is at the row
- 1:12:28level or as a measures which is
- 1:12:31basically aggregated level which we will
- 1:12:34understand in some time in
- 1:12:38powerbi so what kind of analysis we want
- 1:12:41you to do on this data in this data we
- 1:12:44can do many analysis like I can find out
- 1:12:48my top cities top
- 1:12:52customers top brands top C categories
- 1:12:55top
- 1:12:56subcategories I can analyze where I'm
- 1:12:59getting more discount or margin for
- 1:13:01which item I'm getting that for which
- 1:13:04cities I'm getting better
- 1:13:06discount on which cities by giving less
- 1:13:09discount I'm getting more margin all
- 1:13:11these kind of analysis we can do using
- 1:13:13this data now because it's a learning
- 1:13:16Series where we run the feature and then
- 1:13:19implement it might not be possible for
- 1:13:21me to explain all the possible outcome
- 1:13:26for this one but at the end we will try
- 1:13:29to create a report to give meaning to
- 1:13:32this data and we will publish it for our
- 1:13:35ad user let's now talk about the type of
- 1:13:39data loads before we bring in the data
- 1:13:41into the powerbi desktop usually we talk
- 1:13:46about three modes import mode direct
- 1:13:48query mode and live mode but with the
- 1:13:51emergence of Microsoft fabric we have
- 1:13:53got a new mode which is also known as
- 1:13:55direct click mode import mode in which
- 1:14:00in case of the import mode you actually
- 1:14:02load data into the powerbi and powerbi
- 1:14:05is going to keep the data with it and on
- 1:14:07that data we are going to build a model
- 1:14:10so powerbi is owning the data the model
- 1:14:14the relationship the measures and then
- 1:14:17you publish such models on powerbi
- 1:14:19service when we publish the file there
- 1:14:22are
- 1:14:23two files created
- 1:14:25on the powerbi service one is data set
- 1:14:28file and another one is a visualization
- 1:14:32file the data set file or what we now
- 1:14:35call as semantic models contain the data
- 1:14:39as well as the model information major
- 1:14:41definition
- 1:14:42Etc in case of direct query we usually
- 1:14:46connect to the
- 1:14:47databases which are typically
- 1:14:50rdbms not all the rdbms are supported
- 1:14:53there is a list available on the
- 1:14:55Microsoft side which all databases are
- 1:14:58supported for direct query in case of
- 1:15:00direct query powerbi only owns
- 1:15:05the semantic model or your relationship
- 1:15:09your measure definition your calculated
- 1:15:11columns it owns that when you publish
- 1:15:15this you will get a data set file or
- 1:15:18semantic model file onto the powerbi
- 1:15:21service but that will not contain data
- 1:15:24it will only contain the model
- 1:15:26information in case of live query the
- 1:15:29live doesn't mean the real time data it
- 1:15:32is basically when you use SQL Server
- 1:15:34analysis services or powerbi data set as
- 1:15:37a source in such case what happens the
- 1:15:40model the semantic model or the data set
- 1:15:44owns the data and that is not owned by
- 1:15:47the powerbi that is either owned by a
- 1:15:50previous powerbi data set or SQL Server
- 1:15:53analysis services or a your analysis
- 1:15:57services in powerbi we only create
- 1:16:01visualization yes we can also create
- 1:16:03some additional measures if
- 1:16:05required when we publish such files we
- 1:16:08don't get a semantic model or the data
- 1:16:13set on powerbi service in case we are
- 1:16:17publishing a file which is connected to
- 1:16:21a previous powerb data
- 1:16:23set so so the new report or the
- 1:16:27visualization file will
- 1:16:32also point to the same data set direct
- 1:16:35lake is the new mode which came in it
- 1:16:38provides you best of the import and
- 1:16:40direct query
- 1:16:42mode for Microsoft fabric lak houses and
- 1:16:46warehouses semantic
- 1:16:49models for direct Lake Microsoft has
- 1:16:52done changes in the analysis
- 1:16:56services so that it can query the Delta
- 1:17:00par format files and give you a import
- 1:17:03mode
- 1:17:05performance so whenever you are going to
- 1:17:08use Microsoft fabric you need to ensure
- 1:17:10that you are using direct Lake mode
- 1:17:13there are times when it fall backs to
- 1:17:15direct query and you should try to avoid
- 1:17:20such cases where it can fall to direct
- 1:17:23query because Direct C performance
- 1:17:26cannot be compared with direct query
- 1:17:29performance let's load the data onto the
- 1:17:33powerbi
- 1:17:34desktop I have opened the powerbi
- 1:17:36desktop again and time has come that we
- 1:17:37import the data onto the powerbi desktop
- 1:17:39out of the mode which is import mode
- 1:17:41direct query live and directly mode we
- 1:17:42would like to use the import mode here
- 1:17:44now those of you who have downloaded the
- 1:17:46Excel files I'm going to tell you how
- 1:17:48you are going to load the data and then
- 1:17:49I'll tell you those of you who prefer
- 1:17:51the URL mode how you going to do it so
- 1:17:52those of you who has downloaded the data
- 1:17:54can use Excel option under the Home tab
- 1:17:57to upload the data to the powerb desktop
- 1:17:59the same option is also available in the
- 1:18:00get data and if you click on the more we
- 1:18:02can see what all options we have on
- 1:18:03powerb desktop we have more than 200
- 1:18:05plus connectors for powerb desktop to
- 1:18:06connect on various sources these are
- 1:18:08categorized under file sources like Exel
- 1:18:10TCH CSV XML Json file folder PDF
- 1:18:12databases most of the common databases
- 1:18:13like SQL Server Oracle IBM gb2 IBM
- 1:18:16natisa my SQL database post database
- 1:18:18cbas teradata sap Hana Amazon red shift
- 1:18:22and many more including the most common
- 1:18:24like slow frak also have Amazon AA and
- 1:18:27we have few other connectors Microsoft
- 1:18:28fabric which has been launched in May
- 1:18:302023 and generally available from
- 1:18:31November 2023 the connectors are
- 1:18:32available for semantic models data flow
- 1:18:34dat Mars Warehouse leak house and equ
- 1:18:35databases Power Platform connectors for
- 1:18:37power data flows data services data and
- 1:18:38data flows a your connector for aor SQL
- 1:18:41a your signups analytics a your database
- 1:18:42Services a your blob storage a your
- 1:18:44cosos DB and data Explorer a your dat Le
- 1:18:46gen 1 a your dat Le Gen 2 as your HD
- 1:18:48insides a yourd spark and other as
- 1:18:50services online services we have so many
- 1:18:51of these including SharePoint online Bas
- 1:18:53Microsoft Exchange online D 360 5 Etc
- 1:18:55and we have few other connector which
- 1:18:57which include the web connector and one
- 1:18:58of the connector we going to use when we
- 1:18:59going to bring in the data from the
- 1:19:00GitHub now those of you who has already
- 1:19:01downloaded for them go to the Exel
- 1:19:02workbook search out where your data is
- 1:19:04my data is inside the powerbi data and
- 1:19:06there I have s data used in video and
- 1:19:08once I select say data used in video I
- 1:19:10can press the open button to get the
- 1:19:13data once I click on the open button it
- 1:19:15will show me a popup and in the popup I
- 1:19:17can preview my tables but unless I press
- 1:19:18this check box I will not get the data
- 1:19:20on the powerp desktop we can check all
- 1:19:22these four files this has the same data
- 1:19:23we have explained you a minute back also
- 1:19:25if you have few tables in your Exel Mark
- 1:19:27as a table you will get those here now
- 1:19:28we have two options to explore low data
- 1:19:30and transform data when do we will use
- 1:19:31low data and when we will use transform
- 1:19:33data in case we don't want to transform
- 1:19:35this data this data is in final shape
- 1:19:37which is true for this data we will
- 1:19:38directly use low data but if this data
- 1:19:40require transformation or this data is
- 1:19:42too big we want to reduce it before
- 1:19:43loading we will use transform data in
- 1:19:45the current case the data do not require
- 1:19:46transformation also the size is not so
- 1:19:48big that I have to reduce it before
- 1:19:49loading into powerp desktop so I'm going
- 1:19:51ahead with the load data option I can
- 1:19:52click on the load data and it will load
- 1:19:53the data so this is the option for those
- 1:19:54of you who are using the Excel those of
- 1:19:56you wanted to use GitHub first of all go
- 1:19:58to the GitHub and find out the URL which
- 1:20:00you want to use to get the URL scroll
- 1:20:01down open this file says data used in
- 1:20:03video XLS now some of you would like to
- 1:20:05take the URL from the top but don't do
- 1:20:06that go to this button raw don't click
- 1:20:08on that right click on this button use
- 1:20:11copy link once you copy the link come
- 1:20:12back to your powerb desktop and now use
- 1:20:14get data web option I've already shown
- 1:20:16you all the option categorization and
- 1:20:18here you can put this URL you can check
- 1:20:20out the Advan option but right now I
- 1:20:21don't need so I can continue with the
- 1:20:22basic option press on okay it should
- 1:20:24open the same popup again which I have
- 1:20:25explained you while I was loading the
- 1:20:27XEL file I click on the cheat boxes to
- 1:20:29make sure that I'm loading the data for
- 1:20:30all these four table it does not mean
- 1:20:32that you have to load the complete data
- 1:20:33in one go you can load data in multiple
- 1:20:36goals also I'm going to press the load
- 1:20:38data in this case and load my
- 1:20:41data it will show me a popup for the
- 1:20:43data loading and this is also one of the
- 1:20:45way when you can check the data is
- 1:20:47loading it is in import mode because
- 1:20:48it's going to show you amount of data
- 1:20:49which is getting loaded data is loaded
- 1:20:51onto the power bi desktop and on the
- 1:20:52right hand side data pan you can see the
- 1:20:54data tables those tables are customer
- 1:20:57geography item and sales now we can go
- 1:20:59ahead and take two steps from here one
- 1:21:01we create the formulas which are missing
- 1:21:02in sa State table for analysis or second
- 1:21:04is we create the model we are going to
- 1:21:06create the model and post that we will
- 1:21:07try to understand a little bit about the
- 1:21:08Dex formulas and that is where our
- 1:21:11technical stuff will start where you
- 1:21:12need to understand the Dex and how you
- 1:21:14can quickly create calculations which is
- 1:21:16can be categorized either as calculated
- 1:21:17column and major data is loaded and I
- 1:21:19would like to create relationship before
- 1:21:20I do that I would like to have a quick
- 1:21:22view on the data using the table view on
- 1:21:23the left hand side I go to the table and
- 1:21:24as it is import mode I should be able to
- 1:21:25see the data of each table below here I
- 1:21:27should be able to see the count and I
- 1:21:28can match this count with my Excel data
- 1:21:31how much rows I have there versus how
- 1:21:32much rows I have here to make sure that
- 1:21:34we have the same amount of data what we
- 1:21:35have at the source I can click on
- 1:21:36geography to see the geography data I
- 1:21:37have 100 rows there item 55 rows and
- 1:21:39sales table having 30,000 rows all my
- 1:21:40data is correct let's now create the
- 1:21:43relationship on powerbi
- 1:21:47desktop now let's jump onto the model
- 1:21:49view and here we are going to create the
- 1:21:51relationship but what we observe the
- 1:21:52relationship is already there and I
- 1:21:54explained you let me show you again
- 1:21:55under the file options and setting
- 1:21:57options we have an option in the current
- 1:22:00file data load level which is auto
- 1:22:02detect new relationship that is causing
- 1:22:03this in case you creating a really big
- 1:22:05model where you don't want to do this
- 1:22:06you can uncheck that let me close the
- 1:22:07property and the data pan and try to
- 1:22:08understand if these relationships are
- 1:22:09correct or not so let me showcase you
- 1:22:12what is the exact model I need on the
- 1:22:14PowerPoint
- 1:22:15slide so just a overview of the model
- 1:22:18which we are going to create here uh
- 1:22:20which is available in the Excel file
- 1:22:22which you have seen is that we we are
- 1:22:24going to have a sales table which is at
- 1:22:26the
- 1:22:27center and it will have geography
- 1:22:30Dimension which is available in the
- 1:22:31Excel sheet item Dimension again
- 1:22:34available in the Excel sheet and the
- 1:22:35customer Dimension again available in
- 1:22:37the Excel sheet we're going to create a
- 1:22:39date table in the powerbi desktop and
- 1:22:41going to utilize it it's going to be a
- 1:22:43perfect star
- 1:22:45schema
- 1:22:47where fact is related with Dimension and
- 1:22:50dimension is related with fact in a
- 1:22:52perfect star schema the two Dimension
- 1:22:55don't have any relationship between them
- 1:22:57so although I have City available in
- 1:23:01both geography and customer they will
- 1:23:03not have any relationship between
- 1:23:06them so they will not have any
- 1:23:08relationship between
- 1:23:09them because in a perfect star schema
- 1:23:12Dimension don't join with any Dimension
- 1:23:15fact don't join with any fact so we will
- 1:23:18utilize this model for most of our
- 1:23:20discussion but yes there would be places
- 1:23:23for some of the examples this model
- 1:23:27cannot be used and that's where we are
- 1:23:29going to use very specific files and
- 1:23:32specific table or the models to achieve
- 1:23:35those
- 1:23:36objectives now we have looked at the
- 1:23:38model we know this model is not as per
- 1:23:41our expectation first of all there is an
- 1:23:45inactive joint and we need to understand
- 1:23:47why there is an inactive joint and we
- 1:23:49have to also understand what are these
- 1:23:50different kind of joints why there's a
- 1:23:52one on one side and why there is a a
- 1:23:54star on one side so the relationships
- 1:23:57which is showing one and star they are
- 1:23:59one too many relationships and these are
- 1:24:02the kind of relationship we want in this
- 1:24:04kind of schema the inactive relationship
- 1:24:07here is because of loop what is the loop
- 1:24:10here or what is the two path here the
- 1:24:14relationship here which is inactive is
- 1:24:16because of the loop or the two paths
- 1:24:18table is joined with a customer table
- 1:24:19one to many and again there is a one to
- 1:24:22many relationship with sales table it
- 1:24:23means this this is the first path
- 1:24:25geography can reach to sales there is
- 1:24:28also a direct path where geography can
- 1:24:30reach to the sales and in this manner
- 1:24:32there are two paths which are created
- 1:24:33and because of that one path is inactive
- 1:24:37let me delete these
- 1:24:40relationship I'm going to delete some of
- 1:24:43the existing relationship also because I
- 1:24:46want to tell you how to create
- 1:24:48relationship we have few options to do
- 1:24:50that and let me delete all of them to
- 1:24:55create relationship for you you can drag
- 1:24:58the table wherever you want to have a
- 1:25:00position where you can easily map the
- 1:25:02tables
- 1:25:05now easiest way to create a relationship
- 1:25:07is click on any of the column keep your
- 1:25:10mouse button pressed and drag it on the
- 1:25:12corresponding column on the other table
- 1:25:15so I am dragging customer ID of the
- 1:25:18customer on the customer ID of the sales
- 1:25:21and it created a relationship it did not
- 1:25:23ask me what kind of a relationship
- 1:25:26because it has identified but let me
- 1:25:28double click on this and show you on the
- 1:25:31popup also on the right hand side in the
- 1:25:33properties pane which I have already
- 1:25:35open you can see what this relationship
- 1:25:37is but let me double click and show you
- 1:25:39in the popup in this popup we can also
- 1:25:42change the relationship column if
- 1:25:44required the sales table is on the top
- 1:25:46and the customer ID is selected the
- 1:25:48customer table is at the bottom and the
- 1:25:50customer ID is selected there and it is
- 1:25:52many to one what does this kind of
- 1:25:54relationship means many to one means the
- 1:25:57first table is having on the man side it
- 1:26:00means the customer IDs can repeat there
- 1:26:02the customer table is on the one side it
- 1:26:05means the IDS are not going to repeat
- 1:26:08there in case in the future it repeats
- 1:26:10it may error out it may not also work if
- 1:26:13you have blank value in the customer ID
- 1:26:16of the customer table it is fine you can
- 1:26:19have the blank on the sales site the
- 1:26:21relationship Direction is single it
- 1:26:24means means the customer table the table
- 1:26:26on the one side is going to filter the
- 1:26:28table on the many side you're going to
- 1:26:30create one relationship as both
- 1:26:33understand that what are the other kind
- 1:26:35of relationship one to one means both
- 1:26:37the tables are having the data at the
- 1:26:39same level it means I join customer
- 1:26:41table with a table let's say customer 2
- 1:26:44which both is having customer ideas
- 1:26:46unique in that case I will have a one to
- 1:26:49one relationship one to many means if I
- 1:26:52have the customer table above and the
- 1:26:54sales table below it would be one to
- 1:26:56many it is just reverse of what we
- 1:26:57currently have many to many means just
- 1:27:00like sales table we have another table
- 1:27:02where the customer ID is not unique both
- 1:27:05the side there are multiple values we
- 1:27:07create many to many relationship though
- 1:27:09we avoid many to many relationship in
- 1:27:12most of the cases they're especially
- 1:27:14useful in few of the use cases and one
- 1:27:16of such use cases is RO level security
- 1:27:19so while we try to avoid many to many
- 1:27:22relationship it is also helpful and
- 1:27:24powerbi handles many to many
- 1:27:27relationship pretty well so let me click
- 1:27:30on okay after using that and make
- 1:27:32relationship active means this
- 1:27:34relationship is going to be active in
- 1:27:37powerbi you cannot select more than one
- 1:27:40colum so if I try to click on this using
- 1:27:42control or shift I will not be able to
- 1:27:44do it it means we create a single column
- 1:27:47relationship but to create multiple
- 1:27:50column relationship you can create a
- 1:27:53concatenate
- 1:27:55column to create such a relationship in
- 1:27:58case of direct query you have been
- 1:28:00provided a function which you can use
- 1:28:03which is combine values to create such a
- 1:28:06concatenated column you can create more
- 1:28:09than one relationship and one
- 1:28:12relationship can be inactive between the
- 1:28:15two tables and we can use a function use
- 1:28:19relationship to activate such
- 1:28:22relationship let me press that's okay
- 1:28:25now the second relationship I want to
- 1:28:28create from a different option the
- 1:28:31option is in the middle of the screen
- 1:28:33which is manage relationship under the
- 1:28:35Home
- 1:28:37tab let me click on the manage
- 1:28:39relationship and here you see a popup
- 1:28:42providing me all the options one of the
- 1:28:45option which I have here is new and I'm
- 1:28:48going to use that to create my
- 1:28:50relationship let me click on new and let
- 1:28:53me select the table this time I'm going
- 1:28:55to select
- 1:28:57my item table as the first
- 1:29:01table then I will select sales table now
- 1:29:04it has automatically detected item id
- 1:29:06versus Item ID I don't need to even
- 1:29:09click and check those it is one too many
- 1:29:12single directional relationship this is
- 1:29:13what I want the table having the unique
- 1:29:16values of the item ID is on the top so
- 1:29:18that is why it is one too many again I
- 1:29:21want this relationship to be active but
- 1:29:24I'm going to make this relationship as
- 1:29:25bir directional both let me click on
- 1:29:28okay let me close it the third
- 1:29:31relationship easy I'm going to drag City
- 1:29:33ID to City ID to create it and on the
- 1:29:36right hand side properties you can see
- 1:29:38in case you want to change something you
- 1:29:40can even change the relationship let's
- 1:29:42say some other column if needed but as
- 1:29:45we know the relationship is correct City
- 1:29:47ID to City ID and this is single
- 1:29:50directional and we want an active
- 1:29:53relationship so we will say apply
- 1:29:57changes you can also open the
- 1:29:59relationship editor by clicking on the
- 1:30:02button
- 1:30:05below let me press cancel so my model is
- 1:30:10ready as a next step I would like to
- 1:30:13understand the difference between a
- 1:30:16single directional join and a bir
- 1:30:18directional
- 1:30:20join and we would also like to
- 1:30:23understand what happen happens when
- 1:30:25there is a missing
- 1:30:27relationship for two those two example
- 1:30:31let's go ahead and try that out our
- 1:30:33powerbi model is ready and here we want
- 1:30:35to understand the difference between a
- 1:30:39one directional relation and bir
- 1:30:41directional relation to understand this
- 1:30:44let's go ahead and create few table
- 1:30:46visuals
- 1:30:48now to do that first of all we have to
- 1:30:51go to the report view on the left hand
- 1:30:56side the first button is report view
- 1:30:58here because I have already enabled the
- 1:31:00build
- 1:31:01visual I'm able to see
- 1:31:04this otherwise on the Home tab you will
- 1:31:06see these options in case you don't see
- 1:31:09build a visual you can go to the view
- 1:31:13and enable that from here build a
- 1:31:17visual now let me click on the table
- 1:31:20visual inside build a visual
- 1:31:28once I click on that I'll get a table
- 1:31:30visual I'm going to copy this visual
- 1:31:32three times and put them
- 1:31:35separately now let's look back at our
- 1:31:39relationship so item is bir directional
- 1:31:41and geography is single directional
- 1:31:43customer is also single directional I
- 1:31:46create one visual using CTI ID only City
- 1:31:50ID I'm bringing in the second visual I
- 1:31:54am bringing
- 1:31:55in Item
- 1:31:58ID and in the third visual I am bringing
- 1:32:02in City ID from sales table
- 1:32:08and item id also from sales table so
- 1:32:11first table there is a city ID from
- 1:32:14geography table in the second visual I
- 1:32:19have Item ID from the item table and in
- 1:32:23the third visual ual I have City ID and
- 1:32:26item ID from the sales table I have
- 1:32:29knowingly kept it on the ID so that you
- 1:32:31can easily understand what's happening
- 1:32:33here so let me click on the item ID in
- 1:32:36the second table and as you can see it
- 1:32:39has filtered the third table there's no
- 1:32:41impact on the other dimension table let
- 1:32:43me click on the city ID and as you can
- 1:32:46see the city ID also filtering the table
- 1:32:50visual as I've not pressed Control Plus
- 1:32:53click the moment I clicked on other
- 1:32:55visual it take out the filter from the
- 1:33:00second Visual and it applies The Zone
- 1:33:02filter let me go ahead and click on City
- 1:33:04ID again it will remove the filter so I
- 1:33:06will have all the cities and I have all
- 1:33:08the item id let me click on the first
- 1:33:10row of the visual which is coming from
- 1:33:12the sales table what you can see here is
- 1:33:15while the city ID from the city table
- 1:33:18has no impact but Item ID is getting
- 1:33:21filtered here when I'm fil ing this this
- 1:33:24is because the joint is bir directional
- 1:33:27a bir directional joint
- 1:33:29means
- 1:33:32fact can filter Dimension and dimension
- 1:33:36can also filter fact or both side of the
- 1:33:41relationship can filter each other while
- 1:33:44in a single directional relationship the
- 1:33:46table on the one side which is dimension
- 1:33:49can filter the many side table
- 1:33:54in fact now let's try to understand what
- 1:33:57happens when there is no join or how do
- 1:33:59we identify there is no join let me
- 1:34:02delete all these visuals on
- 1:34:05this and let me bring in another table
- 1:34:08Visual and this time in the table visual
- 1:34:11I would like to bring in item brand so
- 1:34:14the way to bring in is that
- 1:34:16I once the table is selected I can click
- 1:34:19on that it will bring in and then I'll
- 1:34:23bring inant quantity by default it
- 1:34:25should take aggregation as you can see
- 1:34:27it is using sum of
- 1:34:30quantity so numeric values are by
- 1:34:34default aggregated you have to
- 1:34:37understand in powerbi the data is either
- 1:34:41distinct or group by and aggregated so
- 1:34:47even though my item IDs are repeating in
- 1:34:49my sales table but if I put it from the
- 1:34:51sales table they will not repeat here
- 1:34:53they will just create a distinct
- 1:34:55combination or group by and then if I
- 1:34:58put a aggregated mejor or a numeric
- 1:35:00majure that can aggregate that will
- 1:35:02aggregate along with that group by as
- 1:35:05you can see these values are different
- 1:35:07and this is actually my
- 1:35:09total and now let me go ahead and do one
- 1:35:11thing which will tell you how do you
- 1:35:13identify a missing relationship what I
- 1:35:16will do is I will go to my model
- 1:35:19view and inside the model view I can
- 1:35:22delete this join between item and sales
- 1:35:25table or I can deactivate it by using
- 1:35:30make this relationship active I
- 1:35:33can uncheck that and it will become
- 1:35:36inactive and use apply this is as good
- 1:35:40as not having a filation and once I go
- 1:35:43back to the report
- 1:35:46view you will see that the all the rows
- 1:35:49have the same data when all the rows
- 1:35:52start showing the same data as grand
- 1:35:54total there are chances that we have in
- 1:35:56active relationship or the relationship
- 1:35:59itself is not
- 1:36:01there the good thing with the inactive
- 1:36:04relationship which is logical inactive
- 1:36:06relationship or inactive relationship
- 1:36:09which is not created because of loop we
- 1:36:11can activate it using use relationship
- 1:36:13Dex function in this manner you now
- 1:36:16learn how to use bir directional
- 1:36:19relationship and how you can find out
- 1:36:23when there is an inactive joint now is
- 1:36:25bir directional relationship is a good
- 1:36:27thing so when should we use bir
- 1:36:29directional joint and when we should not
- 1:36:31use bir Direction so bir directional
- 1:36:35joints are especially helpful if you
- 1:36:37want the dimensions to get filtered uh
- 1:36:41when your fact data is getting
- 1:36:43filtered but when you start using more
- 1:36:46than one fact so in case you have more
- 1:36:49than one facts it can create Loops for
- 1:36:52multiple paths what would happen you
- 1:36:55will be able to reach a fact from more
- 1:36:58than one place let's say you create go
- 1:37:00to Dimension to fact by directional
- 1:37:02another fact is again bir directional
- 1:37:04then there are multiple paths available
- 1:37:06in such cases you start creating
- 1:37:07inactive relationship we should try to
- 1:37:10avoid this is one more place where you
- 1:37:11should avoid is basically when you are
- 1:37:13using direct query now what happens in
- 1:37:15case of direct
- 1:37:18query there are queries which are
- 1:37:21generated and sent to the source now
- 1:37:23when you have have bod directional joint
- 1:37:24it will generate more number of queries
- 1:37:26and in that will put lot of strain on
- 1:37:29your Source database so to optimize the
- 1:37:32performance in a direct query mode we
- 1:37:34try to avoid bir directional
- 1:37:37relation so bir directional relationship
- 1:37:40should only be
- 1:37:42used if that is the only way you can
- 1:37:47solve the purpose if there is no other
- 1:37:50way to achieve the same thing like I
- 1:37:52want to
- 1:37:54filter the dimension data using fact we
- 1:37:56can actually use in the slicer a measure
- 1:37:59from the fact and check its value as is
- 1:38:02not blank to filter the
- 1:38:05slicers to reduce the slicers values
- 1:38:08what has been used in fact that is
- 1:38:10another alternative but if there is no
- 1:38:13other
- 1:38:14alternative by directional joint is only
- 1:38:16fit for the purpose then only we should
- 1:38:18use it now before I go to the next step
- 1:38:21let me go ahead and activate this
- 1:38:24relationship and apply
- 1:38:27changes so that our model is correct as
- 1:38:31you can see once I have activated the
- 1:38:35join again I'm able to see the correct
- 1:38:39Data before I take the next tab let's do
- 1:38:43one thing let's add an image to this
- 1:38:46first
- 1:38:47page the image of this series and then
- 1:38:51save this file because we have not saved
- 1:38:53this file so in case the system crashes
- 1:38:56or something goes off the changes might
- 1:38:59not be fully recoverable though we have
- 1:39:01used an option auto backup that may be
- 1:39:05able to provide
- 1:39:06us autosaved version which we can use I
- 1:39:10click on this empty page let me click on
- 1:39:12the format option and enable the format
- 1:39:15pane once I get the format pane in the
- 1:39:18Page
- 1:39:20information I can scroll down
- 1:39:24and in the canvas background I can
- 1:39:26browse an
- 1:39:28image I can take the image which I
- 1:39:30recently download
- 1:39:33it and reduce the transparency to zero
- 1:39:38image fit is normal I can use a fit so
- 1:39:41that it fits in and in this manner I get
- 1:39:45my homepage with the image which is
- 1:39:50my image of the series
- 1:39:53now you might be seeing this build
- 1:39:55visual is still there now Prov that what
- 1:39:57I can do is I can add something really
- 1:40:00small in this page so I can go to insert
- 1:40:03and then I can let's say insert a shape
- 1:40:06let's bring in a
- 1:40:07rectangle and
- 1:40:10let's do one thing go to
- 1:40:14the
- 1:40:16style fill off border
- 1:40:20off and come outside now you don't know
- 1:40:24there is a rectangle and you get the
- 1:40:26image so let's save it contrl s give it
- 1:40:30a new name uh it's going to save on a
- 1:40:32default location and if you want to
- 1:40:34change that click on the more options
- 1:40:37below once you click on the more option
- 1:40:40it will open and now it is showing me
- 1:40:43documents on the top but if you go on
- 1:40:45the left hand side little bit below you
- 1:40:47will see browse this device let me click
- 1:40:50on browse this device now it opens up
- 1:40:53option and as you know that we save all
- 1:40:56our files in data but not this time
- 1:40:58we're going to save the file in our end
- 1:41:01to end and I'll also create a new folder
- 1:41:04for that right click in that new folder
- 1:41:07we going to call it
- 1:41:10data we don't have a data here but we
- 1:41:12have a PB file and I'll give it a name
- 1:41:15as n to and and what would happen during
- 1:41:20this series there would be movements
- 1:41:22where I I need to stop and start a new
- 1:41:24file maybe I don't want to use it or I
- 1:41:27want to save it a particular place
- 1:41:29because I want to modify certain other
- 1:41:30things or it is too busy file at that
- 1:41:33moment I may like to shift it especially
- 1:41:35when we are going to go to the power
- 1:41:39query learning we might not use these
- 1:41:41tables when we try to create the final
- 1:41:43dashboard we might not require it so at
- 1:41:47that time we might create a one more
- 1:41:50version of this file so to do to create
- 1:41:53the scope for that I'll call it n to and
- 1:41:56one file and let me save it now for
- 1:41:59saving now I have three options PB which
- 1:42:02is power ba file pbit which is the
- 1:42:06template file which was also available
- 1:42:07previously to create the template and
- 1:42:10powerbi project file which is a new
- 1:42:12option available with the GitHub
- 1:42:14integration this is one of the most
- 1:42:16suitable options you have but we will
- 1:42:18continue to save it as a PBX and save it
- 1:42:21so now over powerbi file is
- 1:42:25saved before we go into the depth of
- 1:42:29calculated column and
- 1:42:31major one of the reason we say is that
- 1:42:34you know when we want to do role level
- 1:42:36calculation we can prefer columns to you
- 1:42:40know make sure that it increase the load
- 1:42:42time and if the data is pretty large the
- 1:42:45runtime calculation at the row level
- 1:42:47could actually proven be costly but if
- 1:42:51it is not costly then go ahead and
- 1:42:52create a
- 1:42:54now what is this Ro level calculation
- 1:42:57and when would I use Ro level
- 1:43:00calculation and when I should not use Ro
- 1:43:02level
- 1:43:03calculation there are few places where
- 1:43:06you can simply take this decision that I
- 1:43:07need a ro level calculation whether at
- 1:43:10the new calculated column level or major
- 1:43:12level or whether I don't need it there
- 1:43:15is a place where I should not do ro
- 1:43:17level calculation I should create a
- 1:43:19mejor or what is that kind of scenario
- 1:43:22so when whenever we have to multiply we
- 1:43:24have to use the row level calculation
- 1:43:26whether we use calculated column or a
- 1:43:28measure but when it's a
- 1:43:31division the division should always be
- 1:43:35first Aggregate and then divide it it
- 1:43:37means it should be a measure let me give
- 1:43:39you one example for that so I have these
- 1:43:42items I have quantity and price now what
- 1:43:47is gross quantity multip by price is
- 1:43:50basically this formula so this is 50 70
- 1:43:5380 and
- 1:43:5590 now so I'm multiplying at each row
- 1:43:57level and then finally I'm summing it up
- 1:44:00here as
- 1:44:01290 is this is correct or should I
- 1:44:04simply sum of the quantities average of
- 1:44:07the price I definitely know if I Su of
- 1:44:10the price it's not the correct so it's
- 1:44:12going to
- 1:44:13be 70 * by
- 1:44:174.75 which is 3325 so which one is
- 1:44:20correct we know here two 2 990 is the
- 1:44:25correct
- 1:44:26answer it's not
- 1:44:2833 2.5 that's not the correct answer
- 1:44:33whenever there is a multiplication we
- 1:44:35should do it at the row level and then
- 1:44:37we should add which actually we call it
- 1:44:40sum of a multi by
- 1:44:44b means false you multiply now in
- 1:44:47database we can do this sum of a * by B
- 1:44:53inside the sum function that is not true
- 1:44:56in power bi when we creating a major and
- 1:44:59major is one where we do have
- 1:45:01aggregation built in there we need to
- 1:45:06use expression function to do a mtip by
- 1:45:08b or we can create a calculated column
- 1:45:11which contain a multip by b means in
- 1:45:13this case cross and later can create a
- 1:45:16measure on top of it now there is a
- 1:45:18reverse case the reverse case is when I
- 1:45:21want to find out price using gross and
- 1:45:23quantity so how do I find price so
- 1:45:25simply I'll divide Cross by quantity so
- 1:45:28I got five I got seven I got four I got
- 1:45:32three what's my average price my average
- 1:45:35price is nothing but the total of gross
- 1:45:38divide by total of quantity it is not
- 1:45:41the simple average of these four which
- 1:45:43is
- 1:45:444.75 which is a simple average of these
- 1:45:47four it's not 4.75 390 / by 70 is 4
- 1:45:53.14 this is my correct
- 1:45:57data it means whenever you need to
- 1:46:00divide you first need to aggregate means
- 1:46:04sum of
- 1:46:05a divide by sum of
- 1:46:12B
- 1:46:13so what does this means is in case of
- 1:46:16division it should be sum of a divide by
- 1:46:20sum of B is first you aggregate
- 1:46:23and then you divide so in such cases we
- 1:46:26should only use measure because
- 1:46:30calculated column is going to do the
- 1:46:32calculation at row level and post that
- 1:46:34the aggregation can happen in a measure
- 1:46:38but in case of measure we can aggregate
- 1:46:41them separately and then divide or in
- 1:46:43the same measure we can say sum of a
- 1:46:46divide by sum of B table and
- 1:46:49column in this manner in some of the
- 1:46:52cases we can take a call where should we
- 1:46:54use a measure or where should we use a
- 1:46:57calculated column remember on a smaller
- 1:47:00data where the roow level calculations
- 1:47:02can be done in a major and not making
- 1:47:04much impact we can still use major for
- 1:47:07RO level calculation but yes there would
- 1:47:10be some time because of the performance
- 1:47:12region we will prefer half of the
- 1:47:15calculation in calculated column and
- 1:47:17then use
- 1:47:18measures need to create calculations and
- 1:47:22these calcul ations are divided into two
- 1:47:24parts calculated columns and measures
- 1:47:28now calculated columns do the
- 1:47:30calculation at the row level
- 1:47:33and they are
- 1:47:37stored in
- 1:47:39the data set semantic model or the file
- 1:47:44all the calculation you are going to do
- 1:47:46you will be able to see what new values
- 1:47:48are getting calculated into the table
- 1:47:50View and you will also be able to see
- 1:47:53that when we save the file the size of
- 1:47:55the file
- 1:47:56increase on the other hand the
- 1:47:58calculation done using the measures are
- 1:48:00only definition and getting executed at
- 1:48:03the run time the calculated column which
- 1:48:05we would like to create right now are
- 1:48:08gross
- 1:48:09amount which is nothing but sales
- 1:48:12quantity multipli by sales
- 1:48:14price the second one which we want to
- 1:48:17create is Discount amount which is
- 1:48:21nothing but sales gross amount which we
- 1:48:24already calculated multiply by the
- 1:48:26discount percentage now discount
- 1:48:28percentage here is an absolute value so
- 1:48:30we have to divide it by 100 gross amount
- 1:48:33multiply by discount percentage divide
- 1:48:35by 100 and one more column which we
- 1:48:37wanted to create is cogs amount which is
- 1:48:40nothing but sales quantity multipli by
- 1:48:43sales
- 1:48:44cost once we reach the measure I'll
- 1:48:47explain you what all measures we
- 1:48:49need I on the powerbi desktop and from
- 1:48:52this Itself by going to the data view I
- 1:48:57can create new column so I can click on
- 1:49:00the sales table and in the table tools I
- 1:49:03will have option for new
- 1:49:07column
- 1:49:10but but I have an intention that when I
- 1:49:13create calculated columns calculated
- 1:49:15columns are getting added up to the
- 1:49:18tables and will be saved along with that
- 1:49:20table so I would like to see the values
- 1:49:25getting generated and that is why I'm
- 1:49:27going to use
- 1:49:30the table view to do that so let me go
- 1:49:34to the table
- 1:49:35View and before I start
- 1:49:40creating my new columns I would like to
- 1:49:43note down the size of my file so that at
- 1:49:46the end I will able to tell that the
- 1:49:48calculated columns are getting saved
- 1:49:51along with the data table and they are
- 1:49:55adding up to the
- 1:49:57table size and majors are not going to
- 1:50:01add the size they are just definitions
- 1:50:03so let's note down the size right now we
- 1:50:07have
- 1:50:091,623 KB size for this file and after
- 1:50:14some time you're going to come back and
- 1:50:16check this after we have created our
- 1:50:18calculated column and saved the
- 1:50:20file so now let's start creating new
- 1:50:23calculated column I have told you about
- 1:50:26the table tools once you click on a
- 1:50:27table you get table tool new column
- 1:50:29option but the option is also available
- 1:50:32in the column tool if you click on any
- 1:50:34of the column you will get column tools
- 1:50:36and in column tools also you have option
- 1:50:38for new column or right click on any of
- 1:50:41the table the second option is new
- 1:50:43column right click on any column third
- 1:50:46option is a new column using any of
- 1:50:49these options go ahead and create a new
- 1:50:51column
- 1:50:53in the formula bar above you can see the
- 1:50:56column
- 1:50:58creation so you can see now the formula
- 1:51:00bar where we can create the new column
- 1:51:03let me go ahead and increase its size I
- 1:51:06have press control and used the rolling
- 1:51:08of the middle Mouse button to increase
- 1:51:10the size now I got the column it has two
- 1:51:13parts left hand side is where we I'm
- 1:51:15going to give the name and right hand
- 1:51:17side where I'm going to give the formula
- 1:51:19these line numbers are not going to play
- 1:51:20any role powerbi is going to
- 1:51:22automatically add that so the First
- 1:51:24Column I want to create is gross amount
- 1:51:28and what is gross amount it is
- 1:51:32quantity and it starts suggesting you
- 1:51:34can use that it's always better that you
- 1:51:36take complete table name column name so
- 1:51:38let me type down the table name sales
- 1:51:41quantity star
- 1:51:44sales price so we should always take
- 1:51:48fully qualified names when we are
- 1:51:50creating the columns so sales quantity
- 1:51:52multip by sales price is the cross
- 1:51:57amount as you can see in each and every
- 1:52:00Row the data has been created and the
- 1:52:04column values are visible in the table
- 1:52:08view you can also see this column added
- 1:52:11on the right hand side into the table
- 1:52:15with an icon which is showing this is a
- 1:52:17calculated
- 1:52:20column now let's press commit here or
- 1:52:24enter it will come out now let's go
- 1:52:27ahead and create a new column you know
- 1:52:29all the four options I can see column
- 1:52:31tools open in front of me and I'll click
- 1:52:33on new column there and add another
- 1:52:36column the next column I want to add is
- 1:52:40cogs
- 1:52:43amount and cogs amount is nothing but
- 1:52:50say is
- 1:52:53quantity multip by
- 1:52:56sales
- 1:52:57cost now finding out a cost of item is a
- 1:53:03really big challenge for some of the
- 1:53:06organization if an organization can
- 1:53:08achieve a cost measure nothing like that
- 1:53:10and Cog is not just purchase price it's
- 1:53:13purchase price plus rate plus inventory
- 1:53:16carrying cost and any other cost you
- 1:53:18wanted to load on the purchase price to
- 1:53:23get the cost of the item various
- 1:53:27organization develop various kind of
- 1:53:29methods to arrive at the cost of the
- 1:53:33item and that's from that we are
- 1:53:35calculating cogs so that we can get
- 1:53:37margin I would like to create another
- 1:53:40column and again I'm going to use new
- 1:53:42column from the column tool and that is
- 1:53:45Discount amount now discount amount
- 1:53:49column needs the calculated column gross
- 1:53:53amount and I can type sales gross amount
- 1:53:56to get the gross amount so table name
- 1:53:59shown as a table name and sometime you
- 1:54:00will show see the table name is coming
- 1:54:02in single codes if the table name
- 1:54:04contain white spaces or a reserved name
- 1:54:06it will come in the single codes
- 1:54:10otherwise it can come simply as a table
- 1:54:11name and in the square bracket we have
- 1:54:14the column name multiply it by sales
- 1:54:19discount percentage and as the discount
- 1:54:22percentage is absolute I need to divide
- 1:54:24it by 100 it should become decimal
- 1:54:27number so as you can see the data type
- 1:54:29and let's talk about the column tool now
- 1:54:32here in the column tool we can see the
- 1:54:37name the data type the decimal number
- 1:54:40the format which is generic and then we
- 1:54:43can say it's amount we can use dollar
- 1:54:46symbol or any other symbol percentage
- 1:54:48comma separated we can change the
- 1:54:50decimal place and number of decimal
- 1:54:53place right now is auto similarly we can
- 1:54:56use the summarization which is by
- 1:54:58default sum for the numeric column if
- 1:55:00you don't want to summarize it by
- 1:55:02default we can use tone
- 1:55:05summarize data category data category is
- 1:55:07especially important when we use
- 1:55:10geographical data I'll go ahead and show
- 1:55:12it to you s by column is required when
- 1:55:16let's say if I have column like month
- 1:55:18here and I want to sort it on something
- 1:55:20else I can use sort by column which is
- 1:55:22not needed right now we will use it when
- 1:55:25we create the date table before I go
- 1:55:27ahead and create my Majors I would like
- 1:55:31that if there is any renaming required
- 1:55:34of the tables and column I should go
- 1:55:36ahead and do that so as you can see in
- 1:55:39the customer table there is no renaming
- 1:55:41required geography table there is no
- 1:55:42renaming required item table there is no
- 1:55:44renaming required and sales table also
- 1:55:46there is no renaming required but
- 1:55:49for you
- 1:55:52to explain it to you let me go ahead and
- 1:55:55rename this column Quant Qi and I
- 1:55:57already created calculated column on
- 1:55:59that now I want it to rename so I can
- 1:56:02double click and rename or I can right
- 1:56:05click cck or rename let me call it q u a
- 1:56:10n t t y
- 1:56:14quantity and let me check the new
- 1:56:16columns which I've created have they
- 1:56:18taken up the correct column name or not
- 1:56:21so the gross amount column has already
- 1:56:23taken up the correct name same way I can
- 1:56:26rename
- 1:56:28my tables geography item and customer if
- 1:56:31required column tool is the one place
- 1:56:34where we can change these property the
- 1:56:36another place where we can change the
- 1:56:37properties is the model view and inside
- 1:56:40the model view the properties we can
- 1:56:43also change the properties and here we
- 1:56:46can see the
- 1:56:48properties like name we here we can I
- 1:56:50can change the name then snow names
- 1:56:53hidden if I want to hide data type
- 1:56:55percentage format thousand separator yes
- 1:56:58and no decimal places and in advance it
- 1:57:01will show me sought by column name data
- 1:57:03category and Su now I would like to
- 1:57:06change the data categories would like to
- 1:57:08show you example of data categories I
- 1:57:11will go to City column I'll scroll down
- 1:57:14and show you the data category and here
- 1:57:16I'm going to call it as
- 1:57:18City same way for State I will go ahead
- 1:57:21and I will Define the data category as
- 1:57:24state or Province it is not that this is
- 1:57:26available here if you go to the report
- 1:57:28view or the table view also you can go
- 1:57:32to the state and inside the data
- 1:57:34category of column tools also you can
- 1:57:36Define the data
- 1:57:38categories now we are done with the
- 1:57:41renaming and the column creation we have
- 1:57:44created our columns I would like to save
- 1:57:46this file and see is there any
- 1:57:48difference in the
- 1:57:50size of our file so let me drag back the
- 1:57:55folder and as you can see the size of
- 1:57:58the file has
- 1:58:01increased in this manner we can conclude
- 1:58:04that calculated columns
- 1:58:06are going to become part of the table
- 1:58:09data they will be calculated at the load
- 1:58:12time and will be saved inside the file
- 1:58:15and going to increase the size of the
- 1:58:16file they're also going to increase the
- 1:58:19load time now we will understand the
- 1:58:21major majors and then look at the
- 1:58:25difference between majors and calculated
- 1:58:29column the time has come that we should
- 1:58:31go ahead and create Majors let me tell
- 1:58:35you the definitions of the majors which
- 1:58:37I plan to create the first major I want
- 1:58:39to create is gross which is sum of gross
- 1:58:43sales amount from the sales table second
- 1:58:47major which I want to create is the cogs
- 1:58:49sum of sales tables cogs amount another
- 1:58:54major discount sum of sales tables
- 1:58:57discount
- 1:58:58amount then I'm going to use the
- 1:59:01measures which are already created to
- 1:59:03calculate net which is nothing but cross
- 1:59:06minus
- 1:59:07discount same way I'm going to create
- 1:59:10margin which is nothing but net minus
- 1:59:13cogs I will create two majors which
- 1:59:18should be Majors only because they are
- 1:59:21percentage measur
- 1:59:22and they need to be calculated using
- 1:59:25divide function which handles the divide
- 1:59:28by
- 1:59:29zero discount percentage equals to
- 1:59:32divide discount by
- 1:59:35gross and margin percentage equals to
- 1:59:38divide margin by net so these are all
- 1:59:41the measures I'm going to create so
- 1:59:43let's go to the powerbi and create
- 1:59:47these so now let's go ahead and quickly
- 1:59:49create the measures and to create the
- 1:59:52measures uh let me first go to the table
- 1:59:55View and try to create a measure and can
- 1:59:58I see the
- 2:00:00calculation just like calculated column
- 2:00:03in the table view so let me create my
- 2:00:06first major to create that again I can
- 2:00:09take the help from the table tool I have
- 2:00:11an option for new
- 2:00:14major also I have the same option in the
- 2:00:17Home tab for new major also on the right
- 2:00:21click of
- 2:00:22a table or a right click of a column
- 2:00:26similarly once you create a measure you
- 2:00:28will also have an option to create a
- 2:00:31major right now I'm going ahead with the
- 2:00:33right click on a table and new
- 2:00:37measure again in the case of measure we
- 2:00:40will get this formula bar where left
- 2:00:44hand side is the name and the right hand
- 2:00:46side is the
- 2:00:49formula this is what we call a measure
- 2:00:52or a Dax measure because we are going to
- 2:00:54use data analytics expression here to
- 2:00:58create our measures so first measure
- 2:01:01which we are going to create is
- 2:01:04cross in the cross measure I'm going to
- 2:01:07use the Dex function some some functions
- 2:01:10can take one column name and the column
- 2:01:13name which I want you to take here is
- 2:01:16sales gross amount and this is the
- 2:01:19reason I was adding amount at the end
- 2:01:21because finally when I create a major it
- 2:01:23should show me name only as
- 2:01:27gross as you can see the gross major is
- 2:01:30created in the sales table and I can see
- 2:01:33the major icon but when I scroll into
- 2:01:37the table it's not appearing inside the
- 2:01:39table so Majors will not appear in the
- 2:01:43table like calculated column second
- 2:01:46thing is even if I click on the item
- 2:01:49table and I I go ahead and
- 2:01:52use new major and this time I'm using it
- 2:01:54from table tool it would be able to
- 2:01:57create a major so this time I'm going to
- 2:01:59create C and CA equals to sum
- 2:02:04of
- 2:02:07tailes cogs
- 2:02:10amount so I'm creating a major cogs
- 2:02:13which is nothing but sum of cogs
- 2:02:15amount and as you can see I'm able to
- 2:02:17create this measure inside the item
- 2:02:21table does it make any difference for me
- 2:02:24let me go back to the report
- 2:02:26view in the report View From The Bottom
- 2:02:29near to the page one there is a plus
- 2:02:31button I'm going to press that plus
- 2:02:33button and add another page and in this
- 2:02:37page and in this page from build a
- 2:02:39visual let me add a table Visual and
- 2:02:42check out what I'm getting to do that I
- 2:02:45created a table visual enlarge it and
- 2:02:48let me bring in brand from the item
- 2:02:51table dragon drop onto this
- 2:02:53visualization and bring in
- 2:02:56Gross and
- 2:02:59cogs and you can see both of them
- 2:03:02working fine now without going back to
- 2:03:05the table view I can continue to create
- 2:03:09my Majors here so the next major which
- 2:03:12I'm going to create is Discount major so
- 2:03:16click on any of the table and say use
- 2:03:18new measure from the table tool and name
- 2:03:22is and let me enlarge
- 2:03:25it
- 2:03:27discount which is nothing but sum of
- 2:03:32sales discount
- 2:03:35amount the next major I would like to
- 2:03:38create is net and then in the net majure
- 2:03:42I would like to
- 2:03:44create from the two existing Majors so
- 2:03:47left hand side the name right hand side
- 2:03:49cross the major and I don't need to
- 2:03:51table name ideally speaking you should
- 2:03:54not use table name when you are using
- 2:03:57major because we can change the home
- 2:04:01table of the majors and I'm going to
- 2:04:03explain you that in a little bit of time
- 2:04:06and then I can separate the discount and
- 2:04:08I created a major which is net in the
- 2:04:11same manner I can create a major margin
- 2:04:15Again by clicking on new
- 2:04:19major and you can press and enter or you
- 2:04:22can press this commit button to commit
- 2:04:24this formula the moment you click
- 2:04:26outside it get automatically
- 2:04:30saved now we would like to create two
- 2:04:33measures which are division type and now
- 2:04:35discount percentage which
- 2:04:37is Discount divided by gross and margin
- 2:04:40which is margin divided by net which is
- 2:04:43actually the net margin are the division
- 2:04:45type formulas and they cannot be created
- 2:04:50as column as we have discussed when
- 2:04:52taking our example division should
- 2:04:55always be a measure now before I do that
- 2:04:59let me show you how can I add that these
- 2:05:01to the table so click on the table and
- 2:05:03just simply click on the check boxes and
- 2:05:07those will be added to the visualization
- 2:05:09now let's create one more new major
- 2:05:11again now I'm able to see the major tool
- 2:05:13because right now the major is selected
- 2:05:16and the major tool is canot
- 2:05:18only do a job of
- 2:05:22creation of a new major but it can do
- 2:05:24the formatting also and right now right
- 2:05:27now you can see the formatting is not
- 2:05:29there but what I'm going to do is I want
- 2:05:30to format multiple measures together
- 2:05:32definitely I'm going to show you because
- 2:05:34the formatting going to be compulsory
- 2:05:36for the discount percentage from the
- 2:05:37major tool but we will go to the data
- 2:05:41model view and from there we will use
- 2:05:43the properties to change them in one go
- 2:05:46so let me click on a new major
- 2:05:48again and this time I'll create a major
- 2:05:51discount
- 2:05:56percentage and I'm going to use a
- 2:05:59function divide divide functions takes
- 2:06:02three argument numerator denominator and
- 2:06:04Alternate result so numerator is
- 2:06:07Discount amount which is Discount major
- 2:06:10I can directly use a major here and when
- 2:06:13I'm using major it means sum of discount
- 2:06:15amount denominator is gross which is sum
- 2:06:17of gross amount so I'm using aggregated
- 2:06:19one I don't want to use alternate result
- 2:06:22what is the benefit of using this divide
- 2:06:24function divide function will handle
- 2:06:27divide by 0er so I don't have to bother
- 2:06:29about it let me press enter or commit
- 2:06:33and this will be committed and I can add
- 2:06:35this to table user as you can see this
- 2:06:38is coming as a ratio not as a percentage
- 2:06:41just like your Excel you might have used
- 2:06:44or if those of you not used go to the
- 2:06:45major tool when you click on a major
- 2:06:47major tool should be open and from there
- 2:06:51you can mark it as a percentage column
- 2:06:54by clicking on this percent icon it
- 2:06:56should show a boundary here and this
- 2:06:58boundary means it has been
- 2:07:01selected as you can see we are able to
- 2:07:03see percentage and now what I'm going to
- 2:07:06do is a quick Copy pcee for creating the
- 2:07:08margin percentage
- 2:07:10major I can go here again click on item
- 2:07:14or sales and from the table tools or
- 2:07:17from the major tool whichever is visible
- 2:07:19I can create new major and this time I'm
- 2:07:22just going to paste the definition
- 2:07:23margin percentage is equal to divide
- 2:07:26margin by net enter and my Majors is
- 2:07:29created so my base set of
- 2:07:32measure using which I can explain you
- 2:07:35the visualizations are created but as
- 2:07:38you can see these measures are created
- 2:07:40across various
- 2:07:41tables and some of them are not
- 2:07:44formatted what I'm going to do for that
- 2:07:47so first let me solve the
- 2:07:49formatting I have to indiv do if I go
- 2:07:52here I have to individually do I can
- 2:07:53can't select with the shift more than
- 2:07:56one so for that I'll tell you go to the
- 2:07:58model view and inside the model view
- 2:08:01with the shift or control you can select
- 2:08:03multiple measures so I'm selecting all
- 2:08:07those amount kind of a
- 2:08:09measures and let me uncheck the margin
- 2:08:12percentage all the amount kind of
- 2:08:14measures are selected first of all I can
- 2:08:17change their home table right now I'm
- 2:08:18not changing it I'll tell you the reason
- 2:08:20later but
- 2:08:22I will go here in the format and I can
- 2:08:25call them general or currency let me
- 2:08:27keep it General let me keep it thousand
- 2:08:30separator and decimal places let me keep
- 2:08:34it one for all of
- 2:08:37them Advance uncategorized everything
- 2:08:40should remain uncategorized let's go
- 2:08:43ahead and check what is the difference
- 2:08:45this action has made in the report view
- 2:08:48so I'll click on the report view left
- 2:08:50side and as you can see all of them got
- 2:08:53formatted pretty well
- 2:08:56here now left out is margin percentage
- 2:09:00we can go back and do it from model view
- 2:09:02or we can also do it from column tools
- 2:09:05so we click on the margin
- 2:09:07percentage and we can mark it as a
- 2:09:10percentage format column from here now
- 2:09:13it has become a percentage format two
- 2:09:14decimal place by default we can change
- 2:09:16it if required go back to the report
- 2:09:19view add this into the
- 2:09:22visualization and check out what we are
- 2:09:24getting so we are getting a two decimal
- 2:09:26place percentage
- 2:09:28number so in this manner we can
- 2:09:32modify the major properties using Major
- 2:09:36Tool or the property pan in the data
- 2:09:40model
- 2:09:41view you might have noticed that the
- 2:09:44till
- 2:09:45now I
- 2:09:48have increased the font when I was
- 2:09:50creating the formulas of the formula
- 2:09:53pane but I never changed the size of the
- 2:09:57font of the table though it's a really
- 2:09:59small font for recording and the reason
- 2:10:02I was not doing is because I want to
- 2:10:04handle it using
- 2:10:06the
- 2:10:08theme utilizing report themes allows for
- 2:10:12comprehensive design alteration across
- 2:10:14the
- 2:10:16report this include adoption of color
- 2:10:19schemes it's an implementation of fresh
- 2:10:21visual Styles once a report theme is
- 2:10:24applied it sets all default formatting
- 2:10:26for every visual in your report ensuring
- 2:10:29consistent and unified experience we
- 2:10:31want to get a unified corporate
- 2:10:33experience and the reason why I don't
- 2:10:36prefer to change any font or color
- 2:10:38without using a theme because once we
- 2:10:40change it sometime it is really
- 2:10:42difficult to apply themes on that and
- 2:10:44that is the reason why in spite of
- 2:10:47having a small font I have not changed
- 2:10:49it now the theme which I'm going to
- 2:10:51create is more suitable for the video
- 2:10:56purpose but what you should do is if
- 2:10:59you're doing a customer project or your
- 2:11:01organizational project find out top 10
- 2:11:04organizational
- 2:11:06colors and using those top 10
- 2:11:09organizational color and your
- 2:11:11organizational font you should create
- 2:11:14your theme let me tell you how to do
- 2:11:17that go to the view tab on the top
- 2:11:24and inside the view you have these
- 2:11:26default
- 2:11:27themes you can choose a starting point
- 2:11:31like darker or
- 2:11:33lighter based on your organization
- 2:11:36preferences which is most nearest or you
- 2:11:38can start with anyone let me choose this
- 2:11:40third one once I choose that you can see
- 2:11:43the fonts are still forther smaller I
- 2:11:46can play around choose one which suits
- 2:11:49best so I think this this accessable
- 2:11:52city park is something which is more
- 2:11:54suited to me and now I'm going to go
- 2:11:57ahead and modify this if I further
- 2:12:00scroll below I have options like browse
- 2:12:04themes where I can browse the theme
- 2:12:06theme Gallery I can go to the theme G
- 2:12:08customize current theme to customize the
- 2:12:10current theme which I'm going to use now
- 2:12:12save the current theme to save it with a
- 2:12:14name so that later on I can browse it
- 2:12:18and how to create theme to go to the
- 2:12:20documentation
- 2:12:22so let me use customized current theme
- 2:12:24option as of now and in this customized
- 2:12:27current theme the first option which I
- 2:12:29get is the name and the color where I
- 2:12:31have the color now this team as a name I
- 2:12:34can change this name if I want or I can
- 2:12:37go ahead and choose some little bit
- 2:12:38different colors so what I'm going to do
- 2:12:40here is I'm going to choose a little bit
- 2:12:41darker green for the first bar and let
- 2:12:45me change this yellow color a little
- 2:12:48bit there color seem fine negative
- 2:12:51positive and neutral I'm seeing an
- 2:12:53opportunity to change it little bit so
- 2:12:54let me change the red green seems fine
- 2:12:57neutral let me make it a little bit
- 2:12:59different
- 2:13:04blue and Divergent color I am fine with
- 2:13:07that I go to the Advance now this is
- 2:13:09really
- 2:13:10important choose the
- 2:13:13different elements of your visual like
- 2:13:15XIs grid line text box color font what
- 2:13:19are those in each categories for that
- 2:13:22click on this learn
- 2:13:23more and it's going to open a page for
- 2:13:27you and in this page this is basically
- 2:13:30the theme page which I'm also going to
- 2:13:32provide to you if you scroll down little
- 2:13:34bit below it is going to tell you if you
- 2:13:36change the first level what is going to
- 2:13:38change label background color trend line
- 2:13:41color text box default color table and
- 2:13:43Matrix values and total color data bar
- 2:13:48access color card data labels these is
- 2:13:50going to second level is going to change
- 2:13:53light secondary level text classes label
- 2:13:56color Legend label color exis label
- 2:13:58color third level X is grid line cover
- 2:14:02color table and Matrix grid color slicer
- 2:14:05and header background color multi row
- 2:14:08card outline color Etc fourth row legent
- 2:14:11dimed color card category label color
- 2:14:14multi- row card category label color
- 2:14:17then background is going to change the
- 2:14:18background color secondary background
- 2:14:20color and table
- 2:14:22accent there is more information also
- 2:14:25given here how to set up themes and what
- 2:14:29are the different components of that you
- 2:14:32can take advantage of this particular
- 2:14:34article I will also share the link of
- 2:14:38this into the description let's go back
- 2:14:41I don't want to change any of these as
- 2:14:43of now I'll go to the next item which is
- 2:14:46text and here I'm interested in so
- 2:14:49everywhere I see a font I'm going to
- 2:14:51increase It by Five Points now I don't
- 2:14:54want to change the font family but I
- 2:14:55have options to change it similarly I
- 2:14:57can change the font color which I'm
- 2:14:59currently not doing for title again I'm
- 2:15:02going to make it little
- 2:15:03bit larger 17 and let me change the
- 2:15:07title color let me make it
- 2:15:09blue make it a little bit darker blue
- 2:15:12which is going to be very near to
- 2:15:14Black cards and kpi again card is 45 is
- 2:15:18to already pretty big so I'm not going
- 2:15:20to change it tab headress I'm going to
- 2:15:22make it as 70 and the reason I'm
- 2:15:24increasing it by 5 pixel you might not
- 2:15:25have to do that much is because I'm
- 2:15:28recording a video and in that video I
- 2:15:30would like these things to be visible
- 2:15:33visuals background I don't want to
- 2:15:35change if I want I can increase
- 2:15:36transparency to
- 2:15:38100% of the visual background so that
- 2:15:40they take the background color it is
- 2:15:41mostly useful when you have a background
- 2:15:44which is of darker color so that you
- 2:15:46make all your backgrounds as transparent
- 2:15:48so that they can come on that particular
- 2:15:50back ground and you don't have to set a
- 2:15:52background for the visual but if you
- 2:15:54don't want that transparency keep it 0%
- 2:15:56borders borders are off but if you want
- 2:15:59borders by default on the visualization
- 2:16:01you can switch it on I don't want that
- 2:16:03by default so I'm keeping it as off and
- 2:16:05if you switch it on you can change the
- 2:16:07color and you can also decide the
- 2:16:09radius header header background color
- 2:16:12border color
- 2:16:13transparency uh if you want 100%
- 2:16:16transparency you can use icon colors I'm
- 2:16:18not going to change that I'm going to
- 2:16:20keep it as is tool tip is the label text
- 2:16:24color label text value drill text icon
- 2:16:28and background color this is something
- 2:16:30which these days we are going to use
- 2:16:31white but if you remember earlier we
- 2:16:33used to use little bit yellowish color
- 2:16:35so I'm going to make the tool tip little
- 2:16:37bit
- 2:16:39yellowish page wallpaper transparency I
- 2:16:43think I already changed transparency at
- 2:16:44one place but I'm going to keep it as is
- 2:16:46similarly P background transparency is
- 2:16:48100% if you want you can make
- 2:16:50transparency is zero so that it takes
- 2:16:52the whatever is there on the background
- 2:16:55let me leave it default as is filter
- 2:16:58pane the filter pane which is being
- 2:17:00given on the page on these things these
- 2:17:02are going to apply the filter pane the
- 2:17:04background color the transparency the
- 2:17:06font and the icon colors the title font
- 2:17:09I'm going to increase it to 17 header
- 2:17:11font size I'm going to make it as
- 2:17:1514 checkbox apply Color when you apply
- 2:17:19something on checkbox you want to CH
- 2:17:21that color it's right now the teal color
- 2:17:23I'll continue with that available filter
- 2:17:25cards color format filter cards haven't
- 2:17:28been applied yet background is white
- 2:17:30transparency is
- 2:17:310% font and color icon color it same and
- 2:17:36I'm going to make it 14 in the font
- 2:17:39filter applied card again I'm not going
- 2:17:41to change anything there I'm just going
- 2:17:42to change the
- 2:17:44font size so I'm done with my changes
- 2:17:48and let me apply and the moment I apply
- 2:17:50it you can see the font size have
- 2:17:52increased if I need further bigger font
- 2:17:54I can go ahead and do it but it seems
- 2:17:57good enough for me to use it as of
- 2:18:03now now the next step is saving this
- 2:18:06theme we will go back to the view again
- 2:18:08open this theme portion go down and
- 2:18:11press on save current
- 2:18:13theme and let's call it as or
- 2:18:19theme one
- 2:18:22so the theme is saved how do we test
- 2:18:25this so let me go ahead to the
- 2:18:28files
- 2:18:30open and I have saved one
- 2:18:33file other than this end to end click on
- 2:18:37it in the versions I'll open this end to
- 2:18:40endend version till columns in this file
- 2:18:42I'll add a visual and in that I'll try
- 2:18:44to apply this theme so let me create a
- 2:18:47visual quickly here
- 2:18:53and let me go ahead and put a theme so
- 2:18:55how do we do that go to
- 2:18:58view down arrow key on the theme browse
- 2:19:01the theme this time this time I'm
- 2:19:03browsing the
- 2:19:06theme in the data I have a theme 1. Json
- 2:19:09I'm going to select that once I come
- 2:19:12back and this theme is applied I get a
- 2:19:15message
- 2:19:16file successfully added I can press got
- 2:19:20it and as you you can see the theme has
- 2:19:23changed the font size and other things
- 2:19:27would have also changed now as we
- 2:19:28progress further into the visualization
- 2:19:30we'll see impact of
- 2:19:33those now we will learn how to enable
- 2:19:36the dark mode we are going to look at
- 2:19:38the settings to enable the dark mode
- 2:19:41which has made its way to September 2024
- 2:19:45release so let's jump on to the release
- 2:19:47note first and this is powerbi set
- 2:19:50September 2024 feature summary and if
- 2:19:53you scroll down one of the first
- 2:19:56announcement which you can see is that
- 2:19:59you can now choose from a variety of
- 2:20:01themes powerb desktop including the most
- 2:20:04requested Dark theme you can personalize
- 2:20:07your data visualization experience to
- 2:20:09match your preferences and working
- 2:20:11environment if you further scroll down
- 2:20:13you will see IND the content in the
- 2:20:15journal by popular demand dark mode is
- 2:20:18now available on powerb desktop
- 2:20:21and when you click on this you will see
- 2:20:23how to enable it so you have to go to
- 2:20:26options and settings Global reporting
- 2:20:30setting and personalization so let me
- 2:20:32showcase you that and while showcasing
- 2:20:36we will take two kinds of file one which
- 2:20:38is using a dark theme on the
- 2:20:41visualization and one which is using
- 2:20:43lighter theme in the visualization so
- 2:20:45let me showcase my file to you this is
- 2:20:47my first file which is using a white
- 2:20:49theme
- 2:20:51and this is my second file which is
- 2:20:52using the darker theme and these are the
- 2:20:56powerbi report themes now we would like
- 2:20:59to change the overall desktop theme so
- 2:21:01for that I'll go to file options and
- 2:21:05settings below
- 2:21:08options and click on options options
- 2:21:12popup will open inside the options popup
- 2:21:15inside the global go to report settings
- 2:21:19and inside the report settings come down
- 2:21:22inside the
- 2:21:23personalization you have option dark
- 2:21:26light use system setting so I'm going to
- 2:21:29use dark here click on okay as you can
- 2:21:33observe all the menu items the right
- 2:21:36hand side data Pan the left hand side
- 2:21:38pan everything is now using Dark theme
- 2:21:41my model viewer is also showing the
- 2:21:43darker theme now if I go to this file
- 2:21:46now because I have applied on that file
- 2:21:49maybe I have to open this file again let
- 2:21:51me open this file again and this file is
- 2:21:53already open but what I can do is
- 2:21:55basically uh I can open it and you will
- 2:21:56see this power bi desktop Opening screen
- 2:22:00itself has changed now this file is
- 2:22:03opening again and it has open on the
- 2:22:05different window it will bring it in and
- 2:22:08as you can observe that your powerbi
- 2:22:10desktop is in the dark theme now
- 2:22:13everything which belongs to power VA
- 2:22:15desktop other than your reporting canvas
- 2:22:17area which can have its own reporting
- 2:22:19theme every everything is using do theme
- 2:22:23so do theme has been applied here on all
- 2:22:26the files globally you can look at the
- 2:22:28data view all your tables all your icons
- 2:22:31have changed these are your icons these
- 2:22:33this is your table data view model view
- 2:22:36already shown you Dex query view
- 2:22:38Everything Has Changed to darker
- 2:22:41them I opened a new file with the dark
- 2:22:45one I have closed all my power ba
- 2:22:47instances which were running before I
- 2:22:49applied the Dark theme and I have opened
- 2:22:52a blank new file with a dark theme where
- 2:22:55I'm now going to open a blank report let
- 2:22:58me click on the blank report and now
- 2:23:01here I would like to get the data and I
- 2:23:03can use a powerbi semantic model for
- 2:23:06that let me bring in one semantic model
- 2:23:09and we can use this calculation group
- 2:23:11semantic model which I was using for
- 2:23:13quite some time so the semantic model
- 2:23:16has loaded into the powerbi and as you
- 2:23:18can see all the UI you can observe they
- 2:23:21have been adjusted with reference to
- 2:23:23dark mode the model view is in the dark
- 2:23:26mode the Dex squarey view is in the dark
- 2:23:28mode and we can see all the uis are
- 2:23:31perfectly fine with the dark mode so you
- 2:23:33have seen that we have chosen the dark
- 2:23:35mode and the impact of the dark mode is
- 2:23:37mostly on the menu items it is not
- 2:23:40related to your report theme if you want
- 2:23:42to change your report theme basically
- 2:23:45powerbi report you have to still have to
- 2:23:47go to view and there you can go ahead
- 2:23:49and choose use a dark theme and then
- 2:23:52your report canvas will also use a
- 2:23:55darker theme or whatever theme you have
- 2:23:57selected so you can have your report
- 2:23:59canvas theme or report theme which is
- 2:24:01separate from your powerbi desktop
- 2:24:04darker theme that is different from this
- 2:24:06one so you can choose whatever theme you
- 2:24:09still want for your reporting canvas or
- 2:24:12your powerbi report so go ahead and
- 2:24:15explore this dark mode we would like to
- 2:24:19learn now how to create a table visual
- 2:24:21before that let me tell you how to
- 2:24:23rename a page so the page name is here
- 2:24:26in the
- 2:24:28bottom you can double click on that and
- 2:24:31you can change it so I'm calling it as a
- 2:24:33main page now near to that there is a
- 2:24:35plus button and I'm going to create a
- 2:24:37new page using that one so I'll click on
- 2:24:41that and this is a new page and let me
- 2:24:43double click on this one also and call
- 2:24:45it as table because I'm going to create
- 2:24:46a table visual on that to create a table
- 2:24:49visual either from the Home tab insert
- 2:24:52visualization I can use it or I have
- 2:24:54already enabled the build visual in case
- 2:24:56you are not seeing it you can enable it
- 2:24:58using the view and then further by
- 2:25:01clicking here on the build a visual so
- 2:25:05you should be able to see this pain from
- 2:25:07any of these places you can use the
- 2:25:09table visual so in the build a visual
- 2:25:11I'm going to click on the table
- 2:25:14Visual and it will add a visual on the
- 2:25:19page which which I'll click on the
- 2:25:21visual and drag it down and make it
- 2:25:23little bit
- 2:25:25bigger once I've done that if I have
- 2:25:28clicked on it I can see the check boxes
- 2:25:31on the data pane which I can click to
- 2:25:34bring in the data or if it is not
- 2:25:39selected then I can drag and drop so let
- 2:25:42me drag item brand either on the visual
- 2:25:46that's First Option then let me drag
- 2:25:49category inside the columns which is is
- 2:25:52below the Builder visual
- 2:25:55visuals and third option is because now
- 2:25:58this visual is selected I can actually
- 2:26:00go ahead and add some major by simply
- 2:26:03clicking on them so you can drag it on
- 2:26:06visual you can drag it on the columns or
- 2:26:10you can check the check boxes and add
- 2:26:12certain
- 2:26:13things now what are the options
- 2:26:16available here with the table visual so
- 2:26:18let's have a look at the options of the
- 2:26:19table visual ual so first we would like
- 2:26:22to see the options inside the three dot
- 2:26:24so in the three dot we have export data
- 2:26:26option using which you can export the
- 2:26:28data into a CSV
- 2:26:31format on the three dots we have another
- 2:26:34option to us table which is pretty much
- 2:26:36applicable for all the visuals and it
- 2:26:40will show as it as a table in case of
- 2:26:43table visual it is already a table so
- 2:26:46we'll continue to show it like that and
- 2:26:48there is a button back to report which
- 2:26:50which we can use come back to the report
- 2:26:52this especially helpful when you have
- 2:26:54multiple Visual and you want it to see
- 2:26:56in table then the next one is remove we
- 2:26:59can remove this which we don't want to
- 2:27:00do automatically find cluster is an AI
- 2:27:04option which we are going to explore
- 2:27:05later then we have option Spotlight sort
- 2:27:09by we can choose a sort by column like
- 2:27:11brand category and cogs and the format
- 2:27:14option right now you can already see the
- 2:27:16format pin is open because this is how I
- 2:27:20have set up my panes because of which
- 2:27:23it's open if it is not open you can use
- 2:27:25that option now let's go back to the
- 2:27:27swort option let me say sort on brand
- 2:27:30now you can see that it has been sort in
- 2:27:33on brand on descending now I can go
- 2:27:35ahead here again I will see the option
- 2:27:38for ascending and descending and I can
- 2:27:39click on sort
- 2:27:42ascending right now it is sort
- 2:27:47descending now table visual is one VIs
- 2:27:50ual where we can have multiple sorts so
- 2:27:52now it is already sorted if you want to
- 2:27:54change here from here also you can click
- 2:27:57and
- 2:27:59change if you click
- 2:28:02on the name of the brand you can see the
- 2:28:05Sorting is changing now press the shift
- 2:28:08button and now you can sort the category
- 2:28:11but I don't want to sort category by
- 2:28:13name I want to sort the category by
- 2:28:15cross and let me click on it so what
- 2:28:18does it do is by default for number it
- 2:28:20sort by descending so it is sorted on
- 2:28:24column one's brand and sort descending
- 2:28:28on
- 2:28:31Gross so first sorting was on brand and
- 2:28:34second sorting is on the gross so double
- 2:28:36sorting is possible you can have
- 2:28:38multiple sorting using the shift button
- 2:28:40now when you click on this because of
- 2:28:41the on object interaction it is start
- 2:28:44showing which property you can change if
- 2:28:47I click here which property can change
- 2:28:49if I click here
- 2:28:50if I click on the header it started
- 2:28:52showing the column header text so in
- 2:28:54this manner the on object interactions
- 2:28:57allow you to change the particular
- 2:28:59Properties by clicking on that
- 2:29:01particular set now let me click on the
- 2:29:04table and let me take you through all
- 2:29:06the visual properties one by one for the
- 2:29:08table visual size and style is the first
- 2:29:11property now you can see the height and
- 2:29:13width is based on what I've created and
- 2:29:17then the lock aspect ratio in case if I
- 2:29:19use use the lock aspect ratio if I
- 2:29:22resize the table it will maintain the
- 2:29:23same ratio which I've taken currently
- 2:29:26which I'm not not planning to do right
- 2:29:27now horizontal and vertical is the
- 2:29:29position it will change the moment I
- 2:29:31move the table up and
- 2:29:33down next comes the padding the padding
- 2:29:36is from the top bottom so this is the
- 2:29:38padding I can reduce it as per need
- 2:29:41background right now the background is
- 2:29:43on and there is a color I can go ahead
- 2:29:46and change this
- 2:29:47color and because the transparency is is
- 2:29:50100% I have to reduce the transparency
- 2:29:52to see the background color so the
- 2:29:53background color is the color which is
- 2:29:56behind the table I can increase little
- 2:29:59bit of transparency to keep
- 2:30:01it if I switch off the background
- 2:30:04color there will be no background and I
- 2:30:06will be able to see the page background
- 2:30:09color I enable it again the next option
- 2:30:12is visual border right now it is
- 2:30:14disabled I can I can switch it on you
- 2:30:16will be able to see a border now if you
- 2:30:18click outside let me click inside it
- 2:30:20and let me go ahead and and change the
- 2:30:22rounded corner so that you can
- 2:30:24understand what's happening there so now
- 2:30:27you can see the rounded corners for this
- 2:30:30table you can see a border as well as
- 2:30:32the rounded
- 2:30:35Corners in case you want a shadow you
- 2:30:37can switch it on and it will start
- 2:30:39showing the shadow you can decide the
- 2:30:41shadow color and you can decide whether
- 2:30:43it should be inside or outside and where
- 2:30:45it should be it should be bottom bottom
- 2:30:47right bottom left various options have
- 2:30:50given which you can choose I would like
- 2:30:52to keep it bottom right only that's the
- 2:30:54most suitable option for a
- 2:30:57shadow right now there is no title but I
- 2:30:59can enable the title so let me enable
- 2:31:01the title and I can double click here
- 2:31:03and give the title so there are two
- 2:31:05places where I can do it I can give a
- 2:31:08title from here or I can double click
- 2:31:10here in the title itself and I can give
- 2:31:12a title so let me call it as
- 2:31:16table
- 2:31:17Visual and as you can see whatever I'm
- 2:31:21typing here it is also appearing here in
- 2:31:23the text the FX means I can use a majure
- 2:31:26here so if I need a dynamic title I can
- 2:31:28create a mejor and I can use inside it
- 2:31:31right now it is using heading three I
- 2:31:33can changes as per
- 2:31:36need similarly I can use bold italic and
- 2:31:39underline for it I can use a color
- 2:31:43background color is right now nothing I
- 2:31:44can choose it again I can use FX means
- 2:31:47function means I can use measure and let
- 2:31:50me showcase you at one place so if I
- 2:31:51click FX here I I'm able to see field
- 2:31:54value and I can choose what major I want
- 2:31:56to display
- 2:31:59here now there is a subtitle option
- 2:32:02right now there is no subtitle which has
- 2:32:04been used I can enable the subtitle and
- 2:32:07now I get a subtitle option here again
- 2:32:10either I can type it here or I can use a
- 2:32:13majure using FX or I can type directly
- 2:32:15here we prefer on object interaction we
- 2:32:18like to write on the visual so let's
- 2:32:21say
- 2:32:24information for brand
- 2:32:30and
- 2:32:36category for subtitles again we can
- 2:32:38choose text colors now right now this
- 2:32:41text color is not matching so I'm going
- 2:32:42to change it out then you can choose the
- 2:32:46horizontal alignment right now it is
- 2:32:48left aligned this one is little bit
- 2:32:50darker I can make it middle align so it
- 2:32:52will go into the middle and to match it
- 2:32:55also I'll make the title also middle
- 2:32:57align so both title and the subtitles
- 2:32:59are now middle aligned text wrap if
- 2:33:02there is a larger text we can use text
- 2:33:04wrap so that it get into the next line
- 2:33:06instead of cutting it
- 2:33:08down then we have divider which is right
- 2:33:10now not off I can enable it and you will
- 2:33:13start seeing a divider between the
- 2:33:15header and
- 2:33:17the table area it is solid one pixel we
- 2:33:21can increase the pixel to understand it
- 2:33:23better ignore padding is on you if you
- 2:33:26want you can disable that next is
- 2:33:28spacing spacing is customize spacing is
- 2:33:32off if you want you can customize the
- 2:33:34spacing switch it on and let me reduce
- 2:33:37the spacing and as I'm reducing the
- 2:33:39spacing you can see the impact between
- 2:33:41the below area and of the above area
- 2:33:44next is style
- 2:33:47resets now right now the style is
- 2:33:49different fa and which is the Shaded
- 2:33:52style if I choose none you can see the
- 2:33:54difference what is happening in this
- 2:33:56table and I'm going to use few of these
- 2:33:59Styles and showcase you what all they
- 2:34:00can do border header this is one style
- 2:34:04which actually I'm liking a lot
- 2:34:05alternating rows this also seems good
- 2:34:09contrast alternating
- 2:34:12rows flashy
- 2:34:14colors border and flashy
- 2:34:17colors bold and flashy
- 2:34:20colors
- 2:34:22bars
- 2:34:25condensed I'll keep it to default right
- 2:34:28now and based on this when you go to
- 2:34:31some of the features like especially
- 2:34:32when you want to color the rows you will
- 2:34:34get that option of alternating colors
- 2:34:37right now because it is by default
- 2:34:38alternating color and you go to grid so
- 2:34:40right now the horizontal grid lines are
- 2:34:42on so these are the grid lines which you
- 2:34:44could make a note of
- 2:34:47it these are hor onal and these are
- 2:34:50vertical so let me off and on let me
- 2:34:55increase the size little bit you will be
- 2:34:57able to differentiate similarly vertical
- 2:35:00are off I can on it and if I increase
- 2:35:03the size you can use grid lines vertical
- 2:35:06and horizontal it's not looking so great
- 2:35:08right now but to explain to you I have
- 2:35:10to do those changes now I may choose a
- 2:35:13different color also
- 2:35:20next one is border and let me showcase
- 2:35:23you right now if you notice there is no
- 2:35:25border for this particular section of
- 2:35:26the table but let me enable it me enable
- 2:35:30top you can see the border on the top
- 2:35:34here same way
- 2:35:36bottom left right and let me increase
- 2:35:40the width a little bit you will be able
- 2:35:42to observe B on all the
- 2:35:46sides next one is options there is a
- 2:35:49rope adding which you can increase which
- 2:35:51will increase the padding between the
- 2:35:53lines I'm going to decrease that to zero
- 2:35:57and Global font if you want to increase
- 2:35:58the font but we don't want to disturb
- 2:36:00the font we would like to continue with
- 2:36:03the font from the
- 2:36:07theme now comes the important which is
- 2:36:10values now we want to play around the
- 2:36:12values values is typically these these
- 2:36:15These are called as
- 2:36:17values now you can see that I have the
- 2:36:21text color and the background color
- 2:36:22alternate text color and Alternate
- 2:36:24background color and this is because our
- 2:36:26theme is alternating color and just to
- 2:36:28explain it to you let me change the
- 2:36:32color so that you're able to make sense
- 2:36:36out of
- 2:36:37it and then alternating text color let's
- 2:36:40only change the the background
- 2:36:46color let's change the text color now
- 2:36:52again rep text in case the text taking
- 2:36:55more place we can use rep text in of
- 2:36:58cutting
- 2:36:59down so these are the values which has
- 2:37:01changed next comes the column
- 2:37:04header in the column header again this
- 2:37:07is the area which is going to be
- 2:37:08impacted because of the column header
- 2:37:10let's make the column header as bold
- 2:37:13metallic and underline color I'm fine
- 2:37:16with that background color white is also
- 2:37:18fine and do I want to make them left
- 2:37:22align or centrer align as this is a
- 2:37:24generic one I don't want to use there
- 2:37:26are better options available to handle
- 2:37:28it based on each column so we are going
- 2:37:31to use that option right now let's leave
- 2:37:33it let's go to the next option Auto size
- 2:37:37width now what happens
- 2:37:39is if you can go ahead and resize these
- 2:37:42columns but what would happen if you do
- 2:37:45certain
- 2:37:46changes this may get back to its
- 2:37:48original size
- 2:37:50because of the auto size width so let's
- 2:37:53say you use a filter or a slicer and
- 2:37:56this may come back to its original size
- 2:37:58if I don't want it to come to original
- 2:38:00size then what I'll do is I'll switch it
- 2:38:04off so that once I fix this width it
- 2:38:07should not resize and that's where we
- 2:38:09can use Auto size width
- 2:38:13off then the next option is for totals
- 2:38:18total we have value
- 2:38:20values and we can switch off the totals
- 2:38:23we don't want the totals and if you
- 2:38:25switch it on now do I want to call it
- 2:38:28total or do you want to call it grand
- 2:38:30total again static in
- 2:38:33nature uh you don't have an option for
- 2:38:36FX text color you can Define and
- 2:38:38background color you can Define then
- 2:38:41comes the most powerful option specific
- 2:38:43columns now here what you can do is you
- 2:38:47can choose each column and for that you
- 2:38:48want to decide you want to change
- 2:38:51something which should apply to header
- 2:38:53apply to total or apply to values like
- 2:38:56this is one common question which you
- 2:38:58ask that for the discount column I want
- 2:39:01everything to be same I would like to
- 2:39:03apply to header apply to total and apply
- 2:39:06to values what I want to do here is I
- 2:39:08want a text color let's
- 2:39:11say
- 2:39:14orange and I want the alignment as left
- 2:39:18so for the entire category
- 2:39:21column you can see the text color is
- 2:39:25orange and the alignment is left and
- 2:39:28even for the alternate color it has
- 2:39:30changed so this is when you want it to
- 2:39:34do it for complete column there is no
- 2:39:36background color we can actually go
- 2:39:38ahead and give a background color and
- 2:39:39you now you can see because we I have
- 2:39:41given a background color it is not
- 2:39:43following that
- 2:39:46alternative so in this manner in case
- 2:39:49case there is a
- 2:39:52requirement that you wanted to have one
- 2:39:55single column from top to bottom
- 2:39:57following something you can do that or
- 2:39:59you may would like to say now don't
- 2:40:01apply it to values I'm fine with
- 2:40:02alternating colors I'm now only applying
- 2:40:05it to header and
- 2:40:08total next comes the option of cell
- 2:40:13elements now cell elements provide us
- 2:40:16opportunities for conditional formatting
- 2:40:19the advantage in the table visual is
- 2:40:21that we can do it on all the
- 2:40:24columns we have something known as
- 2:40:26Matrix visual where we will not be able
- 2:40:27to do it on rows and columns we don't
- 2:40:31have a concept of rows and columns here
- 2:40:32everything is a column here so we can do
- 2:40:34it on all each and every column and just
- 2:40:37for the Showcase purpose I'll show you
- 2:40:39one conditional formatting on the
- 2:40:41background but later on we will come
- 2:40:43back and do a deep dip on the
- 2:40:46conditional formatting let me explain
- 2:40:47you how to use conditional formatting
- 2:40:49with one base example so I'll click on
- 2:40:51the background color and it
- 2:40:53automatically opens a popup which we
- 2:40:55call the conditional formatting popup it
- 2:40:58has three Styles gradient Rule and field
- 2:41:01value base I'm going to use the gradient
- 2:41:04style as of now that's the easiest one
- 2:41:06value only values and total means it
- 2:41:09will apply to total total only it will
- 2:41:11only happen to Total I'll use values
- 2:41:12only right now count of brand typically
- 2:41:15it needs a measure or a calculated
- 2:41:17column so I'll prefer a measure which is
- 2:41:19net here I'll choose that and it is from
- 2:41:23lowest value red and highest value is
- 2:41:25green I can add a middle color but those
- 2:41:28things we will explore later and right
- 2:41:31now I'm going to press okay
- 2:41:33button to apply this and as you can see
- 2:41:37the conditional formatting has been
- 2:41:39applied here and we can see different
- 2:41:41different background colors depending on
- 2:41:43the net value we can explore font
- 2:41:45condition formatting which will happen
- 2:41:46on the font icon which will show icons
- 2:41:50web URL which will show web
- 2:41:54URL the next one is URL icon for this
- 2:41:57you need to have a column which is
- 2:41:59having URL and you can convert it into
- 2:42:01icon it should not show the URL so we
- 2:42:04will use this inside the Matrix visual
- 2:42:08for that we are going to add a URL in
- 2:42:10our item table image size in case you
- 2:42:12are using an image then you can use the
- 2:42:15image height and width the image size
- 2:42:18will only be app cable when I have the
- 2:42:20image right now I don't have image so we
- 2:42:22will take back these URL icon and image
- 2:42:24icon later we have certain images which
- 2:42:26we wanted to show IND visuals and we'll
- 2:42:29take this up later accessibility refer
- 2:42:31to row non select brand category you can
- 2:42:35use these options so these are the table
- 2:42:38specific properties which we
- 2:42:41have there are generic properties which
- 2:42:43apply to each and every visual like
- 2:42:46header icons so header icons are these
- 2:42:48icons which you are seeing can disable
- 2:42:50these header icons but they will not get
- 2:42:52disabled here these icons will get
- 2:42:54disabled in powerbi service so even if
- 2:42:56you disable here these header icon
- 2:42:58you'll continue to see they will get
- 2:43:00disabled once you publish the file you
- 2:43:02can decide the color for these icon
- 2:43:04border Etc now you can decide what icon
- 2:43:07you want like visual information visual
- 2:43:09warning visual error drill down drop
- 2:43:12down drill up these are generic options
- 2:43:14right now you're not seeing all of these
- 2:43:16options whatever is applicable for this
- 2:43:18visual at that particular moment you are
- 2:43:19seeing it
- 2:43:21but again if you uncheck some of these
- 2:43:24options like filter option if I uncheck
- 2:43:26you will see that still the filter
- 2:43:28option is there again this will be
- 2:43:31hidden once we publish the
- 2:43:34file you can use reset to default this
- 2:43:37option is available at many places helps
- 2:43:39you to get to reset to default tool tip
- 2:43:42right now you're not able to see the
- 2:43:44tool tip if you enable it you will start
- 2:43:46seeing a tool tip here
- 2:43:49and if you disable it the tool tip would
- 2:43:51be completely
- 2:43:52off alternate text while loading what
- 2:43:55alternate text you wanted to show you
- 2:43:57can also use FX option for that advanced
- 2:44:00option is basically responsiveness and
- 2:44:03maintain layer order which is off right
- 2:44:05now these are the properties used by
- 2:44:08table Visual and as you see we have done
- 2:44:11quite a lot around it what we can do is
- 2:44:14some of these things we can say reset to
- 2:44:16default so one of the property I've done
- 2:44:18is basically
- 2:44:19the grid I have reset to default
- 2:44:22similarly style preset reset to default
- 2:44:25title is fine sizing and style is
- 2:44:29fine reset to default the text
- 2:44:33colors column headers reset to
- 2:44:37default values reset to default specific
- 2:44:41column reset to default and as you now
- 2:44:45observe we are almost at the very
- 2:44:47starting stage yes I'm leaving
- 2:44:49ahead what I've have done as a
- 2:44:50background color and the headers so I'm
- 2:44:53keeping them as is but in this manner
- 2:44:55you can revert few of the things to
- 2:44:57deset to default it helps you for
- 2:44:59experiment and come back to the initial
- 2:45:04position so we have now learned how to
- 2:45:07create a table visual to multiple
- 2:45:09sorting and do various kind of
- 2:45:11formatting on table
- 2:45:14visual let's start creating a matrix
- 2:45:16visual so I'll add another page for that
- 2:45:19using the plus button at the bottom plus
- 2:45:22button let me double click and rename
- 2:45:26Matrix you can also right click and
- 2:45:28rename if you want to delete you can
- 2:45:30delete duplicate you can duplicate if
- 2:45:32you want to hide now when you hide it
- 2:45:34here it doesn't mean that it's going to
- 2:45:36hide here it's just going to show you uh
- 2:45:38that it will be hidden but it will be
- 2:45:40hidden only in powerbi service in the
- 2:45:43viewing mode now to add a matrix visual
- 2:45:46again we can have option either for from
- 2:45:50build a visual which I enabled from here
- 2:45:52which was not visible or you from the
- 2:45:55Home tab you have the insert
- 2:45:57option The Matrix visual is lying
- 2:46:02here if you can notice and in case of
- 2:46:05the top it's lying here one of the two
- 2:46:07places you can use I'll click on the
- 2:46:09Matrix visual here on the build of
- 2:46:12visual Pane and bring it little bit down
- 2:46:17and and make it little a little bit
- 2:46:20bigger now unlike table visual we have
- 2:46:24some different options like row columns
- 2:46:26and values and once we add that you will
- 2:46:29be able to understand what I'm talking
- 2:46:31about and metrix visual has quite a lot
- 2:46:33of option for display also so first we
- 2:46:36focus on the display related options and
- 2:46:39then we go through the other properties
- 2:46:42of the Matrix visual um quite a few
- 2:46:45properties of the Matrix visual is
- 2:46:48similar to table visual but this one
- 2:46:50property which you will find missing
- 2:46:52here is basically sorting on multiple
- 2:46:55columns that's not available here the
- 2:46:57Sorting automatically get adjusted when
- 2:47:00you have multiple
- 2:47:03rows either on the value or on the
- 2:47:06categories so let me start creating a
- 2:47:08matrix visual a very simple Matrix
- 2:47:10visual I'll drag a brand it will group
- 2:47:12The everything by brand and then I'll
- 2:47:15bring in the major
- 2:47:19the
- 2:47:21values I can actually also bring a
- 2:47:23quantity
- 2:47:27column and as you can see there's a sum
- 2:47:29of quantity but if I try to remove the
- 2:47:32aggregation I don't have any
- 2:47:34option but if you go to a table
- 2:47:37Visual and you try to add a quantity
- 2:47:40column let's say inside a table visual
- 2:47:42as a column you you do have option of
- 2:47:45aggregation don't summarize it means you
- 2:47:48can group it by quantity but the option
- 2:47:51is not available in Matrix values the
- 2:47:54values has to be aggregated so that is
- 2:47:58why there is no option for no
- 2:48:00aggregation
- 2:48:02here don't aggregate is not an
- 2:48:05option let me cross
- 2:48:08that now you can add multiple Majors if
- 2:48:11you
- 2:48:14like I check that
- 2:48:20you have one row you can have multiple
- 2:48:21rows the moment you have the multiple
- 2:48:23rows you will start seeing the plus
- 2:48:26button now it depends on you how you
- 2:48:28want to use that the moment you have
- 2:48:31more than one you start seeing the drill
- 2:48:33icons you start seeing these buttons
- 2:48:36also if you press a button it will only
- 2:48:40explode that particular brand and it
- 2:48:43will make it
- 2:48:46bold and if you want to go up you can
- 2:48:48close these
- 2:48:51buttons or in even in the Open Stage you
- 2:48:55can use this button which is known as
- 2:48:57drill
- 2:49:03up the second button and right now
- 2:49:06because it's only the row where we have
- 2:49:08the multiple columns that's why you are
- 2:49:09seeing is later on we'll see that when
- 2:49:12columns have multiple we can do the same
- 2:49:13stuff on the columns also now the second
- 2:49:16button is drill down now what does drill
- 2:49:18down down button does is let's say right
- 2:49:20now if I click on the brand one it
- 2:49:22doesn't do anything the moment I press
- 2:49:25this click on drill down and now if I
- 2:49:27click here on the brand one you can see
- 2:49:29the brand one is getting
- 2:49:32filtered let
- 2:49:34me use drill up and uncheck this option
- 2:49:38the next one is next hery level what
- 2:49:41does it do it doesn't drill down it
- 2:49:44simply take me to the next hierachy
- 2:49:46levels and as you can see the totals are
- 2:49:48same what we had previously it means we
- 2:49:51are just seeing the next level come back
- 2:49:54to the top level you can use drill up if
- 2:49:56there are more than one level same thing
- 2:49:58you have to use multiple
- 2:50:00times while the next level take us to
- 2:50:03the next level means it's take us to the
- 2:50:06next available level which is basically
- 2:50:08in this case the next level is like
- 2:50:11this going
- 2:50:13down the expand adds the next
- 2:50:16level if I right now I have only one
- 2:50:19level but if I have more than one level
- 2:50:21I have to use expand multiple times it
- 2:50:24starts showing both of them and that's
- 2:50:27the place new Option comes in so now you
- 2:50:31have expanded it the display is like
- 2:50:34this this display is known as stabbed
- 2:50:39layout the options in The Matrix visual
- 2:50:43has changed so once the metric visual
- 2:50:45will finish I will showcase you the new
- 2:50:48options which has come very
- 2:50:53recently you go on the visual format now
- 2:50:56I have already have a format pane open
- 2:50:58if you don't have again you can enable
- 2:51:01if it is visible here you have an option
- 2:51:03here on the three dots for the format
- 2:51:05Pane and again in the view tab you can
- 2:51:08enable it if you scroll down inside the
- 2:51:11row
- 2:51:13headers if you scroll down the options
- 2:51:16you will see stabbed layout now right
- 2:51:18now it is on you can increase the
- 2:51:20indentation
- 2:51:23here
- 2:51:26okay now the second option or the layout
- 2:51:29which is if you switch it off the
- 2:51:31stepped layout if you switch it
- 2:51:34off then it will give you this kind of
- 2:51:37look and
- 2:51:39feel so this is non sted layout and
- 2:51:43sometime we use this now there are plus
- 2:51:46and minus icons you have option for that
- 2:51:48one is definitely you can change the
- 2:51:49color you can make them little bit
- 2:51:51bigger if they are looking small and one
- 2:51:54more thing you can switch them
- 2:51:57off now we had a pretty good Advantage
- 2:51:59when they have we could have pressed
- 2:52:01this plus button and open it let's go up
- 2:52:03and see what happens now if I click here
- 2:52:05I don't have button I can't go there I
- 2:52:08have to use the next level by either
- 2:52:11using the drill down or by
- 2:52:14expand now let's further play around
- 2:52:18with the Matrix
- 2:52:22visual before I go ahead and make it
- 2:52:25little bit complex by adding column I
- 2:52:27would like to show you one property
- 2:52:29which actually will become little bit
- 2:52:31complex once I have the columns and from
- 2:52:34using that only I would like to switch
- 2:52:37how would we add columns to this Matrix
- 2:52:39visual so let me remove even categories
- 2:52:42from
- 2:52:44here now if I go to the values scroll
- 2:52:48down
- 2:52:48[Music]
- 2:52:50I have this option switch values on row
- 2:52:54group rather than
- 2:52:56columns if you this is right now off if
- 2:52:59you switch it on you start seeing your
- 2:53:02measures on the row previously they were
- 2:53:04on the column
- 2:53:08here now I can completely
- 2:53:12remove any kind of row and
- 2:53:16column to have a kpi
- 2:53:20look you've seen the row look or I can
- 2:53:24only bring in data on
- 2:53:27columns to have Majors on the
- 2:53:30row and the data on
- 2:53:34columns again I can have multiple things
- 2:53:37on my
- 2:53:39column and once I have more than one
- 2:53:41thing I have options like drill down if
- 2:53:46I click I'll go there drill
- 2:53:50up go to the next
- 2:53:53level drill up expand both of them are
- 2:53:57available in case of expand here in the
- 2:54:00column we don't have a stepped layout
- 2:54:03it's always going to be like
- 2:54:05that so now you have seen rows
- 2:54:08separately you have seen column
- 2:54:10separately and you have seen Majors on
- 2:54:13the row time to bring Majors back on the
- 2:54:15column because we are going to create a
- 2:54:18pwot table kind of a structure by moving
- 2:54:22the
- 2:54:23brand here and I'll tell you a new
- 2:54:26option to add the data I'll click add
- 2:54:27data here and now I'm not dragging it
- 2:54:30from the data pane I'm simply going it
- 2:54:33and adding it from here only so now we
- 2:54:36have a pwat structure where we have
- 2:54:39brands on the row and
- 2:54:42categories on the column and the majors
- 2:54:46are also on the column and you can play
- 2:54:49around take the measures on the
- 2:54:53row I can further complicate it and to
- 2:54:57do that complication let me bring
- 2:55:00in
- 2:55:02brand here and let me dra categories
- 2:55:05little bit below and knowingly I've
- 2:55:07taken brand and category columns here
- 2:55:09because they have lesser number of
- 2:55:10values number of headers are limited now
- 2:55:13I'll go and add state in the
- 2:55:16row and see also in the
- 2:55:19row now you will notice a difference
- 2:55:23here the difference is drill down now is
- 2:55:26asking where you want to drill down on
- 2:55:28columns or on
- 2:55:30rows if I use column and I expand it
- 2:55:33I'll see brand and category together if
- 2:55:37I change it to
- 2:55:40rows and I expand it now rows are
- 2:55:43expanded in this manner I can create
- 2:55:46really complex structure
- 2:55:49using the Matrix visual let me add
- 2:55:55customer name to the
- 2:55:59rows and if I now further expand it has
- 2:56:02a pretty complex
- 2:56:06stru but you can see there are too many
- 2:56:08totals out here I don't want so many
- 2:56:13totals how do we control the totals you
- 2:56:17have multiple totals on the columns
- 2:56:20multiple totals on the
- 2:56:21row so what we are going to do here is
- 2:56:24now we go to the row sub
- 2:56:27totals we can disable them if we disable
- 2:56:30everything is disabled including the
- 2:56:33grand
- 2:56:35total and let me to check that out let's
- 2:56:38drill up little bit let's make our task
- 2:56:43easy we don't have a grand total also
- 2:56:46let me enable
- 2:56:47it we have a grand
- 2:56:51total now what I'm going to do is I'm
- 2:56:53going to enable par rle level and it's
- 2:56:56all right now all are there now I can
- 2:56:59choose
- 2:57:03State further expand it now state is the
- 2:57:07first
- 2:57:08level States control your grand
- 2:57:11total is the totals of state that's the
- 2:57:14highest one isn't it after that if your
- 2:57:15total is grand total
- 2:57:18City controls the total which you look
- 2:57:20at the state
- 2:57:22level and names customer names will show
- 2:57:26you the totals which you see at the city
- 2:57:28level I can go
- 2:57:31ahead and decide which sub total I want
- 2:57:35to see so I can choose the RO level I
- 2:57:37say state if I don't want to see grand
- 2:57:39total I can
- 2:57:41off and let's look at the impact by
- 2:57:45going up you don't see it that let me
- 2:57:49bend it now the city level is added and
- 2:57:52I'll switch off the grand total at the
- 2:57:54city level you don't see the state
- 2:57:57subtotals coming out here now it's only
- 2:58:00this one there's no State sub tootal
- 2:58:01what happens if you will up we still see
- 2:58:04it but when we expand it we don't see
- 2:58:07the state sub total in this manner you
- 2:58:09can control not only you can control
- 2:58:11let's say you want to have the sub
- 2:58:13totals you can give the sub total some
- 2:58:16name I can call it
- 2:58:21and where I want it bottom or top I
- 2:58:24don't have a control at the individual
- 2:58:26role level but if I go to all I do have
- 2:58:29a control first what I want to call
- 2:58:32Total as and I can use top it means
- 2:58:35first the subtotals will come and then
- 2:58:38the individual split will come we can't
- 2:58:41change that at the individual
- 2:58:44level if I expand further I do get an
- 2:58:47option to control things at the name
- 2:58:49level or the customer name
- 2:58:51level so this is the manner you control
- 2:58:54the row
- 2:58:57subtotals now let's try to control the
- 2:58:59column
- 2:59:01subtotals little bit up the column we
- 2:59:04right now have only two of them and we
- 2:59:07can completely switch off the totals you
- 2:59:09will get rid of all the totals here
- 2:59:12including the grand total we may like to
- 2:59:15have grand total not others so again we
- 2:59:18can switch it on we say per column level
- 2:59:21first of all let's look at the all level
- 2:59:23what options we have so at all level we
- 2:59:25have total we can rename it uh we have
- 2:59:27the values option and if I go to the
- 2:59:32Brand level I definitely will end up
- 2:59:36disabling the ground total which I don't
- 2:59:38want I want go to the category level and
- 2:59:39there I disable it I can give a
- 2:59:40different name also if I want so let me
- 2:59:43disable it now there is no sub totals
- 2:59:45you will only see a grand total at the
- 2:59:47end
- 2:59:49values is disabled at the individual
- 2:59:51level we have options for column grand
- 2:59:54total for colors and row ground totals
- 2:59:56for colors and
- 2:59:58font Now quickly have a look at the
- 3:00:01properties of the Matrix which which we
- 3:00:03can use so as usual the generic
- 3:00:05properties of the header icons whatever
- 3:00:07you want want to disable and as I
- 3:00:10explained earlier these properties will
- 3:00:12apply to powerbi service than here but
- 3:00:16just for an example let's change the
- 3:00:18color of the background so that you can
- 3:00:20see where it can be border color is
- 3:00:22white I'll going to make it black you
- 3:00:24see the Border also transparency then
- 3:00:27icons whatever icons we need again if I
- 3:00:30uncheck it the impact would be there on
- 3:00:33service right now there's no tool tip I
- 3:00:35can enable it tool tip is of default or
- 3:00:39report page right now report page is
- 3:00:41auto means it's automatically creating
- 3:00:43that but we can have a report page which
- 3:00:46we will learn later
- 3:00:48in the tool tip you can control the text
- 3:00:51size label color Etc as per need
- 3:00:53similarly the background color if you
- 3:00:55would have remember we have set up this
- 3:00:57background
- 3:00:59color when we have done changes in
- 3:01:02theme alternative text and advanced
- 3:01:05options are very similar at the visual
- 3:01:08level let's look at all the options
- 3:01:10Styles and size and style very similar
- 3:01:13to table visual padding again how how
- 3:01:17much padding we want background we would
- 3:01:20we can switch it off we don't need a
- 3:01:22background visual border we don't need
- 3:01:24Shadow we don't need if you want we can
- 3:01:27have a
- 3:01:28shadow title we can add a title we can
- 3:01:31added a title and then we can add either
- 3:01:34from here or on the top we can call it
- 3:01:36as Matrix
- 3:01:42visual
- 3:01:44enter font color background color
- 3:01:46alignment center alignment a subtitle we
- 3:01:50would don't not like here divider I
- 3:01:51don't think we like here same as the
- 3:01:54table visual spacing again we can
- 3:01:56increase the spacing same as table
- 3:01:58visual style presets same as table
- 3:02:00visual we can have different like bold
- 3:02:03header and all those but I think I would
- 3:02:05like to stay with
- 3:02:06default again grid horizontal grid
- 3:02:08vertical grid border and options
- 3:02:11whatever we want to change same as table
- 3:02:13visual values very similar because we
- 3:02:17have alternating colors we have two
- 3:02:18options just like table visual to have
- 3:02:21multiple colors options switch values on
- 3:02:24row we have already experimented but
- 3:02:26here how does it look like you can see
- 3:02:28it looks allog together
- 3:02:32different now column header is something
- 3:02:35which is basically for the column
- 3:02:37headers and to make it bold and italic
- 3:02:40to differentiate you can see these
- 3:02:42things are getting chap
- 3:02:46here then we can do the alignment right
- 3:02:49now I'm going to leave that options Auto
- 3:02:51size width again whenever we do some
- 3:02:54kind of filtering we don't want to
- 3:02:55change it and if you have specifically
- 3:02:57go ahead and done something you don't
- 3:02:58want it to change switch it off so that
- 3:03:00it doesn't change when you do the
- 3:03:04filtering of data row headers these are
- 3:03:07our row headers again make them bold and
- 3:03:10italic so that we can see it now when
- 3:03:14you go up still they remain bold
- 3:03:20when you go to the next level they are
- 3:03:21bold and when you expand them they are
- 3:03:23still the bold because now we have
- 3:03:25forcefully made them
- 3:03:29bold plus icon we have removed it let's
- 3:03:31switch it on so that we get
- 3:03:35collapsible property at the end options
- 3:03:37we have already used the step layout and
- 3:03:39non step layout lets now switch on the
- 3:03:41step play out so you can see the
- 3:03:44difference again column subtotals and
- 3:03:47row sub total we've experiment column
- 3:03:49grand total you can't control the grand
- 3:03:51total enabling disabling you can only
- 3:03:54change the color and the font R grand
- 3:03:56total again font and colors or
- 3:03:59background no control on enable disable
- 3:04:01now specific column here what you will
- 3:04:04see is when we talk about specific
- 3:04:06column we are only talking about values
- 3:04:10we are no more talking about row and
- 3:04:11columns unlike table visual where we
- 3:04:13talk about each and every column when
- 3:04:16you talk about specific column you are
- 3:04:18only talking about net but there are few
- 3:04:20additional options here header subtotals
- 3:04:24totals and values means they can apply
- 3:04:26to subtotals and values so you can
- 3:04:28change the properties like I can say
- 3:04:31apply to header apply to total and I
- 3:04:34just want to change one property which
- 3:04:35is basically alignment let's say for the
- 3:04:40net value and I want to make it right
- 3:04:41align so you can observe that the net
- 3:04:45has been aligned right
- 3:04:51decimal place I can change the decimal
- 3:04:53place at visual level let me make it
- 3:04:55zero so now n don't show any decimal
- 3:04:58place at the visual level same way
- 3:05:01display unit can be for formatted at the
- 3:05:03visual level I can show it in thousands
- 3:05:06and when I show it in Thousand I may
- 3:05:08like to have decimal places in this
- 3:05:10manner at the visual level I can control
- 3:05:12the display
- 3:05:14units next it's cell elements it is
- 3:05:17forther condition formatting and one of
- 3:05:19the limitations of the conditional
- 3:05:20formatting which we have in the Matrix
- 3:05:22visual that it doesn't apply to rows and
- 3:05:27columns we have an additional option
- 3:05:29here for data bar and the data bar
- 3:05:32option actually is there on the table
- 3:05:34visual also but it only come for the
- 3:05:36values when we go ahead and explore
- 3:05:40the conditional formatting in details we
- 3:05:42will see this option
- 3:05:44also again URL icon we need to have some
- 3:05:47data URL to use this and if the URL has
- 3:05:50been used in column headers or rows then
- 3:05:54also we can have an icon for that again
- 3:05:57image size we once we add some images we
- 3:06:00will be able to see this for that we
- 3:06:02will need image
- 3:06:06URL so these are the various properties
- 3:06:09in The Matrix Visual and one of the most
- 3:06:12powerful display which is available with
- 3:06:15us is Matrix visual
- 3:06:19while it doesn't have the double sorting
- 3:06:21but when you sort on now this is one
- 3:06:24question which is basically on the
- 3:06:26sorting and this is
- 3:06:28little topic which typically
- 3:06:30misunderstood by Manny so when you do
- 3:06:32the Sorting on state it will
- 3:06:34automatically sort the category and
- 3:06:36subcategory in the same order but you
- 3:06:38can go ahead and sort it on City and
- 3:06:40then based on the city sorting
- 3:06:43automatically the state sorting would
- 3:06:45happen but when you sort it by net which
- 3:06:48net it is sorting it's the column ground
- 3:06:50total because we have used the column so
- 3:06:51it will going to sort on the column
- 3:06:53ground total but if you don't have the
- 3:06:55columns definitely it would be that
- 3:06:58particular column sorting so if I go to
- 3:07:00the visual level and remove my columns
- 3:07:04and now if I'm doing the net sorting it
- 3:07:05is actually sorting on net I can go
- 3:07:07ahead and sort on margin and cross but
- 3:07:09if I have columns they are sorting on
- 3:07:11the ground total of the
- 3:07:13column so let me bring only category so
- 3:07:16that you can see see that grand totals
- 3:07:20you can go and sort the grand totals you
- 3:07:22can either sort on the columns which are
- 3:07:24there on the rows or you can sort it on
- 3:07:27the ground totals of the
- 3:07:29values and then you have the sort
- 3:07:31ascending and descending option which
- 3:07:33you can
- 3:07:34use same options in the three dots as
- 3:07:37other visual export show data as table
- 3:07:40remove
- 3:07:43Spotlight this is Matrix visual for you
- 3:07:47power ba is ever changing and every
- 3:07:50month it keeps on giving you new and new
- 3:07:52featur and same thing has happened
- 3:07:54before I could have released the video
- 3:07:56or the series we got few new features
- 3:07:58some of them are already covered as part
- 3:08:00of this video or the series and I would
- 3:08:02like to Showcase you couple of features
- 3:08:04which has been added into the Matrix
- 3:08:06visual so let me go back to the file
- 3:08:08where we have the Matrix Visual and this
- 3:08:09was The Matrix visual we have created in
- 3:08:11the past let me open the properties of
- 3:08:14this Matrix visual I have already
- 3:08:15clicked on the right hand side format
- 3:08:17and because of that the format pan is
- 3:08:19already open and I already have the
- 3:08:21properties open in the properties under
- 3:08:23the layout and style preset now we got
- 3:08:25few more layout the layout which we used
- 3:08:27to know as stabbed layout is now become
- 3:08:30your compact layout so if you see right
- 3:08:32now it is the compact layout and I can
- 3:08:34extend it further and you can see the
- 3:08:36values are stepped out and there you
- 3:08:39have the indentation which has been
- 3:08:42given so basically in the compact layout
- 3:08:45you have indentation using that
- 3:08:46indentation you can move around the
- 3:08:48things little bit and this is the format
- 3:08:50what we use to call as St layout other
- 3:08:52than that also couple of formats have
- 3:08:54been added so first format which is
- 3:08:56outline format if you look at the
- 3:08:57outline format and there you have this
- 3:09:00like a format which is sted layout off
- 3:09:03and the total is above you see the state
- 3:09:05total the total is here at this place
- 3:09:07and then you have these detail level
- 3:09:09data totals first the subtotals and then
- 3:09:12we have the data now in this layout you
- 3:09:15have an additional option that is repeat
- 3:09:17r
- 3:09:17and this was the one of the feature
- 3:09:19which you are asking for long we want
- 3:09:22these values to repeat like a table
- 3:09:23visual we don't want them like a pyot
- 3:09:26table where the values are non-
- 3:09:27repeating we want the repeating values
- 3:09:29and here the values are repeating as you
- 3:09:32can scroll down and see all the values
- 3:09:34are repeating now totals on the top and
- 3:09:37values are
- 3:09:39repeating now let's go ahead and change
- 3:09:42the format to next format which is
- 3:09:44tabular in the tabular format you have
- 3:09:47have the same option repeat row headers
- 3:09:50which is right now on and you are seeing
- 3:09:51that the headers are repeating and the
- 3:09:53totals have actually moved down if you
- 3:09:56scroll down wherever something is ending
- 3:09:58then you get the
- 3:10:00totals and here in the total also the
- 3:10:02names are repeating now if you want to
- 3:10:04close that repetition repeat row header
- 3:10:07you can switch it off once you switch it
- 3:10:08off it is very similar layout which we
- 3:10:11used to get in tabbed layout off so now
- 3:10:14these are the couple of layouts which
- 3:10:15has been added one is very similar
- 3:10:17similar to the old one which is compact
- 3:10:19layout which is very similar to the step
- 3:10:20layout and non-step layout we got
- 3:10:22tabular format as well as the outline
- 3:10:24format now the changes did not stop here
- 3:10:26we got something known as blank rows
- 3:10:29what happens let's look at this data now
- 3:10:31let me go one step up here so that you
- 3:10:34can easily understand that and let me
- 3:10:36click on add blank row after these
- 3:10:39subtotals you got a break you got a
- 3:10:41blank row and this is something you were
- 3:10:43asking for long that you know give us
- 3:10:45some place where we have this break
- 3:10:47where we have some separation between
- 3:10:49the parent and child there should be
- 3:10:51some empty rows which we wanted to
- 3:10:53insert and that the same feature has
- 3:10:54been given now there is a color which
- 3:10:56you can also apply here so use the color
- 3:10:58on that particular row so that you can
- 3:11:00enhance the visibility of your visual so
- 3:11:02now this visual will give you a
- 3:11:04different look because you have a color
- 3:11:05now in the color you can also use
- 3:11:07transparency you want it a little bit
- 3:11:09transparent so increase the transparency
- 3:11:11then there is an option for Border also
- 3:11:13here so click and then you will get a
- 3:11:15border now you have a border position
- 3:11:17like top then you have bottom only at
- 3:11:19the top only at the bottom or you have
- 3:11:21top and bottom both so right now it is
- 3:11:23like to both top and bottom so we parall
- 3:11:24lines then the color definitely you want
- 3:11:26to have the color to that so you that
- 3:11:28color of the Border then transparency of
- 3:11:30the Border can also be there next is
- 3:11:32width in case you want to have little
- 3:11:33bit wider width you can use that in that
- 3:11:36manner you will have different kind of
- 3:11:37visual experience now you can see this
- 3:11:39visual the same Matrix visual is now
- 3:11:41looking a little bit different and this
- 3:11:43is because of these new changes which
- 3:11:45has been provided to us which is giving
- 3:11:47us much better look and feel and right
- 3:11:49now powerbi is fusing a lot on providing
- 3:11:52you such a new feature your visual
- 3:11:54experience so these are couple of
- 3:11:56features which has been added in Matrix
- 3:11:58visual very recently enhance your visual
- 3:12:00experience the visual we want to learn
- 3:12:02now is the bar visual so let me add
- 3:12:05another page by using the new page
- 3:12:07button at the bottom and I will use the
- 3:12:11bar the bar visual is actually known as
- 3:12:14clustered column bar or clustered bar
- 3:12:17chart both are available in
- 3:12:20the build a visual and in the Home tab
- 3:12:25in
- 3:12:26the insert option so let me start with
- 3:12:30the clustered bar chart which
- 3:12:34is also known as horizontal bar
- 3:12:37chart let me start that now the options
- 3:12:41you have here and some of you might be
- 3:12:43surprised why I'm not getting a add
- 3:12:46button here because after the December
- 3:12:49customization I've choose for build a
- 3:12:51visual and because of that the on object
- 3:12:55interaction option of having the columns
- 3:12:57here has shifted to this place which is
- 3:13:01more classic look but I like that more
- 3:13:04so I have opted for that now let's skip
- 3:13:07the y axis now and in the y axis as I
- 3:13:11can add the data directly I will go
- 3:13:13ahead and add item
- 3:13:15brand now
- 3:13:18now second is x-axis where I will go
- 3:13:23ahead and add a measure now here in case
- 3:13:27of
- 3:13:28the clustered bar chart the Y AIS is
- 3:13:32basically categorical axis and XIs is
- 3:13:35basically a numerical axis so here we
- 3:13:39are getting the values on x-axis which
- 3:13:43is
- 3:13:45this and we are getting the categorical
- 3:13:48values here on the Y AIS it can use
- 3:13:51continuous values we will see example
- 3:13:53when we put across a date column then it
- 3:13:56can use continuous
- 3:13:59values now let me duplicate this and
- 3:14:02I'll also tell you how can you change a
- 3:14:04chart type so when you click on this now
- 3:14:08what you can do is you can go to Builder
- 3:14:09visuals and you can click
- 3:14:13on cluster column chart which is not
- 3:14:16selected right now and it will become a
- 3:14:20cluster column bar now in cluster column
- 3:14:22bar the x-axis is brand because you are
- 3:14:24seeing the branch on the horizontal axis
- 3:14:27and you are seeing the numbers on y
- 3:14:30AIS now let's further explore it what
- 3:14:33else we can do now before I go to the
- 3:14:35properties let me tell you few things
- 3:14:37about this visual so we can have more
- 3:14:40than one AIS similarly we can also have
- 3:14:42Legends and we can also use small
- 3:14:44multiples and Tool tip on this now tool
- 3:14:47tip you can add additional column by
- 3:14:49default you can see the tool tip is
- 3:14:51on I can click on the format and start
- 3:14:55seeing that now before I change any
- 3:14:57properties let me show you one thing
- 3:14:59which is column and under the column you
- 3:15:02see the color and in the color this FX
- 3:15:04option is there which means conditional
- 3:15:06formatting is available and you have to
- 3:15:07keep noting that down for what all cases
- 3:15:10the conditional formatting is available
- 3:15:11or not let me bring in one additional
- 3:15:13major here which is other than net I'm
- 3:15:16also taking in cross as you can see
- 3:15:19inside the color now there is no
- 3:15:21conditional formatting option which is
- 3:15:23available in the columns we have each
- 3:15:26series and for each series you can give
- 3:15:28color but we don't have any option for
- 3:15:30conditional formatting like if I go for
- 3:15:32net I don't have FX option now same way
- 3:15:36here you can see the conditional
- 3:15:38formatting option but if I add a measure
- 3:15:40I don't see a conditional formatting
- 3:15:42option also here so conditional
- 3:15:44formatting only along with one major now
- 3:15:47let me remove the majure or even without
- 3:15:50removing the mejor let me see can I put
- 3:15:52a legend so I expand the item and from
- 3:15:56there I try to drag Legend category as a
- 3:15:58legend I'm not able to do so with two
- 3:16:01measures you can't have Legend so let me
- 3:16:03remove the
- 3:16:05gross and let me now drag category so I
- 3:16:08can
- 3:16:09have the legend with one single major
- 3:16:13only so if you have only one major then
- 3:16:16only you can use leg Legend you cannot
- 3:16:18have both couple of measur and legend in
- 3:16:20the standard bar visuals it is
- 3:16:22applicable for both bar and column bar
- 3:16:26again you can see that I am not able to
- 3:16:27see the FX option if I go to category
- 3:16:30one you will be able to see that I'm not
- 3:16:32getting an option for conditional
- 3:16:36formatting now instead of bringing this
- 3:16:39category onto the
- 3:16:41legend I can also bring this category on
- 3:16:44the x-axis
- 3:16:47when you bring bring on this on
- 3:16:50x-axis as you can see it is broken down
- 3:16:54by brand and then by categories this
- 3:16:57option where it start breaking down and
- 3:17:00you can individually work with each bar
- 3:17:03we need a little bit bigger visual for
- 3:17:06that so let me adjust these two
- 3:17:08visuals to have more
- 3:17:12space now you can see brand little bit
- 3:17:15better so brand category and Brand C we
- 3:17:17have and this is coming because of one
- 3:17:19of the properties and for that it's
- 3:17:21already showing exclamation signs that
- 3:17:23you have to reduce the font so if I
- 3:17:25reduce the font of xaxis I can get the
- 3:17:28better data here now you see this is
- 3:17:31concatenated label off so by default is
- 3:17:34this concatenated label off but if you
- 3:17:38switch it on you will see that the brand
- 3:17:40and the category are concatenated
- 3:17:42together so if you want them to
- 3:17:43concatenate together then you need that
- 3:17:46option you can off for concatenated
- 3:17:48label off that's a better option here
- 3:17:50you can see this is the
- 3:17:53default ordering which we
- 3:17:55have brand one and then categories are
- 3:18:00ordered now this will work only when you
- 3:18:03have sorted it on
- 3:18:05AIS brand and category if you sort it on
- 3:18:08net this is not going to work out in the
- 3:18:11same manner okay so now you can see the
- 3:18:15brands have started repeating so this
- 3:18:17from the three dots always use brand and
- 3:18:20access and concatenated label off if you
- 3:18:23need that now this option was previously
- 3:18:26not available here but now this option
- 3:18:29is also available here and I can go here
- 3:18:31and pull in
- 3:18:35category and why I'm not seeing it let
- 3:18:37me expand it and you can see the same
- 3:18:40option concatenated label off is
- 3:18:43available here but as you can see the
- 3:18:45data is pretty small it's not visible
- 3:18:48now labels which are we are getting on
- 3:18:51the y axis right now there is no option
- 3:18:53here to other than reducing the font
- 3:18:55size I can do making them horizontal and
- 3:18:58again it is you know showing me the
- 3:19:00message that it
- 3:19:03is too bigger in the size not able to
- 3:19:05display the complete
- 3:19:07value
- 3:19:10now let's focus on one of these charts
- 3:19:14for other properties now when we learn
- 3:19:17the conditional formatting in some time
- 3:19:19what we going to do is we are going to
- 3:19:20give one single color for a brand or if
- 3:19:23you have a category below we will try to
- 3:19:24give one single color for the category
- 3:19:26and you can have multiple categories
- 3:19:28means you can have multiple levels also
- 3:19:30and it is not that uh you have to show
- 3:19:32all these levels in one go just like we
- 3:19:34have shown with the concatenated level
- 3:19:36off you can do the same way drill up you
- 3:19:38can do and then you can say Okay expand
- 3:19:41or you can also use the drill down
- 3:19:43option you can enable and you brand 10
- 3:19:45and you drill down with the filter of
- 3:19:47brand T now you might have feel that the
- 3:19:49other visual is also getting filtered
- 3:19:51and this happens because of interaction
- 3:19:53between the visual every visual interact
- 3:19:56with another visual unless we stop it so
- 3:19:58we will learn that art little bit
- 3:20:01later now this is our Visual and in this
- 3:20:05visual we can either expand and have the
- 3:20:07labels together or we can have one level
- 3:20:10and then we can go to the next level
- 3:20:11same way as Matrix we can go simply to
- 3:20:13the next level come back up we can
- 3:20:16expand have them together or we can use
- 3:20:17the drill down functionality when we
- 3:20:19click on the bar it goes to the next
- 3:20:21level now let's look at the
- 3:20:24properties size and style properties
- 3:20:26under the size position we know because
- 3:20:29of the size it is coming height and
- 3:20:31width then from where we are starting
- 3:20:33lock aspect ratio if I lock it if I
- 3:20:36change the size then it will keep the
- 3:20:37aspect ratio see I'm whatever I'm trying
- 3:20:40it is keeping the aspect
- 3:20:42ratio now padding uh padding is
- 3:20:46basically the outside right now I think
- 3:20:48one of the side it is zero so that's why
- 3:20:50there is no padding coming
- 3:20:52in but we can change it
- 3:20:55like see net is just now look at where
- 3:20:59the net
- 3:21:02is okay so 6 pixel 10 5 pixel 2 pixel
- 3:21:06the differences similarly the right hand
- 3:21:08bar if I give the right hand side
- 3:21:09padding so how much padding is going to
- 3:21:11be how much padding on the top so we
- 3:21:13almost end up utilizing background is
- 3:21:15the background color so you can have
- 3:21:17some color if you want on the background
- 3:21:19and then you have to reduce the
- 3:21:20transparency to see that
- 3:21:24color visual borders again same as table
- 3:21:27we are not going to experiment with this
- 3:21:28Shadow same as a metrix and table we are
- 3:21:31not going to experiment it title we have
- 3:21:32already explored and by default it gives
- 3:21:35a title and um then FX means we can give
- 3:21:39a major in the title which we will learn
- 3:21:41a little bit later we can make the title
- 3:21:43Center and then also in inside the we
- 3:21:46have subtitles if you want to give it
- 3:21:48again subtitles you have the FX option
- 3:21:51means you can use the measure
- 3:21:54there divider uh between the title
- 3:21:57subtitle and the rest of the area you
- 3:22:00can use
- 3:22:01divider now x-axis we have experimented
- 3:22:04in the title there is something which
- 3:22:06you might like to use you might want to
- 3:22:07switch off the title so if in xaxis if
- 3:22:09you see now there's no brand written
- 3:22:12here
- 3:22:14now let me go ahead and switch it on on
- 3:22:16and you will notice now there is a brand
- 3:22:18written if you switch off the title
- 3:22:20again you can play around with the
- 3:22:21properties of this one and the color now
- 3:22:24the color of this one is how is it going
- 3:22:27to change is it going to change on the
- 3:22:28grand total value or is it on the brand
- 3:22:31value each brand value that we will
- 3:22:33experiment and see usually it only check
- 3:22:35the grand total value again FX color
- 3:22:37means I can use a conditional formatting
- 3:22:39measure for that once we learn that we
- 3:22:41will try to use that now we'll go to the
- 3:22:43layout now minimum category width you
- 3:22:46can play around and as you can see the
- 3:22:48moment I increase the minimum category
- 3:22:51width the bars are little bit
- 3:22:54wider now we can go to the y- axis and
- 3:22:57in the y- axis you have this option of
- 3:23:01minimum and maximum so you can change
- 3:23:03the range and you can also use measures
- 3:23:07here means I can have a measure which
- 3:23:09will decide my you know Min and Max so
- 3:23:12right now you it is automatically
- 3:23:14deciding it's starting from zero and and
- 3:23:16it is going to 1 million so basically
- 3:23:19the range is in millions okay but you
- 3:23:22can decide from where it should start
- 3:23:24and where it should end you can devise
- 3:23:26Sun kind majors and the tip is when you
- 3:23:28create such mejor find out the minimum
- 3:23:29value of for the brand whatever you are
- 3:23:33using here take just some 10% less than
- 3:23:36that and same for the high value 5% 10%
- 3:23:39above the value here less than the value
- 3:23:41and here above than the value now
- 3:23:43sometime what happens you have values
- 3:23:45which are pretty small compared to other
- 3:23:48values which are pretty large so you may
- 3:23:50want to use logarithmic AIS so as you
- 3:23:52can see these numbers now see almost
- 3:23:55same this actually helps when you know
- 3:23:58one value is pretty large and another
- 3:24:00one is pretty small you can use logic
- 3:24:03scale inot range again you want to move
- 3:24:06that on the top the now we have the
- 3:24:10smaller value on the top and the larger
- 3:24:13value
- 3:24:14below so smaller to bigger on the invert
- 3:24:20site now comes the values for the
- 3:24:25values you can see the y-axis values are
- 3:24:27switch on and switch off pay
- 3:24:31attention you can use FX means you can
- 3:24:33use conditional formatting uh
- 3:24:36display uh Auto right now I can use none
- 3:24:40no formatting now you can see the
- 3:24:42absolute value you can say Auto it means
- 3:24:44it will follow the auto atically what it
- 3:24:47get best million forcefully million
- 3:24:49thousand forcefully thousand I Leave It
- 3:24:52To None or I can even leave it to Auto
- 3:24:54let it decide usually it is better to
- 3:24:56keep Auto which axis position now Y axis
- 3:24:59can come on the secondary y-axis side or
- 3:25:02on the what you call as right hand side
- 3:25:05title now you want to give a
- 3:25:08title to
- 3:25:10the Y axis now right now the title is
- 3:25:14net let's give something else net
- 3:25:16net value so now we have title as net
- 3:25:20value again you can use the color using
- 3:25:23conditional formatting uh show style
- 3:25:26show units only show title only show
- 3:25:29both so units is in millions show both
- 3:25:32so we can say net value is in millions
- 3:25:35and that is much better option if you
- 3:25:36wanted to try out because what happens
- 3:25:38in case you are using this Auto it is
- 3:25:41always good that it shows you you know
- 3:25:43if it is showing the values in K and
- 3:25:45millions that's a good idea to have now
- 3:25:48Legends are off right now but when we
- 3:25:49use Legends we can play around with
- 3:25:51small multiple again when we use small
- 3:25:52multiple we'll use now grid lines is
- 3:25:55something it is showing that you know we
- 3:25:56have the horizontal grid line but
- 3:25:58because of the color you might not be
- 3:25:59able to see so let me make make it a
- 3:26:01little bit darker now you can see the
- 3:26:02horizontal grid now they are dotted you
- 3:26:05can make them solid or you can make them
- 3:26:07dashed what you want width you can
- 3:26:09increase or decrease depending on the
- 3:26:12require so this is you know a horizontal
- 3:26:15grid
- 3:26:17now Zoom slider is something uh which is
- 3:26:19really important especially when you
- 3:26:21have large number of rows or huge data
- 3:26:24then it will help now let's invert the
- 3:26:26AIS before we understand
- 3:26:30that so both we bought on the same place
- 3:26:33it's not that it's not going to work
- 3:26:34with that but
- 3:26:36by we usually have a habit of seeing the
- 3:26:39things in a particular Manner and it is
- 3:26:40helpful in that so on the y axis as you
- 3:26:43can see there is a scrawler
- 3:26:46and if I bring it down it is bringing in
- 3:26:49the Valu so especially if you have huge
- 3:26:51number of data points and some of the
- 3:26:52data points you are not able to see the
- 3:26:53values this can help now slider can have
- 3:26:56a label slider label so once you on the
- 3:26:57slider label you have a label on this
- 3:26:59side so one is fixed label and one is
- 3:27:01changing label now the one label is
- 3:27:03changing and one is fixed so that is the
- 3:27:05advantage slider tool tip so once you
- 3:27:07scroll down now it will have a tool tip
- 3:27:09also how it is moving down so these are
- 3:27:12few things you can play around with the
- 3:27:14slider again it depends on what kind of
- 3:27:16use case you have now columns we are
- 3:27:19seeing multiple categories but instead
- 3:27:21of color still we are able to see FX now
- 3:27:27always instead of having Legend always
- 3:27:31try to have the
- 3:27:33AIS multiple AES now you will ask now
- 3:27:37even if if I expand I I see all of them
- 3:27:39in the same color isn't it when I expand
- 3:27:42you see all the categories or brand in
- 3:27:44the same color but when I was using
- 3:27:46Legend they come in multiple color so if
- 3:27:48this category is in the legend you will
- 3:27:50see them into multiple colors so I can
- 3:27:52have color for category one Category 2
- 3:27:53category three but I can't you switch
- 3:27:56this color with my own choice of color
- 3:27:58manually I can switch but I can't keep
- 3:28:00it controlled means the movement you
- 3:28:02doing some kind of filtering or there
- 3:28:03are additional values this category one
- 3:28:05may get a different color or category
- 3:28:07two may get a different color or based
- 3:28:09on the other operation it may change but
- 3:28:12if you keep it here because this
- 3:28:15conditional formatting is enabled and
- 3:28:17also you can see it is little bit better
- 3:28:20where it occupies the space and we will
- 3:28:23be able to use conditional formatting to
- 3:28:24color that so once we learn the
- 3:28:27conditional formatting we'll color them
- 3:28:28in different one and you'll find this is
- 3:28:29a better option than using Legend
- 3:28:31wherever you can avoid the Legend So use
- 3:28:33multiple axis expanded concatenate label
- 3:28:37of whenever you can avoid the legend we
- 3:28:41will understand that little bit more
- 3:28:43border as you can see the borders if you
- 3:28:45have have the border for
- 3:28:48the I change the Border color a little
- 3:28:50bit so that we understand where the
- 3:28:52color coming in so you can see the bars
- 3:28:54of borders and you can have transparency
- 3:28:56for the borders there are few features
- 3:28:59which has been very recently added and
- 3:29:01one of the feature is basically this
- 3:29:03transparency so and I waited for the
- 3:29:06border to come because when I make this
- 3:29:08transparency is 100% you can see that
- 3:29:10there is nothing visible and now if I go
- 3:29:14ahead and check this match the column
- 3:29:15color
- 3:29:18it gives the matching color okay the
- 3:29:20color was actually green it gives me
- 3:29:22matching color but that is actually
- 3:29:23transparent and what I can do is I can
- 3:29:26make it also 100% transparent so right
- 3:29:28now there are bars but they are not
- 3:29:30visible see I can see the tool tip
- 3:29:32because of the bar but I don't see now
- 3:29:34because of that there are multiple
- 3:29:36things you can create so moment I think
- 3:29:37I use the transparency a little bit I
- 3:29:40will be able to see the bar similarly
- 3:29:42for this one I can use a little bit of
- 3:29:43transparency to give that transparency
- 3:29:46kind of effect now the inner bar is
- 3:29:48little bit transparent and the border
- 3:29:50is border is not at all transparent
- 3:29:53gives a different kind of look now both
- 3:29:54are completely not transparent they look
- 3:29:57into the this one so these kind of
- 3:30:00combinations of having the
- 3:30:04transparency and having this border
- 3:30:06match color or border of its own color
- 3:30:09can give you this combination you can
- 3:30:10hide it so purpose of transparency we
- 3:30:14can decide based on the what we are
- 3:30:16going to do but anyway the transparency
- 3:30:17if you look at it and but let's do one
- 3:30:19thing let's call it as uh bar
- 3:30:23one let's duplicate this page right
- 3:30:25click and duplicate because this is a
- 3:30:28newly released features and let's have a
- 3:30:31look at it so now you can able to see in
- 3:30:35a much better manner how does uh this
- 3:30:37behave
- 3:30:41so this transparency and Border um you
- 3:30:45can see the advantage of those things
- 3:30:47here now similarly you have the layout
- 3:30:50now in the layout when you went here the
- 3:30:52reverse order sought by value and
- 3:30:54spacing between the category now spacing
- 3:30:56between the categories is something if
- 3:30:58you increase that as you can see is
- 3:31:01increasing and so max width has one play
- 3:31:06with us Max width was there uh which was
- 3:31:09actually allowing you to do something
- 3:31:11now again this is the second one where
- 3:31:13space between the categories is allowing
- 3:31:15you you know have smaller
- 3:31:17bars now this reverse order and sort by
- 3:31:20value is something which is not
- 3:31:22applicable on this this is actually for
- 3:31:24stagged bar chart and this is really
- 3:31:26good property when I come to the stagged
- 3:31:27bar chart I'll explain you so let me
- 3:31:31increase a little bit width because
- 3:31:33that's too
- 3:31:34small and also I'm going to make this
- 3:31:37border as none because I want the bar to
- 3:31:39take the WID but I'm telling you with
- 3:31:41bother it was looking much better I can
- 3:31:43make it as a one pixel
- 3:31:46okay now let's come down now data label
- 3:31:48again something got added in December
- 3:31:50data label is there for a few months now
- 3:31:52but in December we have some enhancement
- 3:31:55inside the data label so first of all
- 3:31:57the position is horizontal I can make it
- 3:31:59vertical so now this is one thing
- 3:32:02overflow text I allow it means if even
- 3:32:04if there is a chances we need to
- 3:32:06overflow the text means overflow of text
- 3:32:08means if it is not sufficiently coming
- 3:32:10let's say if I do the position as right
- 3:32:12now the position is AO I say inside and
- 3:32:14now bar is very small See This Bar is
- 3:32:16very small then it is Overflow now if I
- 3:32:19switch off the Overflow if I highlight
- 3:32:21here you can see the values are not
- 3:32:22appearing here because right now what I
- 3:32:24have done here is I have switch off the
- 3:32:25Overflow text but if I enable this
- 3:32:27overflow text you will be able to see
- 3:32:29this value so this is the advantage of
- 3:32:30overflow but keep it auto that it takes
- 3:32:33some place right now it is outside but
- 3:32:35if you want there are need like I really
- 3:32:37want it outside only and optimize label
- 3:32:40display is another thing where you know
- 3:32:42you can have if you check that you have
- 3:32:44the maximum width which you wanted to
- 3:32:46give you can control that now new thing
- 3:32:49which is now inside the data label which
- 3:32:53allows me to now show
- 3:32:55the title now what is this title the
- 3:32:59title is basically the net and where the
- 3:33:02title should come same as series name or
- 3:33:04custom I want to give some other title
- 3:33:07then I can add a title and You by adding
- 3:33:10this title maybe I want to add the
- 3:33:12category as a title let's let me drag
- 3:33:14the category as a title
- 3:33:16showing first category let me do one
- 3:33:19thing let me go ahead go to x-axis and
- 3:33:22completely disable
- 3:33:25ex okay now I have a category and value
- 3:33:29and you will say this is looking too
- 3:33:31busy and let me only make it as a
- 3:33:32category
- 3:33:34visual so now what's happening there's a
- 3:33:36category and there's a
- 3:33:38value
- 3:33:39so now let's go to the position we can
- 3:33:42see
- 3:33:43now so now we only I removed the brand
- 3:33:46now only we have a category and the
- 3:33:48value first category now first category
- 3:33:52or last category doesn't matter because
- 3:33:53because of the row context going to come
- 3:33:55that we have transparencies means we can
- 3:33:57make it little bit transparent we have
- 3:33:59the color we can choose a color means I
- 3:34:01can have a different color for the
- 3:34:03category and the different this one so
- 3:34:05now what is happening there is nothing
- 3:34:07written here on the x-axis everything is
- 3:34:08written there and now position is
- 3:34:10something which we can decide where you
- 3:34:12know the opt we can say okay inside and
- 3:34:16or we can say inside base now everything
- 3:34:19is written here inside base and because
- 3:34:21I have chosen a color black that's why
- 3:34:23it is coming so now we are getting title
- 3:34:26along with this one
- 3:34:29furthermore when you go down this is the
- 3:34:32actual value the net value which is
- 3:34:33getting displayed in the label what all
- 3:34:36I wanted to play around with that and if
- 3:34:38I go down here we have the display unit
- 3:34:40which I can control I can say none so it
- 3:34:42start showing the value now I even don't
- 3:34:44need the y- axis actually
- 3:34:46now I can go ahead and completely switch
- 3:34:48off my ixis because I have the values
- 3:34:51display unit decimal place Auto Show
- 3:34:53blank as zero or show blank as hyphen
- 3:34:56like if there is a blank value I can say
- 3:34:58here show as hyphen which is previously
- 3:35:00not possible now these are the
- 3:35:01enhancement which has came recently and
- 3:35:04some of them came as recent as December
- 3:35:05now detail label is something which came
- 3:35:07very recently in December 20 23 now I
- 3:35:11can add one more label so I'm already
- 3:35:13using category and net with that
- 3:35:16and let me bring in Gross value also
- 3:35:18here in this one so now I'm seeing gross
- 3:35:21along with
- 3:35:23that and then I can decide the font I
- 3:35:26can decide the color you say okay let's
- 3:35:28differentiate it with a different little
- 3:35:29bit different color maybe this is my
- 3:35:31gross transparency and formatting is
- 3:35:34none decimal place Auto we want to give
- 3:35:37a background to this switch on the
- 3:35:39background and then we can decide what
- 3:35:41one want the color and what is the
- 3:35:42transparency we want
- 3:35:49let's go to the layout
- 3:35:52multi-line single line when I go to the
- 3:35:56single line what I can do here is let I
- 3:35:58don't want details to be there let me
- 3:36:00switch off the detail now look it's
- 3:36:03looking
- 3:36:04much cleaner approach to have this and
- 3:36:07and definitely we can play around with
- 3:36:08the colors so now what is happening this
- 3:36:10is something you would have wanted in
- 3:36:13the past that you have the
- 3:36:17categories and their label and I'm going
- 3:36:20to convert this into all to a different
- 3:36:23visual now let me go up and we we we
- 3:36:27were playing around with the colors if
- 3:36:30you remember let me create the
- 3:36:33transparency now this is only Inside the
- 3:36:36Box me switch off the
- 3:36:38borders I'm only displaying the
- 3:36:41values let me bring in the brand
- 3:36:43back brand is low
- 3:36:47okay now here in the label we can't
- 3:36:52direct two we can't direct to otherwise
- 3:36:55we could have done the brand but in this
- 3:36:57case now what we can have here
- 3:37:01is we can go ahead and enable
- 3:37:07our
- 3:37:09values so I have done few adjustment and
- 3:37:12you can see the values now you may white
- 3:37:14like to have you you know both brand and
- 3:37:16category then how would you get that
- 3:37:18brand and category values to you might
- 3:37:20have that question in your mind like you
- 3:37:22know when I'm adding this U title giving
- 3:37:26me first category I'll tell you a very
- 3:37:27simple mejor so I'll go to the item
- 3:37:30Dimension I click on it and I create a
- 3:37:32major and this major is going to work
- 3:37:35when you have both of them together okay
- 3:37:37so we'll call it brand at
- 3:37:41label and this is nothing but Max of
- 3:37:44item brand if you remember we were
- 3:37:46taking first category item
- 3:37:48brand then we say m per to give us space
- 3:37:51m% space m per Max of item category what
- 3:37:56would happen because item and category
- 3:37:58are already in the AIS actually we don't
- 3:38:01want to display them and I let me give
- 3:38:03additional space Also here and maybe I
- 3:38:06can give a hyph because I know I'm going
- 3:38:07to display the value now I can instead
- 3:38:10of this one I can bring in this
- 3:38:13one what kind of label I created brand
- 3:38:16category label Max of item brand and Max
- 3:38:18of item category you will see how will
- 3:38:20it work see item when the brand one is
- 3:38:23in the my context brand one can only be
- 3:38:26the maximum value and category one is in
- 3:38:28the this row context so category one can
- 3:38:30also be the maximum value in this manner
- 3:38:32you can get these values and now you can
- 3:38:35play around all these values and
- 3:38:36everything now it can create all
- 3:38:38together a different kind of visual
- 3:38:39where you are only displaying the
- 3:38:40visuals like values like this so these
- 3:38:43are all the experiment which you can do
- 3:38:45or I can reduce the little bit of
- 3:38:47transparency to see these values and I
- 3:38:49can play around with so lot of
- 3:38:51combinations are possible just because
- 3:38:53of this properties of transparency and
- 3:38:57the data label customization which has
- 3:39:00been enhanced over last few months so
- 3:39:03you have lot of flexibility how you want
- 3:39:06to display your bar visual stagged
- 3:39:08visual wherever this is applicable now
- 3:39:11plot and area background if you want to
- 3:39:12image in the background then you can use
- 3:39:15it then again you can decide the image
- 3:39:16fit and transparency reference line is
- 3:39:19something really important now what
- 3:39:20happens sometime is basically you want
- 3:39:23to plot a reference
- 3:39:25line basically a line which is going to
- 3:39:28give you a reference so I can add a line
- 3:39:30now it asks me to choose a line so right
- 3:39:32now I would I can choose a constant line
- 3:39:36or I can simply choose an average line
- 3:39:37so I prefer to choose an average line as
- 3:39:39you can see this is my average across
- 3:39:41all the values based on what net because
- 3:39:44right now I'm only using using net now
- 3:39:46the line properties you can change color
- 3:39:48let me make it
- 3:39:51black and transparency is transparency
- 3:39:540% so that is visible instead of Dash
- 3:39:58let me make it solid position in front
- 3:40:00or behind sometime you want it behind so
- 3:40:02that it does not cross the bar from the
- 3:40:04top
- 3:40:06now focus on this location you are able
- 3:40:10to see that white color iPhone above it
- 3:40:13now I'll go and move it in front and now
- 3:40:17you will observe
- 3:40:19that that when it is in front you will
- 3:40:22not be able to see that quite
- 3:40:24complete what I've have done is I have
- 3:40:26reset my data labels to default by using
- 3:40:29the default reset to default and now so
- 3:40:32that I can show you the reference line
- 3:40:34and uh because there are too many
- 3:40:36overlapping labels it was not able to
- 3:40:38show and the one thing which I enabled
- 3:40:39is now I've enabled the data label now
- 3:40:42it is showing where should I show left
- 3:40:43or right I can decide the position
- 3:40:45whether I should show it here or here I
- 3:40:47can decide the
- 3:40:49position above or below under or below
- 3:40:52again
- 3:40:56positioning a style name or both data
- 3:41:00value name or both I both average line
- 3:41:03value display unit I can set to none and
- 3:41:07decimal places auto before I take the
- 3:41:09next step let me do one thing let me uh
- 3:41:13remove some of the features which are
- 3:41:14not required right now let me rename
- 3:41:16this page to Bar two let me now explore
- 3:41:18error
- 3:41:20bars now error bar is on the series is
- 3:41:24net right now error bar enabled by field
- 3:41:27or by percentage so I used by percentage
- 3:41:31and upper and lower bound I can set now
- 3:41:33bars on or off I can use but definitely
- 3:41:36I want the bars I can set the bar color
- 3:41:38I can increase the width it little bit
- 3:41:40uh marker shape I can
- 3:41:43decide marker size size I can decide
- 3:41:46border and color I can decide error
- 3:41:48labels if I want I can enable the error
- 3:41:50labels so it will show me how much error
- 3:41:53label it is label from absolute or
- 3:41:55relative numeric position or relative
- 3:41:57percentage relative numeric we can do or
- 3:41:59we can try relative
- 3:42:03percentage and then finally we have a
- 3:42:05tool tip right now which is on the tool
- 3:42:08tip here what we are talking about is
- 3:42:09the error bar tool tip if you switch it
- 3:42:11off it will not show the error bar
- 3:42:14information but this is not the overall
- 3:42:17tool tip so basically if you go here now
- 3:42:19it is showing the error Bar upper and
- 3:42:21lower bound if you switch it off it will
- 3:42:23not show it but this is only related to
- 3:42:26the error bar the it is not the overall
- 3:42:28tool tip the overall tool tip is
- 3:42:29available under the property
- 3:42:33pin now I'll switch off the error
- 3:42:36bars so now we are done with our
- 3:42:38properties now we can go to the generic
- 3:42:40properties header icon same as other
- 3:42:43visuals tool tip we right now able to
- 3:42:45see the tool tip we can switch it off
- 3:42:48there would be no tool
- 3:42:50tip alternative text and alternative
- 3:42:54options responsive and there is so much
- 3:42:57you have for the clustered bar and same
- 3:42:58can also be applied for the bar
- 3:43:01visual there are multiple options
- 3:43:03possible to display this chart using you
- 3:43:05know xais y AIS Legends a small multiple
- 3:43:09you can also add additional item on the
- 3:43:11tool tip if you want let's say I want to
- 3:43:13add gross I want to add discount for
- 3:43:15that the tool tip need to be enabled so
- 3:43:17if the tool tip is off you will not be
- 3:43:18able to see but once you enable it you
- 3:43:20will be able to see the tool tip now the
- 3:43:23next thing what we wanted to do is we
- 3:43:25would like to
- 3:43:27explore few more Visual and then we
- 3:43:30would like to come back to the small
- 3:43:33multiple so let's try to create a
- 3:43:35stagged bar visual now for that again
- 3:43:38I'm adding a new page let me call it as
- 3:43:41stagged we have two kind of stagged bar
- 3:43:43visual one is known as stag bar chart
- 3:43:46second one is known as stack column
- 3:43:47chart I'll start with the stack column
- 3:43:50chart and then later on I'll show you by
- 3:43:52changing it to the bar chart properties
- 3:43:54would always remain same now the stagged
- 3:43:57bar chart the it will become a stagged
- 3:44:00only when you use the legend before
- 3:44:02using Legend it is going to be acting as
- 3:44:04a single bar now once we use the legend
- 3:44:07uh there is no option for having
- 3:44:09conditional formatting um so as of now
- 3:44:13when I'm recording this video there's no
- 3:44:14option of doing a conditional formatting
- 3:44:16and forcing is even by using alter rate
- 3:44:19now in few visuals we will see once we
- 3:44:21Deep dive into the conditional
- 3:44:23formatting we will see that there are
- 3:44:25alternatives where we can get little bit
- 3:44:26of conditional formatting in some visual
- 3:44:28but this visual is where we will not get
- 3:44:29it means you can manually change the bar
- 3:44:31color but not conditionally me you can't
- 3:44:34have a major which can change your color
- 3:44:35based on let's say this category should
- 3:44:37look always red so that kind of stuff
- 3:44:39you'll not be able to do so let's start
- 3:44:41with it and there are a few new feature
- 3:44:42which came in December 2023 and we'll
- 3:44:44expl explore that and they are the
- 3:44:46feature you were looking for it and I'll
- 3:44:47tell you the advantage of some of those
- 3:44:49so we'll start with brand which is on we
- 3:44:51are going to put on the xaxis and then
- 3:44:54we can have the y axis where we can have
- 3:44:56value and I'm going to take net for that
- 3:44:58and then we can have the category on the
- 3:45:00legend this constitute
- 3:45:03our te chart now while rest of the
- 3:45:06property like size title xxs will remain
- 3:45:10same and this concatenate label we have
- 3:45:12seen in the bar visual how to use that
- 3:45:15means
- 3:45:16uh when you have more than one thing on
- 3:45:19x-axis you can use it title layout Y
- 3:45:21axis all these properties are going to
- 3:45:24remain same you have the values of
- 3:45:27display title Legends is compulsory for
- 3:45:30you now because we the Legends are
- 3:45:32compulsory in this one so let's
- 3:45:34understand the legend positioning so
- 3:45:36right now there are legends are on the
- 3:45:38top left here this position we are
- 3:45:40having here we can say it is top Center
- 3:45:43they have changed the position to the
- 3:45:44center top Center position now we can
- 3:45:47move it around with let's say top
- 3:45:50right and the one which I wanted to show
- 3:45:53is center right comes here now depending
- 3:45:56on the need we can place it but I think
- 3:45:59as of now
- 3:46:02either bottom center or top Center is a
- 3:46:05better choice for us because we have
- 3:46:077even eight values and we would like the
- 3:46:09width to be given now small multiples is
- 3:46:13something which we are going to play
- 3:46:14around little bit later grid lines if
- 3:46:16you want to show the grid lines you can
- 3:46:17have the grid lines on uh right now I
- 3:46:20can the only thing I can do is I can
- 3:46:22increase the grid Lines by a little bit
- 3:46:24width and I can give them different
- 3:46:26color so it's visible so I can have the
- 3:46:28grid lines a zoom slider I already
- 3:46:30explained you if you enable it you will
- 3:46:32be able to zoom on the
- 3:46:34excess so what I want to play around is
- 3:46:36in the columns and in the columns as
- 3:46:39usual the series is has to be um as
- 3:46:43because it's um stacked bar chart using
- 3:46:45Legend So individually you can change
- 3:46:47the color of the series there is no FX
- 3:46:49button right now you can use but there
- 3:46:51are a few new feature came in here also
- 3:46:53now one is transparency I can increase
- 3:46:55the transparency here now I can have a
- 3:46:57border I I kept I'll keep really thin
- 3:47:00border here match the color I'll use
- 3:47:01here uh transparency of the Border I'll
- 3:47:04not keep very high let let it be there
- 3:47:07and withd I would like to keep little
- 3:47:09bit finer width only let me have two
- 3:47:11pixels so that you can observe it now
- 3:47:14before I explain you this reverse order
- 3:47:16and sought by I'll tell you what was the
- 3:47:18disadvantage previously what we have and
- 3:47:21what it actually addressed here before
- 3:47:23that let me show you spacing between the
- 3:47:25categories so as you can see the width
- 3:47:28of the bar is getting changed when I'm
- 3:47:29doing that and the spacing between the
- 3:47:32series now now this is something really
- 3:47:34important it only happened between the
- 3:47:37Legends so as you can see the moment I'm
- 3:47:40increasing it is changing the width
- 3:47:43between the
- 3:47:46serieses so right now it is 3 pixel Max
- 3:47:49I can have 5 pixel and then series
- 3:47:51explosion note down what is happening
- 3:47:53right now look at the
- 3:47:55chart this is my area and what
- 3:47:59happens it actually removes your y-axis
- 3:48:03and allow it to go beyond the values
- 3:48:06what it had now if you do such kind of
- 3:48:08stuff definitely the labels is only
- 3:48:10going to be the saor and yes powerbi has
- 3:48:12enounced the label also again in
- 3:48:14December
- 3:48:15we the labels have been in us but right
- 3:48:17now what I'm going to do is I'm going to
- 3:48:18decrease the space between the series
- 3:48:21I'll keep it minimal I'll also remove
- 3:48:23the series
- 3:48:24explosion now let me explain you what
- 3:48:27this reverse order and sort by order
- 3:48:29let's first understand what kind of
- 3:48:31sorting we have in the dots three dots
- 3:48:34so I made the adj just little chart so
- 3:48:36if you go on the sort AIS you can either
- 3:48:38sort on brand on N it's already sorted
- 3:48:40on net I can maximum do is s on brand
- 3:48:46now I sorted it on brand and then
- 3:48:48internally it is sorted on category but
- 3:48:50what you are asking for long is this
- 3:48:53sorting you also want it based on the
- 3:48:57values so this is the Sorting option you
- 3:48:59have now they are sorted on values you
- 3:49:01can see this is smaller this is bigger
- 3:49:04this is smaller this is this is smaller
- 3:49:05bigger bigger biger now if I say reverse
- 3:49:08order the bigger would be down and the
- 3:49:10smaller would be
- 3:49:11up I'll further go down and what I'll do
- 3:49:14is I'll go and say sort XIs on
- 3:49:17net so now this is what you always
- 3:49:20wanted from powerbi and now after
- 3:49:22December 2023 it has been enabled the
- 3:49:25value this value is the greatest value
- 3:49:28largest
- 3:49:29value so this is the largest value and
- 3:49:32the values are again s descending inside
- 3:49:35the stagged bar visual data label again
- 3:49:39going to play a role because data label
- 3:49:41we have seen in the bar how new
- 3:49:42enhancement is going to help us out but
- 3:49:44the moment I enabled you get this one
- 3:49:46part of it now horizontal or vertical
- 3:49:49I'll can make it vertical here overflow
- 3:49:52text I can allow so that I can have more
- 3:49:55I can add the title so I'll add the
- 3:49:57categories here and overflow text is
- 3:49:59helping me out here I can have series
- 3:50:01name or custom if I want to have a label
- 3:50:03let me keep it as series name now next
- 3:50:06is value which I would like to keep net
- 3:50:08though I have an option to change that
- 3:50:10also I can go and make a gross value to
- 3:50:13appear here
- 3:50:15but I don't want that isn't it or let me
- 3:50:17show you some percentage value let's say
- 3:50:19margin percentage I'm showing a margin
- 3:50:20percentage here and the formatting is
- 3:50:23going to play the role so I'm not going
- 3:50:24to say none so that I see the correct
- 3:50:27value okay because otherwise it will
- 3:50:28take the format of the original major so
- 3:50:31let me go back to the net
- 3:50:34value and I'll say Auto format because
- 3:50:37otherwise the too much data here now
- 3:50:41decimal place is Auto Now details is
- 3:50:43something where I can add and this would
- 3:50:45be especially helpful for those of you
- 3:50:47want to like to show the percentage of
- 3:50:51subtotal
- 3:50:52here now right now you don't know how to
- 3:50:55create that percentage of subtotal or
- 3:50:57percentage of total I'm going to give
- 3:51:00you a major and and we're going to
- 3:51:01achieve that because the moment I enable
- 3:51:04it it allows me to have that
- 3:51:07gross and I can see that another measure
- 3:51:09but I I don't need that measure I
- 3:51:11actually want the percentage of
- 3:51:15sub total now percentage of sub tootal
- 3:51:19is something which I have not taught you
- 3:51:20till now but what I'm going to do is I'm
- 3:51:22going to give you a quick major here and
- 3:51:24I'll tell you how to create that major
- 3:51:25later so let me click on the majors
- 3:51:27which is Drive majors and on that top of
- 3:51:31that I'll click measure and create a
- 3:51:32measure here which is percent
- 3:51:37of brand what is my percentage of brand
- 3:51:40is
- 3:51:41divide net and when I want to divide the
- 3:51:45net I want to calculate the net again
- 3:51:48and this I'm going to explain you later
- 3:51:50when we will show you how to create the
- 3:51:52measur I want to calculate the net again
- 3:51:55but this time when I'm calculating the
- 3:51:57net I don't want to consider the filter
- 3:52:00of category I want to consider the
- 3:52:02filter of brand but I don't want to
- 3:52:03consider so there is something known as
- 3:52:04remove filters item category I'm saying
- 3:52:08the remove the filter of the category so
- 3:52:09what would happen while the net is for
- 3:52:12that brand category
- 3:52:15the denominator would not have the
- 3:52:18category filter now this is a percentage
- 3:52:21column so I have to mark it as a
- 3:52:22percentage
- 3:52:23also now I got a measure which is
- 3:52:26percentage of brand and let me place
- 3:52:30that and I have to go ahead and change
- 3:52:33its data type as none and as you can see
- 3:52:36this is 78% this is 16% now font is
- 3:52:40something which we have to really play
- 3:52:41around so and it's not only the one font
- 3:52:45which I have to do I I'll make it
- 3:52:47smaller for all of
- 3:52:49them let me make it smaller for title
- 3:52:52also so now you can
- 3:52:54see uh that uh we have all these and now
- 3:52:57you have the transparency and all those
- 3:53:00play around with everything show blank
- 3:53:02value as
- 3:53:03Hyun then colors of each of these you
- 3:53:06can
- 3:53:07control if you want a background you
- 3:53:09will have a background also and
- 3:53:12background transparency you can decide
- 3:53:13how much transp you want but the moment
- 3:53:15you put background it because it take
- 3:53:17additional space so some of the values
- 3:53:19may go away and definitely you need to
- 3:53:22make sure that um overflow is there so
- 3:53:25that whatever maximum it can accumulate
- 3:53:27it can accumulate and now I can make it
- 3:53:29horizontal also sometime it may actually
- 3:53:31look now depend if I don't want to use
- 3:53:35title series name may be horizontal
- 3:53:38looks much better so I think in this
- 3:53:40case if I don't want to have those
- 3:53:42titles and definitely because category I
- 3:53:44already have a label I know which
- 3:53:46category it is so in this manner I can
- 3:53:50have it now the next thing which is
- 3:53:52which I go down
- 3:53:54here the layout which is multi-line I
- 3:53:56can have a single line now I'll tell you
- 3:53:58where you need single line so let me
- 3:54:00duplicate this page and tell you where
- 3:54:01you'll need it so let me duplicate and
- 3:54:03let me call it
- 3:54:05tagged
- 3:54:07one and let me click on the visual and
- 3:54:10make
- 3:54:12it tagged bar now here if I
- 3:54:16go I go down to the labels and this is
- 3:54:20the place where I need it as single
- 3:54:23line instead of multi-line I'll make it
- 3:54:26a single line there is definitely
- 3:54:27there's a difference which is very less
- 3:54:30which you can adjust by giving different
- 3:54:32colors or making it bold or italic so it
- 3:54:35shows the differentiation between them
- 3:54:38but this is something so the
- 3:54:43sorting and the absolute value as well
- 3:54:46as the percentage value is something
- 3:54:47which was missing
- 3:54:49altoe and which has been enabled in the
- 3:54:52latest version of powerbi which is
- 3:54:55December 2023 on which I'm recording and
- 3:54:58now you can see how much difference it
- 3:55:00creates now this visual is lock looking
- 3:55:03all together different Visual and those
- 3:55:05of you who has watched my video on
- 3:55:08stagged bar in the past in the beginner
- 3:55:11series those of you who has watched it
- 3:55:13in the last here's full video go ahead
- 3:55:16and compare that how much
- 3:55:18differentiation it is created
- 3:55:21so these are the property of the stagged
- 3:55:24bar which we have played around so I'm
- 3:55:25coming back to the first one again let
- 3:55:27me click on it and let's see if we want
- 3:55:30to explore some other properties also so
- 3:55:32total labels is something again we want
- 3:55:34to switch it on now total label is
- 3:55:37basically the total which is and now we
- 3:55:41have two more kind of stacked bar which
- 3:55:43is 100% in the 100% it doesn't matter
- 3:55:46okay the total only matters in this one
- 3:55:48because how much is this total and how
- 3:55:50much I'm percentage so 1.1 million is my
- 3:55:52total and of that 1.1 million I am
- 3:55:55around 68 million which is around 62
- 3:56:00percentage and then again there are few
- 3:56:02properties like you would like to have
- 3:56:04you know color or a
- 3:56:07background I switched on the background
- 3:56:09then you can have a background color and
- 3:56:12transparency right now it is auto
- 3:56:13display you can say none if you want to
- 3:56:15show the complete value or
- 3:56:19thousands and split positive and
- 3:56:22negative this one more option has been
- 3:56:23given here so these are various
- 3:56:26formatting options which can make it U
- 3:56:28you know really look amazing and then we
- 3:56:31have the if want image then we can have
- 3:56:32plot background area and again you can
- 3:56:34add reference lines plus button
- 3:56:36reference line the only reference line
- 3:56:38option we have in the stack bar is a
- 3:56:40constant line so you can add a constant
- 3:56:41line you can give a value now based on
- 3:56:43the fil filtering the value will change
- 3:56:45so better you use this FX button and
- 3:56:47give a
- 3:56:49major but right now just for our
- 3:56:51understanding purpose I will give
- 3:56:53it let's say
- 3:56:56500,000 I got a line at 500,000 and I
- 3:56:59can give a color and all those so
- 3:57:02various reference lines are available
- 3:57:03and we can use those now depending on
- 3:57:05the visual these reference line keep on
- 3:57:06changing those who are on the last
- 3:57:09year's version those who have not opted
- 3:57:12for these new changes there used to be a
- 3:57:15separate section analytical pain and
- 3:57:17inside that these options would be there
- 3:57:19now these has been merged analytical
- 3:57:21pain options have been merged inside the
- 3:57:23visual properties only and then you have
- 3:57:25the generic properties as usual they are
- 3:57:27there as there are no differences I
- 3:57:30would just leave them as is uh there is
- 3:57:33nothing specific with the visual other
- 3:57:34than you know you can switch in on or
- 3:57:36switch off the tool tipe but a beautiful
- 3:57:39tagged chart Visual and even the cluster
- 3:57:42bar visual can be created ated with the
- 3:57:45latest version of powerbi you have
- 3:57:47learned about this stagged bar Visual
- 3:57:49and it's 100% stagged bar visual there
- 3:57:50is one more way these bar visuals can be
- 3:57:53created so let me tell you so what we
- 3:57:55can do is basically let's start with a
- 3:57:58that column bar let me bring in brand
- 3:58:01here on the
- 3:58:02x-axis now what I can do here is and
- 3:58:05what I said that you know staged is not
- 3:58:07an staged unless you use Legend but
- 3:58:09there is another possibility and what
- 3:58:12that possibility is I can bring in
- 3:58:15net as one of the major and I can bring
- 3:58:19in margin so what is my net and margin
- 3:58:20is my gross so this is basically my
- 3:58:22gross and in this manner also I can
- 3:58:24create a tagged bar
- 3:58:26visual now definitely I can enable the
- 3:58:29data label where I can get the values
- 3:58:31and now if you have your margin
- 3:58:33percentage and uh the net percentage
- 3:58:36that could be another way to add few
- 3:58:38more labels here but a stagged bar
- 3:58:40visual can be created on two majors also
- 3:58:42so if you don't want to use Legend
- 3:58:44then you can create it on multiple
- 3:58:47measures so either you can have multiple
- 3:58:48measures or you can have Legend the
- 3:58:50thing to remember here also is when you
- 3:58:52use multiple measure also there is no
- 3:58:53conditional formatting possible so in
- 3:58:55case of staged you will not be able to
- 3:58:57do the conditional formatting now one
- 3:59:00more thing which we can do here is if
- 3:59:01you want to make it 100% tagged column
- 3:59:04chart you go here and it will start
- 3:59:06showing you the percentage so these are
- 3:59:07actually the percentage how much of the
- 3:59:10gross the net is and how much the margin
- 3:59:13is so so how much percentage the margin
- 3:59:15is out of my gross and how much is net
- 3:59:17so there are two options you can create
- 3:59:19a stack B visual One is using the legend
- 3:59:21and one is using multiple measur now I
- 3:59:24can have more than one measure also so I
- 3:59:26can actually can bring in cogs when I
- 3:59:28bring in cogs basically net doesn't have
- 3:59:31a value in that case I should have cost
- 3:59:36discount and margin maybe these three
- 3:59:39will contribute to
- 3:59:41that in this manner I can bring in my
- 3:59:44100% column stagged bar visual or tagged
- 3:59:46column bar visual or tagged bar visual
- 3:59:50or 100%
- 3:59:52stagged bar Vis do so in this manner I
- 3:59:56can have multiple such combinations with
- 3:59:58more than one major also we would also
- 4:00:01like to explore the 100% staged bar
- 4:00:04visual so let me add a new page and let
- 4:00:06me say 100p tag now again there would be
- 4:00:10two versions one is basically the 100%
- 4:00:14stack bar chart and 100% stack column
- 4:00:17chart bar as well as column let me use
- 4:00:20the
- 4:00:21column and on the x-axis my favorite
- 4:00:24brand on the y axis net and definitely
- 4:00:28no stack is completed without a legend
- 4:00:31need to add a legend and let me add as
- 4:00:34category now rest of the things are same
- 4:00:36but let's just quickly have a look at
- 4:00:38xaxis do we have something additional no
- 4:00:41Y axis do we have something additional
- 4:00:42no Legend as usual the positions uh
- 4:00:46small multiples we are not exploring
- 4:00:48right now grid lines column let's comes
- 4:00:49to the column and in the column we have
- 4:00:51all the serieses where we can choose the
- 4:00:53color border if you want to switch in on
- 4:00:55the borders then we have the
- 4:00:57layout and again this layout would be
- 4:01:00more suitable we want it to have s by
- 4:01:01values and reverse order we want the
- 4:01:04highest value at the bottom and the
- 4:01:06lowest value at the top space between
- 4:01:08the
- 4:01:09categories uh and space between the
- 4:01:11series is something we are more
- 4:01:12interested in it looks much
- 4:01:14more flexible and maybe a little bit of
- 4:01:18transparency in the color let's go down
- 4:01:20to the data label again let's see what
- 4:01:22all we have now so first thing is
- 4:01:26series uh horizontal or vertical here we
- 4:01:29can have it vertical uh position is auto
- 4:01:32I prefer that overflow text let's allow
- 4:01:35it so we can have I think horizontal
- 4:01:37would be better here isn't it we could
- 4:01:39get a value I was more worried about
- 4:01:40this value which will go away in the
- 4:01:42vertical horizontal is much better
- 4:01:44option here I want to add a title and I
- 4:01:46while I can showcase you what happens
- 4:01:47when I add the title but this something
- 4:01:49I'm not interested in as long as I have
- 4:01:51the legend label but yeah value now here
- 4:01:54it is always already a percentage so I
- 4:01:57can add the
- 4:01:58net now once I add the net it is
- 4:02:00something which is uh not looking great
- 4:02:03so let me go ahead and choose something
- 4:02:05here I remove the decimal places and let
- 4:02:07me make it a little bit smaller so now I
- 4:02:09can see the net value here so net value
- 4:02:11and how much percentage it is and what
- 4:02:14is happening here seems like detail and
- 4:02:15this value are changing automatically
- 4:02:17along together they should have been
- 4:02:20separate but seems like some issue and I
- 4:02:21can make it tyun when it is not
- 4:02:24zero let's give a little bit of
- 4:02:26background so now what is happening both
- 4:02:29the visuals the 100% stacked bar visual
- 4:02:32as well as the stack visual can show you
- 4:02:33percentage as well as the value now it's
- 4:02:36your choice which one you wanted to use
- 4:02:38you want to choose the 100% stack bar
- 4:02:41visual or you want to choose the
- 4:02:44normal bar Visual and then want to show
- 4:02:45percentage I told you how to get a
- 4:02:47measure for that which we will learn
- 4:02:50when we go to the percentage of total
- 4:02:52later and then multi-line or single line
- 4:02:55have single line but if you make it
- 4:02:56single line then make it vertical that's
- 4:02:59look much better but it's going to take
- 4:03:00a lot of space so I'm going to make it
- 4:03:01horizontal and multi-line that is much
- 4:03:03better in this
- 4:03:05one now if we duplicate
- 4:03:09this on this and we change it to
- 4:03:12100% tag bar chart there we can go ahead
- 4:03:16and make this data label out as instead
- 4:03:18of multi-line we can make it single line
- 4:03:20now it looks better
- 4:03:22here plot area and background same thing
- 4:03:24again reference line same thing we want
- 4:03:26to add then we have only one option
- 4:03:29constant line we can add constant line
- 4:03:31if you want a value let's say 0.5 50% is
- 4:03:34the one where I wanted the value to be
- 4:03:37appearing and in this manner we can 100%
- 4:03:40stack bar visual again the uses of the
- 4:03:42stack bar visual will depend on your us
- 4:03:45whether you need 100% stacked bar visual
- 4:03:47or simple stacked bar now going to
- 4:03:49create the pi visual so let me add
- 4:03:51another page and in this page uh from
- 4:03:54the build visual I'm going to add the P
- 4:03:57Visual and we have a very similar visual
- 4:03:59donut visual also so at the end I'll
- 4:04:01just show you the donut visual so let me
- 4:04:04click on the pi visual now when you have
- 4:04:07the pi visual the options you have is
- 4:04:09the legend value details and Tool tip a
- 4:04:13pi visual can be created with a set of
- 4:04:15Majors or Legend plus major so I'll tell
- 4:04:19you first how to create a pi visual only
- 4:04:22with measures this is something which
- 4:04:24you might need I'll create with the
- 4:04:28cogs
- 4:04:31discount and
- 4:04:33margin
- 4:04:35okay the cost of goods sold discount and
- 4:04:38margin I've have taken three Majors so
- 4:04:40basically what I can do is I can take
- 4:04:45net discount and
- 4:04:49margin in this manner I can create a p
- 4:04:52visual which can tell me how much each
- 4:04:54of these things are getting contributed
- 4:04:57and you are getting percentage so only
- 4:04:58with the help of major I can create this
- 4:05:01is one way of creating a p visual let me
- 4:05:04move it aside let me add another P
- 4:05:06visual now we can have another Pi visual
- 4:05:09which basically I'm going to use Legend
- 4:05:11This Time so let me use Cate as a legend
- 4:05:14and ideally speaking because there's no
- 4:05:17scrolling you can have in the pi visual
- 4:05:19you should use only Pi to 10 categories
- 4:05:22Max 15 categories in the pi visual more
- 4:05:24than that it's overloading of Pi so I
- 4:05:27drag the category and now I can drag a
- 4:05:30majure now values you should avoid using
- 4:05:33percentage column in this one because it
- 4:05:35is further going to calculate percentage
- 4:05:37of total of that so that's not a great
- 4:05:39idea to
- 4:05:40have so Pi visual has been created with
- 4:05:43Legend uh can we have more than one
- 4:05:44Legend so let me also drag brand on top
- 4:05:46of it and as soon as I add brand the one
- 4:05:49is the drill down structure has came now
- 4:05:52I can go to the next level it is brand
- 4:05:54wise come up I can expand both brand and
- 4:05:57category would be available here so this
- 4:05:59is one manner second is this brand
- 4:06:01instead of having it in the legend I can
- 4:06:05have the brand in the details I can
- 4:06:06click on add data instead of dragging
- 4:06:07and dropping
- 4:06:09it and I can have it here now in this
- 4:06:11case you can see they are not getting uh
- 4:06:13different colors there is a distribution
- 4:06:15of brand is coming inside the same color
- 4:06:17of the category in this manner also you
- 4:06:19can create it so this is one way and
- 4:06:21let's keep them side by side so that you
- 4:06:24can differentiate so this is one way
- 4:06:26where and I'm where you have it and let
- 4:06:28me duplicate it so and this is the
- 4:06:30second way where we actually have the
- 4:06:34brand as the second legent and we expand
- 4:06:41it and you have this and you expand it
- 4:06:45so these are the two meths here
- 4:06:46everything is going to get different
- 4:06:47color and here we have the same color in
- 4:06:49which the brand split is there and when
- 4:06:51you use the tool tip you'll be able to
- 4:06:53see now let's play with the label now so
- 4:06:56if you see by by default the detail
- 4:06:58label is on and if you see the detail
- 4:07:00label right now it is showing data value
- 4:07:02and percentage this is same true for
- 4:07:03here but if you go here you can say all
- 4:07:05the labels and here you will be able to
- 4:07:07get the brand name also so which brand
- 4:07:10is there so within the category which
- 4:07:12brand is there now
- 4:07:14a same way if you go here and if you
- 4:07:15enable all labels then you will also get
- 4:07:18the the name major name and the value
- 4:07:21and the
- 4:07:22percentage now we'll keep the simple
- 4:07:25visual let's me create one more copy and
- 4:07:27here let
- 4:07:28me remove the brand here and as you can
- 4:07:32see we can get category the value and
- 4:07:34the percentage value and we have the
- 4:07:36various options like only data value
- 4:07:38only percentage of total value or only
- 4:07:41category level or all the details and
- 4:07:43then right now it is outside you can say
- 4:07:45inside and now everything can come
- 4:07:47inside so you can always use prefer
- 4:07:49inside or prefer outside so you can say
- 4:07:50prefer inside or you can say prefer
- 4:07:52outside so it will try to adjust some of
- 4:07:55the things to get more values now this
- 4:07:57is the detail label and inside the
- 4:07:59values again you have the font you have
- 4:08:01the color which you want to use
- 4:08:03background is auto if you want on or off
- 4:08:05you can say background is
- 4:08:08on then display units is auto you can
- 4:08:10say use none now this is for the value
- 4:08:13so basic Bally then you have the value
- 4:08:14decimal places because if the value is
- 4:08:16an auto format about how many decimal
- 4:08:17places it need to have then percentage
- 4:08:19decimal place value also you can control
- 4:08:21now it is one decimal it is two decimal
- 4:08:23so all those you can control now
- 4:08:24depending on the space the label may
- 4:08:27come little bit less or more and then
- 4:08:29dot dot dot might start coming then
- 4:08:31there is something which is also known
- 4:08:32as rotation now rotation is basically if
- 4:08:34you see right now it's starting from
- 4:08:36this position let me highlight that for
- 4:08:38you right now it is starting from this
- 4:08:40position now if I do the rotation here
- 4:08:43here the position starting position is
- 4:08:45changing now you can see that it is
- 4:08:47starting from here
- 4:08:49now same way I can completely rotate it
- 4:08:51and if I rotate it 360 it will come at
- 4:08:53the same place so this SK can be helpful
- 4:08:56from where you are starting now let's
- 4:08:58look at the other properties uh we
- 4:09:00similarly we have a size and this
- 4:09:03horizontal position property padding is
- 4:09:05something how much padding we have in
- 4:09:07the space which is available inside the
- 4:09:09chart background on or off we can switch
- 4:09:11it on and off or if you need background
- 4:09:13we can change the color or we can change
- 4:09:15the transparency if we have the color we
- 4:09:18can increase or decrease the
- 4:09:20transparency based on that is visual
- 4:09:22border if you want a border now if I
- 4:09:23come out none of them has border only
- 4:09:25this one has a
- 4:09:28border Shadow if you need Title the
- 4:09:31title is already there we can have a
- 4:09:33title and then we can have a subtitle
- 4:09:35then divider and spacing as usual same
- 4:09:38as other visual Legends again we can
- 4:09:40have the position top right top left and
- 4:09:42Center depending on the place you have
- 4:09:44you can adjust it because right now I
- 4:09:46created a little bit rectangular so I do
- 4:09:48have a position in the center left or
- 4:09:50center right that I can use then the
- 4:09:52title again the title is right now
- 4:09:55category you can change it to whatever
- 4:09:57you want or or you can disable the title
- 4:09:59here then slices for each slices you
- 4:10:01have the color again the P visual use
- 4:10:04Legend So in the slices you have the
- 4:10:08color which you can choose you can
- 4:10:09manually go ahead and change it uh
- 4:10:11conditional formatting is not supported
- 4:10:13but I will tell you later that you know
- 4:10:15there is a work around to support
- 4:10:16initial formatting in pi visual now
- 4:10:19detailed labels we only option we have
- 4:10:21is the label is detailed label and we
- 4:10:23have certain set of options which we can
- 4:10:25use then value and percentage formatting
- 4:10:28we have done so this is py visual for
- 4:10:30you so uh you can create it with Majors
- 4:10:32you can create with Majors Legends
- 4:10:35multiple Legends Legends and details all
- 4:10:37those thing you can try out and finally
- 4:10:40you can also have a donut instead of
- 4:10:42this one so you can have the donut
- 4:10:45instead of having the pi Visual and the
- 4:10:49properties are almost similar so we have
- 4:10:51title Legends inside that we have
- 4:10:53options slices detail label we can have
- 4:10:57rotation now sometime what we do we keep
- 4:11:00this as a transparent and behind that we
- 4:11:03keep a value in a card Visual and we
- 4:11:05start showing that value so it start
- 4:11:06showing like there is a value in the
- 4:11:08middle that we can do and if you want to
- 4:11:11add something additional on the tool tip
- 4:11:12let's say margin percentage you can add
- 4:11:14it and you will be able to
- 4:11:16see let's add margin percentage we have
- 4:11:19added margin margin percentage I'm
- 4:11:21adding so you can have n number of such
- 4:11:24uh things on the tool tip which you want
- 4:11:26and then as usual the generic properties
- 4:11:28you can switch off the tool tip and it
- 4:11:30will not show the tool
- 4:11:32tip let's experiment with a new visual
- 4:11:34the visual which I want to experiment is
- 4:11:36the three map visual so I'm going to add
- 4:11:38a new page and let me rename it as
- 4:11:41threee map some of the pages I'm
- 4:11:44renaming even after closing down the
- 4:11:47video for that particular visual so you
- 4:11:49might find that some of the pages has
- 4:11:51been
- 4:11:52renamed so I click on tree map now tree
- 4:11:54map is kind of a horizontal P the only
- 4:11:57thing is it doesn't show you the
- 4:11:59percentage so we have a category but
- 4:12:02unlike P we don't have a legend concept
- 4:12:04here we have the concept of category
- 4:12:06details and values so first let's start
- 4:12:09with category so we can say brand is my
- 4:12:11category and net is my
- 4:12:14value and then we can enable the data
- 4:12:17labels so it starts showing the values
- 4:12:19if you go down in the data labels it is
- 4:12:21showing what values it's showing so
- 4:12:23value display is Auto and you can see
- 4:12:25the values are out here can see these
- 4:12:28values you can not it down here now and
- 4:12:31make it none so that you can see it in
- 4:12:33the default format similarly you can
- 4:12:35play around with the other properties
- 4:12:38like font face bold italic underlying
- 4:12:43Etc to make the labels appear little bit
- 4:12:48differently now let's say in case I
- 4:12:50wanted to have more than one level I can
- 4:12:51go ahead and add category also and then
- 4:12:53we have that option like next level only
- 4:12:55on category or we can expand it so we
- 4:12:58have both brand and category and in this
- 4:13:00case you will get different different
- 4:13:01colors now going going to the color you
- 4:13:04have option like FX here so at least so
- 4:13:07whenever you are using the categories
- 4:13:08you can color it means you have the
- 4:13:10single category uh then you can have the
- 4:13:12brand colors using using the conditional
- 4:13:14formatting so you can control on that
- 4:13:17but definitely when I'm going to use
- 4:13:18detail will I get that option or not so
- 4:13:20let me remove category from here and let
- 4:13:21me add category on the
- 4:13:25details so once I add the category on
- 4:13:27the details now you can see the FX
- 4:13:29option is no more available for you to
- 4:13:33do the conditional formatting and the
- 4:13:36brand itself is cut down into multiple
- 4:13:38categories and I'm getting the option
- 4:13:40for categories and the values now here
- 4:13:42in this place because I have now place
- 4:13:44where you know a lot of values are there
- 4:13:46so it's better to have a you know Auto
- 4:13:48display so that you know the display
- 4:13:50becomes smaller or maybe we can reduce
- 4:13:52the font also and category labels are
- 4:13:55also there these are the category labels
- 4:13:56and we can reduce the font of the
- 4:13:57category label also so the uh category
- 4:14:00as well as detail label will become a
- 4:14:02little bit smaller if we use the
- 4:14:04category label here that's controlled by
- 4:14:06here and then we can choose the color or
- 4:14:08we can leave it whatever it is so these
- 4:14:10are the various option again if you want
- 4:14:11to have additional information on tool
- 4:14:13tip you can add it on the tool
- 4:14:17tip then we have size title Legends as
- 4:14:20usual so Legends are off but you can add
- 4:14:22the Legends if like Legend is nothing
- 4:14:24but your category display so here you
- 4:14:26are seeing that but definitely the
- 4:14:28position seems to be very important here
- 4:14:30this not conveying much of the message
- 4:14:33so left center right is place where I
- 4:14:35can put it it taking little space but at
- 4:14:38least I'm able to see all the labels so
- 4:14:40legend legend have a title here
- 4:14:44if you want to switch off the title you
- 4:14:45can switch it off there's no title here
- 4:14:49now then we have data label which we
- 4:14:52already explained and the value label as
- 4:14:53well as the category label which we have
- 4:14:55already explained so this is our tree
- 4:14:57map visual let's now explore the line
- 4:15:00visual I'm adding a new page and let me
- 4:15:02rename it as
- 4:15:03line so line visual is given here in the
- 4:15:06build Visual and it is also available
- 4:15:08here on the top insert in the homepage
- 4:15:11from any of the place we can use it CLI
- 4:15:13click on the line visual it will give
- 4:15:15you a line visual let me make it a
- 4:15:16little bit
- 4:15:18larger we can have x-axis y AIS and
- 4:15:21secondary y-axis now we have not used
- 4:15:23the combo visual where we can have
- 4:15:25secondary yaxis but line visual has been
- 4:15:27enhanced in the past to have secondary
- 4:15:29yis but here now there are limitations
- 4:15:31like when you can use secondary yaxis
- 4:15:33but so when you have multiple measure
- 4:15:34you might not be able to use it when you
- 4:15:36have Legend you might not be able to use
- 4:15:37it so we have to explore that out first
- 4:15:39start with very simple visual now unlike
- 4:15:41some of the tools which doesn't allow
- 4:15:43you align the non-time series visuals
- 4:15:47means it's always need to be a Time
- 4:15:48series kind of a visual in power B
- 4:15:50there's no limitation in powerb I can
- 4:15:52create aine chart just like a bar chart
- 4:15:54so let's say I can have brand on my
- 4:15:56x-axis and I can bring in net on the Y
- 4:15:59AIS and I can have a line visual which
- 4:16:00is very simple and again if I need more
- 4:16:02than one line I can have that but line
- 4:16:04visual is definitely more suited for
- 4:16:06Trend so let's bring in date for that
- 4:16:08I'm removing that and from the sales
- 4:16:10table I'm bringing in date now as you
- 4:16:12can see right now date is showing an
- 4:16:14hierarchy and this is what we call Auto
- 4:16:15time intelligence because of the auto
- 4:16:17time intelligence thing showing the
- 4:16:19hierarchy so there was an option in the
- 4:16:21starting if you remember was Auto time
- 4:16:23intelligence which we have not disabled
- 4:16:25if you disable that that will not come
- 4:16:27also right now we have not created a
- 4:16:29date table but when I going to create a
- 4:16:31date table and I'm going to join these
- 4:16:32with date table if they are joining with
- 4:16:35a table which is having a date this
- 4:16:38column again going to join with a key
- 4:16:40column then it will lose the date
- 4:16:42hierarchy
- 4:16:43so in case you wanted to continue to use
- 4:16:45date hierarchy you can duplicate if this
- 4:16:48column you're planning to join so let me
- 4:16:50bring in that into the x-axis and as you
- 4:16:52can see it is showing me a date
- 4:16:53hierarchy now if I want to keep date
- 4:16:56hierarchy it's fine I I will see these
- 4:16:57options like you know drill up and drill
- 4:17:00down so it can start with ear and then I
- 4:17:02can you know further go down by press
- 4:17:06drill
- 4:17:07down by going like this or and drill
- 4:17:11up or I have option to
- 4:17:15expand and finally at Day level this is
- 4:17:18what I can do or I can click on this
- 4:17:20Arrow instead of date hierarchy I can
- 4:17:23use simply sve date when I use the sve
- 4:17:25date you will see you are still seeing
- 4:17:26the same value but now you don't have a
- 4:17:29drill up or drill down option so that
- 4:17:31option is not available with you you are
- 4:17:32getting is a continuous visual now what
- 4:17:35is this continuous visual now this
- 4:17:37continuous visual is possible both in
- 4:17:39case of bar as well as line now this
- 4:17:41continuous access is coming in x-axis we
- 4:17:44have a type continuous and categoric now
- 4:17:46when you have a date or you have a
- 4:17:48number you can get this option
- 4:17:50categorical and continuous access also
- 4:17:53get this minimum maximum range in terms
- 4:17:55of dates also which we have seen in the
- 4:17:57y axis in terms of value we have the
- 4:17:59minimum maximum range in terms of the
- 4:18:02date now I can make it categorical and
- 4:18:05now you can see all the dates and now we
- 4:18:07have to make the access a little bit
- 4:18:08bigger or we can change the format of
- 4:18:10the date so right now the format of the
- 4:18:12date is like such a big format I can
- 4:18:14make it as a short date now I can see
- 4:18:15each and every date and now because
- 4:18:17visual is too big powerb is
- 4:18:19automatically giving me scrolling it
- 4:18:22can't fit in you remember when it was
- 4:18:24continuous it do try to fit it into the
- 4:18:26single page I can make it continuous and
- 4:18:28categoric now the option of continuous
- 4:18:30categorical is limited to date and the
- 4:18:33numbers right now you're saying this is
- 4:18:35coming in the ascending order but you
- 4:18:36can use this invert AIS it will actually
- 4:18:38start it in ascending order actually
- 4:18:40when you have the continuous AIS you
- 4:18:42don't have an option option to sort it
- 4:18:43on the using the three dots so you can
- 4:18:45use this invert access option now you
- 4:18:48can go to the values inside the values
- 4:18:49the values are right now on on the
- 4:18:52x-axis if you want to hide those xaxis
- 4:18:54value you can use this now again the
- 4:18:56display is Auto and then you have a
- 4:18:58title you want to remove the x-axis
- 4:18:59title now you don't see any sales date
- 4:19:01here on the
- 4:19:04bottom now there's a sales date
- 4:19:06similarly for y axis you have minimum
- 4:19:07maximum range logarithmic axis if you
- 4:19:10need invert range if you want to invert
- 4:19:12the range on the top and 70k this case
- 4:19:15at the bottom the direction has
- 4:19:18changed let me invert it again again the
- 4:19:21values you want to show the values or
- 4:19:23not you can switch off the X's you can
- 4:19:25pay attention to the Y axis there's no
- 4:19:27values now again want to display unit
- 4:19:29and everything title again we have the Y
- 4:19:31AIS title we can disable the title
- 4:19:34secondary yaxis this is important now
- 4:19:36let's see we have two measures does it
- 4:19:38allow us the third measure on the
- 4:19:39secondary Y axis I try to drag the
- 4:19:41discount on the secondary axis
- 4:19:43and as you can see we have the discount
- 4:19:45on the secondary y-axis but when we have
- 4:19:49a legend let's say I try to bring in
- 4:19:51category now I can't bring category on
- 4:19:53the legend I remove the secondary yaxis
- 4:19:55and I try to bring category on the
- 4:19:57legend I can't bring it I can only have
- 4:19:59the category as a legend when I only
- 4:20:01have the one major let me try the
- 4:20:03category along with the one major I have
- 4:20:06the now categories at the legend but can
- 4:20:08I have a secondary y-axis when I'm using
- 4:20:11Legend so let me try to bring in Gross
- 4:20:14on the secondary axis I can't so the cas
- 4:20:17is when you are using a category you
- 4:20:20can't use the line on the secondary
- 4:20:23yaxis while if you're using a combo
- 4:20:25visual like clustered bar line visual or
- 4:20:28cluster stack bar visual you would be
- 4:20:30allowed a line in the secondary yaxis
- 4:20:32along with Legend but that's not allowed
- 4:20:34in the line visual so that's the
- 4:20:35limitation but yes if you have multiple
- 4:20:37measures uh you can still have one of
- 4:20:39them on the secondary Y axis let's bring
- 4:20:42in multiple measures and try to see what
- 4:20:43all secondary yaxis has to offer to us
- 4:20:46and I'm bringing in cogs on the
- 4:20:47secondary y axis and in case it doesn't
- 4:20:49show you the secondary ya axis sometime
- 4:20:51it happen that it might not show you so
- 4:20:54what you can do here is basically enable
- 4:20:56the values of the secondary yaxis so you
- 4:21:00I have added the secondary yaxis so you
- 4:21:02will be able to show usually what
- 4:21:03happens is we columns like margin
- 4:21:05percentage on the secondary Y axis which
- 4:21:07have all together different range so
- 4:21:09they create a different meaning now this
- 4:21:10could be a really complex chart if we do
- 4:21:12those things things we should try to
- 4:21:13keep them as simple as possible so I
- 4:21:15have removed one of them now again
- 4:21:18because this line AIS is continuous you
- 4:21:20have a lot of information out here then
- 4:21:22we have the Legends as I've shown you
- 4:21:25you can either use Legends or secondary
- 4:21:27ya Axis or multiple majors and then
- 4:21:29small multiples we'll check it later now
- 4:21:32in the Legends when you are showing uh
- 4:21:34the Legends can also be for the major
- 4:21:37display it's not only the legend we can
- 4:21:40check their change their position so
- 4:21:41right I moved them into the
- 4:21:44center then the text font you can change
- 4:21:47the title you can switch it on and
- 4:21:48switch it off like add Legend title I
- 4:21:51can say it's
- 4:21:53net by
- 4:21:57date small multiples options are not
- 4:22:00enabled because we are not using small
- 4:22:01multiples grid lines in case we wanted
- 4:22:04to have grid lines can increase the
- 4:22:05width of the grid lines as you can see
- 4:22:07now I think we need to use little bit
- 4:22:09darker color to make them visible
- 4:22:12we can have the vertical grid lines if
- 4:22:14we need again we need to have color
- 4:22:18darker color so we can have vertical
- 4:22:20grid lines also
- 4:22:21here Zoom slider to zoom your xaxis and
- 4:22:24y axis now these are both continuous
- 4:22:26axis so in both the axes you can have
- 4:22:28the zoom slider and as you go down you
- 4:22:30will be able to see
- 4:22:33the dates
- 4:22:36here so this is the advantage of Zoom
- 4:22:39slider especially in the continuous AIS
- 4:22:41you will be able to see the exactly
- 4:22:44going down to the drill down to the
- 4:22:46level and as we have already seen on the
- 4:22:48y-axis you actually goad and see the
- 4:22:50values on the y- axis by going
- 4:22:54down now secondary Y axis also if you
- 4:22:57need so Zoom slider I can have on the
- 4:22:59secondary yaxis also slicer label and
- 4:23:02Tool tip is few things which you can
- 4:23:04enable and based on that
- 4:23:06it's as you can see now there are two
- 4:23:09set of information one which I initially
- 4:23:11had and one which is is changing
- 4:23:13over so all these things you can use I
- 4:23:16going to disable the zoom slider as of
- 4:23:18now now for each lines you can have you
- 4:23:21know what color you want and everything
- 4:23:23again conditional formatting is not
- 4:23:25supported but uh uh if you go to the
- 4:23:27color you will see the margin and net
- 4:23:29you can have the colors even if you use
- 4:23:32the one major like right now I'm only
- 4:23:34using one major on Y axis still there is
- 4:23:36no conditional formatting enable but
- 4:23:38instead of conditional formatting you
- 4:23:39have a color dot which you can get and
- 4:23:42that you can get when you come back from
- 4:23:44the bar visual by doing the conditional
- 4:23:47formatting on bar visual which we'll see
- 4:23:49later now there is something really
- 4:23:50really interesting you can have the
- 4:23:52markers you can switch on the markers
- 4:23:53here and you will start seeing markers
- 4:23:56marker properties have been changed and
- 4:23:58once we are done with the line and the
- 4:24:00scatter visual I will showcase you those
- 4:24:04now you can play around with the size of
- 4:24:05the marker and you know the shape of the
- 4:24:07marker but there are more things which
- 4:24:09you can do here is basically what you
- 4:24:11can do is you can go to your line style
- 4:24:13and here like right now the line style
- 4:24:16because there's too much of data if I
- 4:24:17choose the line change the line style
- 4:24:19linear or smooth or stabbed stab
- 4:24:22actually you will not be able to
- 4:24:24actually see what means stab layout but
- 4:24:27what you can do here is you can decrease
- 4:24:28that width and ultimately you can
- 4:24:30actually make it zero it will become
- 4:24:32like a DOT chart now what you can do is
- 4:24:34instead of doing it for both the series
- 4:24:37what you can do here is you can go to
- 4:24:39let's say margin and margin I have a
- 4:24:41line and and I don't have a line for
- 4:24:43let's say net so there's no line for the
- 4:24:46net but there is a line for margin in
- 4:24:48this manner you can play around now you
- 4:24:50can make it completely dot visual or you
- 4:24:52can have a DOT and especially like if
- 4:24:54the majors are very nearby I can have
- 4:24:56line one of the line without marker so
- 4:24:58what we can do is marker right now is
- 4:25:00for all the series I can go to the
- 4:25:03margin now because I have the line in
- 4:25:04the margin and I can say show marker off
- 4:25:07so now what is happening here is the
- 4:25:09margin is only having the line and there
- 4:25:12are Net series which is only having the
- 4:25:14dot now this is the play around you can
- 4:25:17do and this is especially going to be a
- 4:25:19little bit helpful when you create the
- 4:25:20visual like line stack bar Visual and
- 4:25:23line clustered bar visual where you can
- 4:25:25make your line to
- 4:25:27disappear and you can leave just leave
- 4:25:29the
- 4:25:30markers so that can create more
- 4:25:32combination again the marker colors you
- 4:25:35can control and change the marker color
- 4:25:37depending on like right now I'm based on
- 4:25:39the series I can change but you have
- 4:25:41when you select all the it's not there
- 4:25:43one functionality which is there show
- 4:25:44all now if I switch it on on a
- 4:25:48particular date I can show a different
- 4:25:49color of marker that flexibility is
- 4:25:51there with
- 4:25:52us now this would be too many outside
- 4:25:55the dot now but on a smaller data it
- 4:25:56will do going to make a sense uh that we
- 4:25:59have a different
- 4:26:03color but let me switch it off but you
- 4:26:05have that kind of flexibility here on
- 4:26:07the smaller value then the data label we
- 4:26:09can switch in on the data label and the
- 4:26:11data label have all things like we can
- 4:26:13have title also along with the data
- 4:26:15label the values can be controlled we
- 4:26:17can have a different value basically in
- 4:26:19the label so I can have a different
- 4:26:21value of I'm not using gross here but I
- 4:26:24can use a gross in the value so the
- 4:26:28gross will get added in the label
- 4:26:30instead of net and then I can add a
- 4:26:32detail I can have another column in the
- 4:26:36detail it will start showing two values
- 4:26:39in this case we can have a complicated
- 4:26:41value display and then then again single
- 4:26:43line or multiple line I think in this
- 4:26:44case it's better to have multiple line
- 4:26:46because you have too much of information
- 4:26:48but again uh we have to control the
- 4:26:50density uh here because the line chart
- 4:26:52is too busy can duplicate
- 4:26:57this here let's go back to the
- 4:27:00visualization and make it
- 4:27:02as date
- 4:27:05hery and let's scoll down only one now
- 4:27:09this is the place where you can have you
- 4:27:11can play around much with the labels we
- 4:27:13have the gross value you have net value
- 4:27:15so we are displaying the net values then
- 4:27:17we can add the details in the details we
- 4:27:19can add
- 4:27:20the discount percentage value I'm adding
- 4:27:23a discount percentage also so I'm add
- 4:27:25adding these values and you can see
- 4:27:27these values
- 4:27:29here then we can have a background to
- 4:27:31these labels and now as you can see here
- 4:27:34when I see the margin the percentage
- 4:27:37seems better but not along with this one
- 4:27:39so let's go down and and we go to
- 4:27:41discount percentage p and we will say
- 4:27:42none so it will follow that format and
- 4:27:46if I go to the values again I can say
- 4:27:48none so it will follow the actual
- 4:27:51format this is net and discount net and
- 4:27:54margin this is net and discount
- 4:27:56percentage this is also net and discount
- 4:27:57percentage so the two labels are shown
- 4:28:01for both the serieses and if you want to
- 4:28:03control that in instead of each one you
- 4:28:05can choose one particular series for
- 4:28:07which you want to decide whether you
- 4:28:09want to have a title or not so like see
- 4:28:10I've added a title only for the below
- 4:28:13series now in the values do I want to
- 4:28:16have this net value or not and do I want
- 4:28:18to have details let's say I don't want
- 4:28:19to have details in the Net
- 4:28:21series I don't want to have background
- 4:28:24or I want to have background with a
- 4:28:25little bit different color in the Net
- 4:28:26series so that I can do I have a
- 4:28:28different color background or let me
- 4:28:30change it a little bit different so in
- 4:28:32this manner what's happening I can
- 4:28:34control the label of both the series
- 4:28:37separately and I can display different
- 4:28:39kind of information for each series now
- 4:28:42series labels if you want to switch it
- 4:28:44on so series label is something which is
- 4:28:46shown at the end of the line if you see
- 4:28:48here we have seeing margin and here we
- 4:28:50are seeing net now there is no line we
- 4:28:52have made the line width as zero that's
- 4:28:53why though the last value is appearing
- 4:28:55here so at the last value these series
- 4:28:57labels are shown now again you can
- 4:28:58control like you know what you wanted
- 4:29:00for the net value so you go to the net
- 4:29:03value what color you want and what do
- 4:29:06you want a background so I given a
- 4:29:07background on the net there is no
- 4:29:08background on the margin percentage
- 4:29:12so this is one thing basically when you
- 4:29:14have multiple lines at the end of the
- 4:29:16line you want it to show what the label
- 4:29:18of the line and you want toase the
- 4:29:20information
- 4:29:24there background again I have enabled
- 4:29:27and then you can change the transparency
- 4:29:29plot background area we have seen we can
- 4:29:30add the image here again reference lines
- 4:29:33there are multiple option now x-axis
- 4:29:36constant Line This Is Something xais
- 4:29:37constant line is going to appear when
- 4:29:39you have
- 4:29:40the number numbers or the dates and like
- 4:29:44on a particular date I wanted to have a
- 4:29:46line and I can add multiple such lines
- 4:29:49so this data is from 201819 so I can say
- 4:29:52Okay I want a March 1 March I wanted to
- 4:29:55have a line you can see there is a line
- 4:29:57on the 1 March I can get and then you
- 4:29:59want to have let's say one more line you
- 4:30:01can add one more line and now you can
- 4:30:03click and see this is my one line This
- 4:30:04is my another line here again I choose
- 4:30:07XX constant line then in the line I'll
- 4:30:10go ahead and give a value so
- 4:30:13I'll go to again 2019 let's say December
- 4:30:1731st I got another line so I can have
- 4:30:20these multiple kind of lines and then
- 4:30:22definitely color line font actually
- 4:30:24shaded area on so that particular line
- 4:30:28can have the area before that line is a
- 4:30:30shaded so what we can do is we go to the
- 4:30:33Shaded
- 4:30:34area and this is before or after I can
- 4:30:37do what I can do is I can make this
- 4:30:39color a little bit more transparent
- 4:30:42and now let me do one thing I click on
- 4:30:44this particular line the one before it
- 4:30:47now I again switch on the Shaded area
- 4:30:48now before and now you can see this is
- 4:30:51I'm able to differentiate between this
- 4:30:53area and this area just the way I have
- 4:30:56done the shading in this manner I'm able
- 4:30:58to loate and now what I can do is I can
- 4:31:00also change the color a little bit and I
- 4:31:03can increase the transparency also now
- 4:31:05you're able to see the two shaded areas
- 4:31:07so this can help us to give the Shaded
- 4:31:09area between the lines so you can
- 4:31:11utilize this this is especially useful
- 4:31:14when you are using the kind of visual
- 4:31:15where we have the x-axis constant line
- 4:31:18those which are on Dat date and those of
- 4:31:21which are on the number you should be
- 4:31:23able to get these now again you have the
- 4:31:25data label option here label is for the
- 4:31:27lines so you can have the so whenever
- 4:31:30these lines are there you can see there
- 4:31:32should be some data lab this is the data
- 4:31:33label the date which is appearing on
- 4:31:36which date actually it is there now
- 4:31:39right left above data Value Auto all
- 4:31:42these things are there so if I disable
- 4:31:44the data label you will see that now the
- 4:31:47line is not showing what date it is but
- 4:31:50I can have the data label
- 4:31:52enabled I can say right hand side have
- 4:31:55the one data label and this is for each
- 4:31:57line so I enabled for the one line and
- 4:31:59now I go back and enable the data label
- 4:32:01for another line for both the lines I
- 4:32:03have the data label then we have error
- 4:32:06bars we have already experimented with
- 4:32:07that if you want you can enable those
- 4:32:09error bars and then you have to choose
- 4:32:11up bound lower bound and all those and
- 4:32:14then finally you have find anomalies
- 4:32:17which is not enabled right now based on
- 4:32:19what our selections are we rename this
- 4:32:21as line one so these are the various
- 4:32:24stuff you can do with the line visual
- 4:32:26let's have a quick look at the area
- 4:32:28visual area visual is very similar to
- 4:32:30the line Visual and we have two kind of
- 4:32:33area visuals one is area chart like line
- 4:32:36visual with the Shaded and then we have
- 4:32:38a St DDI chart so let's explore these
- 4:32:40two so I'll click on area chart on the
- 4:32:44build a visual or I can click the same
- 4:32:47in the insert portion of the Home tab to
- 4:32:50get
- 4:32:52it I'll add brand from the item
- 4:32:58here and net major from the base
- 4:33:02majors and as you can see I got a chart
- 4:33:06where I have a shaded portion below
- 4:33:08again I can have multiple columns on
- 4:33:10x-axis I can have a secondary y- AIS I
- 4:33:14can have a legend and similar kind of
- 4:33:16limitations what we have seen on the
- 4:33:19line chart would apply also here so
- 4:33:21let's quickly see what happens when we
- 4:33:23put a legend when I put a legend here
- 4:33:25you will be able to see multiple line
- 4:33:27now usually when you create area visual
- 4:33:29with the date access then you will have
- 4:33:32continuous data even for categories and
- 4:33:34in such cases this visual will look much
- 4:33:37better because you will be able to see
- 4:33:40continuous lines for each categories now
- 4:33:43in this case because each brand does not
- 4:33:45hold every category you are seeing those
- 4:33:49discontinuous areas and it is not
- 4:33:52conveying the message you wanted to
- 4:33:54convey using this particular visual so
- 4:33:56in this case because not all brands have
- 4:33:59all the categories doesn't look so great
- 4:34:01we will take a example later now
- 4:34:03similarly I can also add a major on the
- 4:34:06secondary AIS and test it out so I go to
- 4:34:08drive measure and put margin percentage
- 4:34:10on the secondary AIS and now now you can
- 4:34:12see there are two area charts and one of
- 4:34:15them is appearing on the secondary
- 4:34:17axis I can also go ahead and enhance my
- 4:34:21x-axis by adding another category now
- 4:34:24moment I add the category the default
- 4:34:26option is concate label off which we
- 4:34:29have seen in the line visual also and
- 4:34:32sort ascending but we can go ahead and
- 4:34:36change the setting if
- 4:34:39required if you don't want this expanded
- 4:34:41we can actually use the drill up button
- 4:34:44and
- 4:34:46can go up to the hery we'll see only
- 4:34:50brand then we can either do drill down
- 4:34:53we can go to the next level by looking
- 4:34:54at category or we can have expanded mode
- 4:34:57like we got
- 4:34:59initially now I'm going to open the
- 4:35:02format pane on the the right hand side
- 4:35:04pane because of my settings I'm able to
- 4:35:06see format pain here and we can go ahead
- 4:35:10and look at what all options are
- 4:35:11available here size and style are the
- 4:35:14common options which we have padding of
- 4:35:16the visual uh inside this one how much
- 4:35:20we want like from top and bottom we want
- 4:35:22to reduce something we have background
- 4:35:25if you want a background I we can switch
- 4:35:27it off if there is transparency which we
- 4:35:30need which is 100% if you don't have
- 4:35:31background it will also act like a
- 4:35:33transparent one visual Border in case we
- 4:35:36need the Border shadow in case we need
- 4:35:38Shadow these options we have explored in
- 4:35:40other visual same as other visuals we
- 4:35:43have title again you can use a measure
- 4:35:45inside the title you can set headings
- 4:35:47font you can also have a subtitle you
- 4:35:51can use the divider to have a line
- 4:35:53between the title subtitle and the
- 4:35:56visual and you can change the spacing
- 4:35:59between the line and the label and you
- 4:36:02can customize spacing if required xais
- 4:36:05on x-axis you can disable the values if
- 4:36:08you want like I don't know to say
- 4:36:10whatever it is you can have visual like
- 4:36:12that you can enable that then you can
- 4:36:14only disable the x-axis title which is
- 4:36:16category is only missing if you pay
- 4:36:18attention here I'll enable it
- 4:36:21again same way for y-axis you have
- 4:36:25options like minim and Max where you can
- 4:36:27use measures because FX button is there
- 4:36:29you can give static values you can make
- 4:36:31it as a logarithmic scale if your values
- 4:36:33have too much of difference usually we
- 4:36:35use logarithmic scales let say one value
- 4:36:38is pretty large and another are pretty
- 4:36:40small then in such is logarithmic scale
- 4:36:42and give us a better fit visual which
- 4:36:45will be able to showcase the smaller
- 4:36:47values little bit larger because of
- 4:36:49logarithmic scale we can invert the AIS
- 4:36:51the smaller values on the top the larger
- 4:36:53value
- 4:36:54down then we have
- 4:36:56values which we can hide on the y axis
- 4:36:59if you can see now there is no values
- 4:37:01which is up here near to the net there's
- 4:37:03no values here again we have option for
- 4:37:07font color which we can
- 4:37:09change again color
- 4:37:12of the values can be based on a measure
- 4:37:15title if you want to disable the title
- 4:37:17you don't want to show the title you can
- 4:37:18do that secondary AIS if we have
- 4:37:20secondary AIS we can set up the
- 4:37:22properties for that if you're using
- 4:37:24Legend what position you want the legend
- 4:37:27then text of the legend you can have
- 4:37:29font title of the legend you can enable
- 4:37:31disable smart M multiple we'll try in
- 4:37:34little bit later grid lines in case you
- 4:37:37need grid lines you horizontal grid
- 4:37:39lines is enabled but if I vertical grid
- 4:37:41line again I have to make them little
- 4:37:43bit larger for you to
- 4:37:46see this is vertical grid line
- 4:37:50for the access have zoom slider which we
- 4:37:53have already explained in other visuals
- 4:37:55but we can have a zoom slider and once
- 4:37:58you have the zoom slider you will be
- 4:37:59able to zoom the
- 4:38:05values then we have line option again
- 4:38:07area chart is definitely an extension of
- 4:38:10line chart with the shade
- 4:38:11but you can go ahead and play with the
- 4:38:13Shaded area at transparency here as you
- 4:38:15can see I'm using margin and net again
- 4:38:18just like line visual I am not having
- 4:38:20any option to conditional format
- 4:38:23it and then again stroke which is
- 4:38:25something which you can play around you
- 4:38:27can make it zero so there would be no
- 4:38:29line in that case I have done it for
- 4:38:31both and then transparency you can
- 4:38:34increase or decrease or you can go ahead
- 4:38:37and choose individual line let's say if
- 4:38:40I choose net and and for net I can have
- 4:38:42line there is no shaded area option for
- 4:38:45individual it means the Shaded area
- 4:38:47transparency can only be handled at the
- 4:38:51all level not at the individual series
- 4:38:53level then we have markers just like
- 4:38:55line visual we can enable the markers
- 4:38:56we'll get dots in the above one as you
- 4:38:58can see we don't have the line but we
- 4:39:00still have the dots then we have the
- 4:39:03size of the dot which we can increase or
- 4:39:05decrease then color if we want to change
- 4:39:08the color from the default one data
- 4:39:10labels if you want to enable the data
- 4:39:12label this chart is having too many
- 4:39:14values it is looking busy so you can say
- 4:39:16okay I don't need it for all the cies
- 4:39:18you can disable it for one of the series
- 4:39:20position you can decide Auto above under
- 4:39:23then you have the leader lines we have
- 4:39:26concept of leader lines which we will
- 4:39:27explain you a little bit
- 4:39:29later under the data label we can enable
- 4:39:32or disable data label by margin so let's
- 4:39:34say for net I can disable the data label
- 4:39:37I for margin I can continue to have the
- 4:39:39data labels and there's some is really
- 4:39:41interesting that is leader lines so I
- 4:39:44can enable that to see those leader
- 4:39:46lines you have to at least give 25 to 30
- 4:39:48as a minimum offset then you will will
- 4:39:51get a noticeable lines so as you can see
- 4:39:54I have set the value at 35 and now I can
- 4:39:57see these lines and as you can see these
- 4:39:59lines move your values little bit up in
- 4:40:02case of the label and that's allows you
- 4:40:05to see these values in a much better way
- 4:40:09this feature actually creates a visual
- 4:40:11connection between the each data point
- 4:40:14and its corresponding labels and because
- 4:40:17of this feature you will have better
- 4:40:18experience as you can see values little
- 4:40:20bit away and then there is a connection
- 4:40:22you can have the values under and above
- 4:40:24as you want like if it is under then the
- 4:40:27leader lines will go down and if it is
- 4:40:29above the leader lines will go on the
- 4:40:32upside in case you want title on the
- 4:40:34label you can have title but in this
- 4:40:36case because I have too many values it's
- 4:40:38look busy but these are some of the new
- 4:40:40enhancement which has come where we can
- 4:40:42have title where we can have value and
- 4:40:46values could be a major
- 4:40:48driven Valu so though it is margin but
- 4:40:51actually I can go ahead and put discount
- 4:40:54percentage I'll start seeing discount
- 4:40:55percentage so these what we are called
- 4:40:57the major driven label then we have
- 4:41:00details if you want to add details you
- 4:41:02can add another major let's say I now
- 4:41:04along with margin I want to add discount
- 4:41:06I can add it and then I have formatting
- 4:41:09option transparency and all that and in
- 4:41:11the layout we can want to show them in
- 4:41:14single line or multiple line all those I
- 4:41:16can
- 4:41:16decide so right now I'll remove the
- 4:41:19details we don't need it for this
- 4:41:21particular visual similarly you have
- 4:41:23series label if we can enable the series
- 4:41:26label and as you can see the series
- 4:41:27labels are available at the end if you
- 4:41:30want you can disable particular series
- 4:41:32label let's say I want to disable net
- 4:41:34and as you notice now that there is no
- 4:41:37label for net there is only label for
- 4:41:39margin percentage you can can play
- 4:41:41around with the values you can play
- 4:41:43around with the background if needed
- 4:41:45then we have the plot area background
- 4:41:46where we can have image if needed and
- 4:41:49the reference lines as we have added in
- 4:41:51other visuals we can also have reference
- 4:41:52line here and those reference line could
- 4:41:55be of y-axis constant line Main Line MAX
- 4:41:58Line average line median line percentage
- 4:42:00line these lines keep on changing based
- 4:42:02on the visual you are using I've named
- 4:42:04it as area quickly create a stagged area
- 4:42:07visual I click on a new page and here
- 4:42:10I'll add this tagged area in this tagged
- 4:42:12area again there are two ways to create
- 4:42:14either I could have x-axis and legend or
- 4:42:17I can have multiple measures so let's
- 4:42:19say I wanted to have X brand on the
- 4:42:23x-axis and then I can have
- 4:42:27net on the y axis and along with I can
- 4:42:29have let's say
- 4:42:32margin let's say create an equalent of
- 4:42:35gross or in case I don't want it to have
- 4:42:39the double I can use Legend also to have
- 4:42:43this Ted area this will not look great
- 4:42:44again for this purpose I need to have
- 4:42:47something like date here for looking
- 4:42:49really good so let me go to the sales
- 4:42:51and let me bring in sales date here and
- 4:42:54once you have the trend you can see that
- 4:42:56it looks much better and let me remove
- 4:42:58and make it only a year quarter as you
- 4:43:00can see now it looks much better area
- 4:43:03visual again we have the similar kind of
- 4:43:05format properties which we can play
- 4:43:08around because I'm using the date Fe
- 4:43:11field I am getting the access as
- 4:43:12continuous option I can also choose for
- 4:43:14a categorical option where I get the
- 4:43:17categorical values I can change add
- 4:43:19remove titles on the y axis I can play
- 4:43:22around with the range I can in the text
- 4:43:25font title same way I can play around
- 4:43:28with Legends and red lines Etc same
- 4:43:31options are available for this visual
- 4:43:32also again because I'm using Legend you
- 4:43:35don't see any conditional formatting
- 4:43:36option anyway we don't have any
- 4:43:39conditional formatting option in the
- 4:43:40area visual
- 4:43:41later when we go to the conditional
- 4:43:43formatting I'll also let you know how
- 4:43:45can you color dots in case of line and
- 4:43:47area
- 4:43:48visuals and if there is a shade
- 4:43:50transparency you want to control you can
- 4:43:52do that we can little bit control it
- 4:43:54like this or little bit lighter you can
- 4:43:58increase the transparency or you can
- 4:44:00decrease the transparency manner you can
- 4:44:02create area and stacked area visuals or
- 4:44:09charts now let's discuss scatter visual
- 4:44:13in the scatter visual what we are going
- 4:44:15to do is we are going to discuss the
- 4:44:16scatter visual right now when we go to
- 4:44:19conditional formatting we will learn
- 4:44:20about the quadrant part of it and also
- 4:44:24regarding the markers what we are going
- 4:44:26to do is marker properties we have a
- 4:44:28separate video on marker properties
- 4:44:31there we are going to explore marker
- 4:44:32properties in detail so I'm going to add
- 4:44:35a new page and on that new page I will
- 4:44:39add this scatter visual scatter visual
- 4:44:41is available here in the middle click on
- 4:44:44that now scatter visual have many types
- 4:44:47the best way to create a scatter visual
- 4:44:49is having both x-axis and y axis as a
- 4:44:52measure but there's a possibility of
- 4:44:54having a scatter visual without having a
- 4:44:58measure on XA so let me first give you
- 4:45:01that example so I will take brand from
- 4:45:04item I put that on xaxis and then I take
- 4:45:07a measure let's say margin percentage
- 4:45:09and I put on y- axis this kind of become
- 4:45:11a DOT chart in line chart if you only
- 4:45:14have the markers and you don't have a
- 4:45:17line you will get something like that
- 4:45:20another Advantage which we will get over
- 4:45:22the line marker here is I can go ahead
- 4:45:24and have here a size for that what I can
- 4:45:27do here is I can put gross on the size
- 4:45:30so you can have smaller and larger
- 4:45:32bubbles so this is one way you can
- 4:45:35create it then I have play AIS tool tips
- 4:45:39now play acces might not applicable for
- 4:45:41the current scenario what we are going
- 4:45:43to do here before we move forward and
- 4:45:46move to the scenario where we have both
- 4:45:47xaxis and y axis on the major let's move
- 4:45:53them
- 4:45:53around now we have a CER visual on brand
- 4:45:57and margin percentage can we swep can we
- 4:45:59have brand also on Y axis so let's try
- 4:46:02that out let me remove the brand from
- 4:46:03the x-axis and margin from the Y AIS and
- 4:46:07let me see if I can have brand on the y-
- 4:46:10axis no I'm not able to have it so it
- 4:46:12means the possibility of me having a
- 4:46:15brand on the y- axis is not there let me
- 4:46:17remove the size again and try so brand
- 4:46:21on the Y AIS so that's not possible I'm
- 4:46:24not able to do now what I'm going to do
- 4:46:25is the next thing which I wanted to play
- 4:46:27around is having x-axis as a major let's
- 4:46:30say discount percentage Y axis as a
- 4:46:32major and that is margin percentage so
- 4:46:35we have the majors now major cannot give
- 4:46:38me a a dotted chart for that I need it's
- 4:46:41definitely something which gives me
- 4:46:43those series for series I can drag in
- 4:46:46City out here City on the values if I
- 4:46:49drag you will be able to see the dots
- 4:46:51again for size I can drag in Gross here
- 4:46:54onto the size and for size we have the
- 4:46:56format where we can you know play around
- 4:46:59and you know make the size smaller or
- 4:47:02larger so marker is that for that and
- 4:47:05usually when you have these kind of
- 4:47:07stuff I have find out that minus 27 28
- 4:47:10or - 30 is a little better suitable size
- 4:47:13so let me go to- 27 so now this is a
- 4:47:16little better size in terms of what we
- 4:47:18want it to have and then we have
- 4:47:20different kind of shapes which we can
- 4:47:21take in the marker so marker can control
- 4:47:24this size and the bubble and we can have
- 4:47:26different kind of bubbles also now do we
- 4:47:28want it for all categories or single
- 4:47:30category that also we can play around so
- 4:47:33that is with the size now you can also
- 4:47:36have the conditional formatting done on
- 4:47:39these Bubbles and for that you have the
- 4:47:42option available under markers only if
- 4:47:45you go to the marker color you can see
- 4:47:47the f sign here it means I can use a
- 4:47:49measure out here that we'll explore
- 4:47:51little later in the conditional
- 4:47:53formatting I can have a legend and once
- 4:47:55I have a legend then I will not be able
- 4:47:58to change the color of the marker using
- 4:48:01conditional formatting so let's say if I
- 4:48:03want to have a category as my
- 4:48:07Legend you can see for each category I
- 4:48:09have color but inside the color of the
- 4:48:12marker now you don't have any option to
- 4:48:15change the marker color dynamically
- 4:48:17using the conditional formatting but it
- 4:48:20allows you to have the both city as well
- 4:48:23as the category in one particular Visual
- 4:48:26and have the data at the city category
- 4:48:28level or you can have City Brand level
- 4:48:31State Brand level at that level you can
- 4:48:32have data so you can add more detail by
- 4:48:35using legend or you can also do let's
- 4:48:37say we drag the category inside the
- 4:48:40values
- 4:48:41only so I dragged it and then we can
- 4:48:44expand it the moment you have more than
- 4:48:47one value in the values again the same
- 4:48:49way you will get the expand option as
- 4:48:52you were getting previously in case of
- 4:48:54bar visual Pi visual or L visual so here
- 4:48:58expand is a better option for us we can
- 4:49:00definitely go to the next level or we
- 4:49:02can go do the drill down but let's go
- 4:49:05and expand this now you are seeing the
- 4:49:08city and category but is still the FX
- 4:49:11option is available as you can see the
- 4:49:14color of the marker is still available
- 4:49:17now with the FX option means I can do
- 4:49:19the conditional formatting I will be
- 4:49:22able to change these bubbles using the
- 4:49:25conditional formatting logic so that
- 4:49:27give me little flexibility to have more
- 4:49:30than one granularity and then I can use
- 4:49:32the color these are some of the play
- 4:49:35arounds you can do with the scatter
- 4:49:36visual now to take this neck forward
- 4:49:40let's see can we add a play access most
- 4:49:43suitable play access is basically a Time
- 4:49:46range but right now we don't have date
- 4:49:48table so but we would still like to see
- 4:49:51if we can put State on the play Axis I'm
- 4:49:54able to put that and let me play around
- 4:49:56so for each state now you can see that
- 4:49:59I'm able to see the data and you can do
- 4:50:02the same with the time ranges month here
- 4:50:05dates and everything and it will play
- 4:50:07for all the values one by one so I don't
- 4:50:09have to do anything I just to play we
- 4:50:12have created the visual we have seen how
- 4:50:15to add the play AIS now let's remove the
- 4:50:18play
- 4:50:20acces also remove the category just keep
- 4:50:23it on the city and let's start exploring
- 4:50:26the visual properties so we have size
- 4:50:28and style basically it is dependent on
- 4:50:30what size we have what location we have
- 4:50:33based on that this can be changed this
- 4:50:35is just the positioning which we have
- 4:50:37then the padding basically the space on
- 4:50:39the all four side s es background right
- 4:50:43now we have background on if you have a
- 4:50:45background off it will take the color
- 4:50:47from the background of the canvas right
- 4:50:50now when I when it is on it means the
- 4:50:53visual can have its own color and you
- 4:50:56have to reduce the transparency to see
- 4:50:58that color as you can see if I'm
- 4:51:00reducing the transparency I am able to
- 4:51:02see the color I can have the 100%
- 4:51:05transparency or I can switch it off even
- 4:51:08if I don't want to have along with the
- 4:51:10transparency
- 4:51:11then I have the visual Border in case I
- 4:51:12need a border for the visual so if you
- 4:51:15click outside the visual you will be
- 4:51:17able to see the border and then for
- 4:51:20Border you can have the rounded Corners
- 4:51:23if you want and you can have width if
- 4:51:25you want to increase the width of the
- 4:51:26Border I actually don't need a border so
- 4:51:28I'm going to switch it off then you have
- 4:51:31title as usual for every visual you can
- 4:51:33have a title the title can also come
- 4:51:35from a major so if needed we can have a
- 4:51:37from Major the headings from nor noral
- 4:51:40heading two heading six we can have any
- 4:51:43headings we can decide the font and the
- 4:51:46font size Bard italic and underlying for
- 4:51:49our titles we can decide the text color
- 4:51:52of our title let's say other than black
- 4:51:54if I want to have some other color I can
- 4:51:56have that I can have the background
- 4:51:58color also for the title means only
- 4:52:00title will have its own background color
- 4:52:02as you can see then we can align the T
- 4:52:05title left Center or right depending on
- 4:52:08the need and if the title is too long we
- 4:52:11can also use the word rep property by
- 4:52:13default it is on we'll keep it on we
- 4:52:15have seen this subtitle property now you
- 4:52:17can have a subtitle other than title the
- 4:52:20moment you enable it it create an
- 4:52:22additional row where you can have the
- 4:52:24subtitle you can have a text or you can
- 4:52:26use the FX function FX it means you can
- 4:52:29have the subtitle based on a measure you
- 4:52:33can have the heading normal H1 H2 H3 H4
- 4:52:36then you can have a heading two adding
- 4:52:38three heading four whatever heading you
- 4:52:39want on font size bold italic underline
- 4:52:43you can change the text color again
- 4:52:45alignment left center right or rap text
- 4:52:49I don't need a subtitle so I'm going to
- 4:52:51disable that then we have a divider
- 4:52:53divider if you remember is going to come
- 4:52:56between the title subtitle and the
- 4:52:58visual so title subtitle is one party
- 4:53:01and the visual is one party then we can
- 4:53:03have a color we can have the style and
- 4:53:05then we we can increase the width of the
- 4:53:07line so that we can see the divider
- 4:53:09between the Visual and the headers I'm
- 4:53:12reducing it now again I'm also going to
- 4:53:14remove the divider then x-axis
- 4:53:17properties because we going to use major
- 4:53:20so you can have minimum and maximum
- 4:53:21range you can have logarithmic scale you
- 4:53:24can invert the scale if you need inward
- 4:53:27scale means the numbers will come from
- 4:53:30bigger to smaller so if you can see now
- 4:53:3226% is before and then 24 then 22 and
- 4:53:36then 20 if I revert it it will start
- 4:53:39from 20 to 26 so that is possible here
- 4:53:43this is xaxis then we have the xaxis
- 4:53:45values where you can go on the font
- 4:53:48color now the color can again come from
- 4:53:50based on the conditional formatting we
- 4:53:52can bring in but we have to remember
- 4:53:54sometime the x-axis labels only work on
- 4:53:58grand total so we do have to check that
- 4:54:00out and then display is auto we can
- 4:54:02change the display as per me value
- 4:54:04decimal places because it is a major we
- 4:54:07can have value decimal places so blank
- 4:54:09values is off but if we need it we can
- 4:54:11add it title xais title if you want to
- 4:54:14disable x-axis title you will not see
- 4:54:16discount if I enable it you will be able
- 4:54:18to see discount so the play around is
- 4:54:20here for the
- 4:54:23title the discount is going and coming
- 4:54:26back same way Y axis again Y axis is a
- 4:54:29numeric axis so you have the minimum and
- 4:54:32maximum for the range logarithmic scale
- 4:54:34invert AIS again this AIS can also be
- 4:54:37inverted and this is going to be useful
- 4:54:39sometime when we specifically create the
- 4:54:42quadrant it could be really helpful when
- 4:54:44we actually want high and low to be on a
- 4:54:47particular quadrant then it could be of
- 4:54:49real help so margin as you can see now
- 4:54:52the scale is inverted we have from
- 4:54:55smaller to larger on the scale in a
- 4:54:57reverse manner same way we can play
- 4:55:00around with the value font font size
- 4:55:03bold italic underline we can use the
- 4:55:06function to color means we can use
- 4:55:08conditional formatting then we have have
- 4:55:10the value decimal place because it's a
- 4:55:12number then we have switch AIS position
- 4:55:15means we want primary AIS which is right
- 4:55:18now on the first y-axis margin is there
- 4:55:20I switch it now it is on the second
- 4:55:22y-axis you can see it on the right hand
- 4:55:24side back on the left hand side show
- 4:55:27blank values in case you want to show
- 4:55:29the blank values title again the title
- 4:55:32margin percentage you can observe it is
- 4:55:34written but if I disable it it is not
- 4:55:36there again enable it is there same way
- 4:55:39we can if you need it we can have grid
- 4:55:41lines right now horizontal grid lines
- 4:55:43are they are they're pretty light right
- 4:55:46now if we want we can increase its width
- 4:55:49and it will be made visible as you can
- 4:55:52see now but I'm not very found of that
- 4:55:55so I'm going to reduce it vertical is on
- 4:55:58again we need to increase the width to
- 4:56:00see them again not very intuitive in
- 4:56:04this case so I'm going to reduce it
- 4:56:06again so these are the properties of
- 4:56:08basically AES now let's move to the zoom
- 4:56:11slider Zoom slider will actually give
- 4:56:13the sliders on the axis you can have
- 4:56:15x-axis slider and y axis slider and then
- 4:56:18you can you know scroll them to get the
- 4:56:20values this is really helpful when you
- 4:56:23wanted to have the sliders then if you
- 4:56:26want to have the slider labels and Tool
- 4:56:27tip you can also have that we have
- 4:56:29played around with that in the past
- 4:56:31markers we have seen basic marker
- 4:56:33properties we have seen the marker type
- 4:56:36I can change it to different type of
- 4:56:38markers
- 4:56:40then we have uh range scaling Auto
- 4:56:44magnitude data range we can say Based on
- 4:56:47data range so you can see that you know
- 4:56:49the dots are little up from lower to
- 4:56:51higher that is more suitable actually
- 4:56:54compared to any other thing color by
- 4:56:56category on or off so that is marker
- 4:56:59property which has came new we'll
- 4:57:00discuss a little later then border for
- 4:57:02marker has also came we'll discuss that
- 4:57:04later now category labels is something
- 4:57:06which is label if you want to display
- 4:57:08basically the value labels and now we
- 4:57:10have city so we are seeing City label
- 4:57:12now when we have City category let's say
- 4:57:14what happened when we have the city
- 4:57:16category and we expand it what would
- 4:57:18happen there now you can see City and
- 4:57:20category label coming together we need
- 4:57:22to be very selective in case we wanted
- 4:57:24to enable the category label
- 4:57:26specifically on scatter visual which is
- 4:57:29having lot of values it may not be the
- 4:57:31best thing to have then you can have the
- 4:57:34category label can have background so
- 4:57:35that they look little different and once
- 4:57:38you have the background then you can
- 4:57:39have background color transparency Etc
- 4:57:42then you have the plot area background
- 4:57:45if you want to put an image you can do
- 4:57:47that then you have reference line and
- 4:57:49this is really important because that is
- 4:57:51where we want to create the quadrants
- 4:57:53here before I do that let me go ahead
- 4:57:55and disable the category labels
- 4:57:57quadrants basically we can create by
- 4:58:00using the average lines but I'll tell
- 4:58:03you the average lines are not most
- 4:58:05suitable so let me go ahead and add an
- 4:58:06average line and as you can see this
- 4:58:09average line comes in Middle but the
- 4:58:10best most most suitable would be the
- 4:58:13constant line and use the same measure
- 4:58:15but right now I added the average line
- 4:58:17and the series is discount percentage
- 4:58:19let me add one more average line and
- 4:58:22then this line is also going to be the
- 4:58:24average line and for this one let me
- 4:58:26choose the series as margin percentage
- 4:58:29as you can see both these serieses are
- 4:58:32available here but if you use the
- 4:58:34constant line you will find out the
- 4:58:36difference of to do that let's go ahead
- 4:58:38and do one thing let's remove the second
- 4:58:41average line and then keep for the first
- 4:58:43one on the discount and on the line is
- 4:58:45fine let's enable the data label for
- 4:58:48this line so we have option for data
- 4:58:50label so I got this data label and let
- 4:58:53me add one more line and this time I'm
- 4:58:56going to add a constant line so I select
- 4:58:59the second line I'll go here on the type
- 4:59:02and I'll select the x-axis constant line
- 4:59:04because it's on the ACC by default it
- 4:59:07will come on zero so I'll go to the line
- 4:59:09which is on
- 4:59:10values which is zero I'll go to the FX I
- 4:59:12don't want a constant line but this
- 4:59:14gives me an option to use conditional
- 4:59:16formatting UI which actually is the
- 4:59:20major selection UI for me and here I
- 4:59:22select discount percentage by default
- 4:59:25one major would be available for you to
- 4:59:27selection and usually it is the x-axis
- 4:59:29major or the major which you are going
- 4:59:31to select for first time so I've
- 4:59:33selected that line and constant line
- 4:59:36don't work together that's what my
- 4:59:37observation is so what I'm going to do
- 4:59:39here is I'll go to this average line now
- 4:59:42remember the value
- 4:59:4413.11 and I'll go to the constant line
- 4:59:47and let me enable the value first of all
- 4:59:49the data label we will see that value
- 4:59:51but this is right now not working even
- 4:59:53using FX I'm going to go ahead and
- 4:59:55delete this average line and the moment
- 4:59:58I deleted you are able to see the
- 4:59:59constant line using the mejor which is
- 5:00:01actually the correct average that's not
- 5:00:03the simple average in this manner I
- 5:00:05usually prefer this constant line let me
- 5:00:09keep this and then we have the
- 5:00:11properties like FX value the color so if
- 5:00:15you go to the reference line you have
- 5:00:17the constant lines then you have min max
- 5:00:20average median and percentile line which
- 5:00:22is most of them want to decide their
- 5:00:24values by themselves you don't have any
- 5:00:26intervention in between in constant line
- 5:00:28you have the flexibility to provide the
- 5:00:30measure then you can decide the color
- 5:00:33right now I am having a color which is
- 5:00:34matching with my marker color so I can
- 5:00:37change it transparency dashed line style
- 5:00:40is dashed solid dotted or custom I can
- 5:00:43have let's say custom then we can decide
- 5:00:46what kind of line we want then we have
- 5:00:48the width width of the line right now is
- 5:00:50solid and you can see width is three
- 5:00:52that's good enough positioning in front
- 5:00:55or back means is it should be in the
- 5:00:57front of your markers or back side of
- 5:01:00your marker that you can do data label
- 5:01:02we have already seen we have enabled it
- 5:01:05now the data label could be on the left
- 5:01:06hand side or right hand side vertical
- 5:01:09position is about or under so we have we
- 5:01:12have the horizontal position left and
- 5:01:14right and we have vertical position
- 5:01:16which is above and under depending on
- 5:01:17the need so if we put under here it will
- 5:01:19go through the down and the same things
- 5:01:22will look a little differently when we
- 5:01:23have the y axis constant line the styl
- 5:01:26is data value by name you want the name
- 5:01:29and both if I want name as well as value
- 5:01:33then display unit is auto I can change
- 5:01:35the display unit here so these are the
- 5:01:37various values around the reference
- 5:01:39lines and that is really important here
- 5:01:41now then we have the symmetrical shading
- 5:01:43if you want you can switch it on and you
- 5:01:45will have the symmetrical shading upper
- 5:01:47portion Shing lower portion heading
- 5:01:49upper shading lower shading or depends
- 5:01:52on the visual the it may have some part
- 5:01:54because in my visual right now the
- 5:01:56symmetric is coming this place the
- 5:01:58reason is both of them are not starting
- 5:02:00from zero if they start from the zero
- 5:02:02this will make sense but most of my data
- 5:02:05is in the middle starting around 20% so
- 5:02:08that is why this is not the and this
- 5:02:10maybe because I'm taking the data at
- 5:02:12City level if I take a little different
- 5:02:13level it may be a different case I'll
- 5:02:16switch off the symmetric shading right
- 5:02:18now then I have a ratio line I can
- 5:02:20switch it on you can see a ratio line
- 5:02:23now you want you can have a color
- 5:02:26transparency style width Etc to that so
- 5:02:30this is overall just a brief overview of
- 5:02:34scatter Visual and how you can design a
- 5:02:37scatter visual there are play arounds
- 5:02:39with the you know quadrant colors and
- 5:02:41all those that we are going to discuss
- 5:02:43in conditional
- 5:02:44form markers has been enhanced in
- 5:02:47October
- 5:02:482024 so let's have a look at what marker
- 5:02:52announcement has been
- 5:02:53done in this part we are going to
- 5:02:56discuss the marker enhancement which has
- 5:02:58been specifically done around the line
- 5:03:01Visual and the scatter visual Microsoft
- 5:03:04powerbi has done lot of enhancement in
- 5:03:06the visualization and some of those
- 5:03:08enhancements we have not discussed so
- 5:03:10far so what I'm going to do in today's
- 5:03:13video I'm going to take you through one
- 5:03:14of such enhancements on the markers in
- 5:03:17October 2024 so let's look at the
- 5:03:19release notes of October 2024 so this is
- 5:03:23October 2024 feature summary and if you
- 5:03:26scroll down here inside the content you
- 5:03:29will find out marker enhancements so let
- 5:03:33me click on the marker enhancements to
- 5:03:35go down and look into the details so
- 5:03:38let's look at the release notes in
- 5:03:39details marker enhancements reamping the
- 5:03:43rendering of column bars ribbons line
- 5:03:46area charts and marker is a top priority
- 5:03:50these element form the foundation of our
- 5:03:52core Visual and will eventually impact
- 5:03:55other areas by provisioning more control
- 5:03:57our report creators can enhance their
- 5:03:59storytelling and help users easily to
- 5:04:02interpret data in October 2024 update
- 5:04:05markers for line chart C chart and
- 5:04:08anomalies are Improv improved with this
- 5:04:10revamp this update introduced new
- 5:04:12options that offer greater customization
- 5:04:14and flexibility explore these new
- 5:04:17options and maximize their potential
- 5:04:19marker for line and cluster chart can be
- 5:04:21customized now in two ways categories me
- 5:04:24each and individual category like you
- 5:04:26have gen Fab Mar or brand one brand two
- 5:04:28brand three when you have only single
- 5:04:30series or basically you only have xaes
- 5:04:33let's say when your chart has no series
- 5:04:36The drop- down menu displays category
- 5:04:38you can customize each data points
- 5:04:40marker based on the selected x-axis
- 5:04:42category you only have the categories
- 5:04:45you don't have the legend or multiple
- 5:04:47majors in that scenario now series when
- 5:04:50the chart displays Legend the drop down
- 5:04:52menu displays the series The Legend
- 5:04:54series you can customize the marker for
- 5:04:56the complete set of data points within
- 5:04:59the selected C overall you can change
- 5:05:01there you can hide and show the marker
- 5:05:03for a specific data point category by
- 5:05:05toggling show for this category option
- 5:05:08please note the marker toggle has been
- 5:05:10moved under show for all series new
- 5:05:14format settings have been added to the
- 5:05:15marker for each line T catter chart and
- 5:05:18anomalies including shape shape of the
- 5:05:22marker continue to offer control over
- 5:05:24their type size additionally rotation is
- 5:05:27now available for all shapes and size
- 5:05:30except for the circle shape rotation
- 5:05:32shapes as the variety of shape type at
- 5:05:34your disposal which is particularly
- 5:05:36convenient when multiple lies are
- 5:05:38required unique shape
- 5:05:40color changing the color of the marker
- 5:05:42has been a convenient control now you
- 5:05:44can also modify the transparency of the
- 5:05:47marker for a specific category series or
- 5:05:49all markers border this is the new
- 5:05:51feature border for the marker has been
- 5:05:53introduced allowing you to add borders
- 5:05:56to specific marker category series for
- 5:05:58all markers Additionally you can fully
- 5:06:00customize the marker borders by
- 5:06:02adjusting their transparency and the
- 5:06:03width so these are the features which
- 5:06:05has been released some time back first
- 5:06:08of all let's look into the detail is
- 5:06:09what we are going to learn today so we
- 5:06:11will learn how to enable the marker how
- 5:06:14to do changes at categories or series
- 5:06:16level how to change color size and
- 5:06:19transparency of the marker how to change
- 5:06:21color size of transparency of the marker
- 5:06:23B and this can be done both at the
- 5:06:25series level or categorical level for
- 5:06:27both marker and marker border so that we
- 5:06:29are going to understand today in details
- 5:06:32so let's jump onto the powerbi and
- 5:06:34explore that out so I'm here on the
- 5:06:37powerbi desktop and I would like to add
- 5:06:39a new page to start exploring the
- 5:06:42markers so on this new page first of all
- 5:06:45I would like to add a line visual so
- 5:06:48item wise net so this is the visual I've
- 5:06:52created item wise net and let me enable
- 5:06:54the format if your format is not visible
- 5:06:57you can go to the view from there you
- 5:06:59can enable it after that on the if it is
- 5:07:02still not available here check out the
- 5:07:04rightmost side is it disabled from there
- 5:07:06or it has been minimized from there
- 5:07:09these are the places where you are to
- 5:07:11look
- 5:07:13for now once I go inside right now I
- 5:07:16have a single measure I have only one
- 5:07:19series I go down to the marker and here
- 5:07:22you can see that I have option for
- 5:07:24categories I can choose individual
- 5:07:25category or show for all categories let
- 5:07:27me enable show for all categories now I
- 5:07:29can choose the shape so let me choose a
- 5:07:31little different shape let me choose a
- 5:07:33triangular now I can increase the size I
- 5:07:36can change the rotation let me rotate it
- 5:07:38by 90° 92 let me write down 90 so I
- 5:07:43rotated it by 90 color I can change the
- 5:07:45color right now it's very similar to
- 5:07:47what I have on the line I change the
- 5:07:48color then I can go to the Border Swit
- 5:07:51on the border now you can see a small
- 5:07:52line uh match with the series color will
- 5:07:55start matching with the series color
- 5:07:57uncheck this and go ahead and change it
- 5:07:59manually so let's say something like
- 5:08:01this now transparency first of all let
- 5:08:04me increase the WID so that you can
- 5:08:05understand transparency
- 5:08:07later I think five point is good enough
- 5:08:09now look at the transparency when I
- 5:08:11decrease it you can see the transparency
- 5:08:14and I can completely wipe it off so
- 5:08:15there will be no bottle one way to hide
- 5:08:17is you completely make it transparent so
- 5:08:20it will go away so now what I have done
- 5:08:21here is I have done the transparency on
- 5:08:23the shape and zero transparency on the
- 5:08:25border so you are seeing like empty
- 5:08:27markers so this is one another way you
- 5:08:28can get like empty markers where you
- 5:08:30have no color inside or you have the
- 5:08:33transparency which is 100% for the
- 5:08:35inside this is for the overall category
- 5:08:38or overall the complete x-axis series
- 5:08:41but I can go to individual and I can
- 5:08:43check it let's say brand8 I can go and
- 5:08:44change it so right now it is showing the
- 5:08:46same properties but what I can do here
- 5:08:48is I can let's say choose a different
- 5:08:49marker there so instead of triangle let
- 5:08:51me choose a circle so you can see now
- 5:08:53there is one Circle which is available
- 5:08:55it is an empty circle because I have
- 5:08:57100% transparency at the marker level I
- 5:08:59can reduce it now only this point is
- 5:09:03having color because the transparency is
- 5:09:05not there so individually I'm
- 5:09:08controlling one particular category in
- 5:09:10this manner I can do this action let's
- 5:09:13see what happens in case we add another
- 5:09:15measure so let me add a gross measure
- 5:09:17now so this is a net measure now I add a
- 5:09:18gross me the moment I do it you see
- 5:09:21everything has been replicated for both
- 5:09:23the serieses gross as well as neet if
- 5:09:26you go here now you have the only
- 5:09:28control over gross on neet the category
- 5:09:30control is not in your hand but whatever
- 5:09:32you have done previously is there so it
- 5:09:34means in case you want individual things
- 5:09:36to be done at the start of the line or
- 5:09:38the end of the line now it is static in
- 5:09:41nature as of now but you can do that and
- 5:09:43then change your series or then add the
- 5:09:45series now here I can go ahead and let's
- 5:09:47say choose gross for gross I can go
- 5:09:49ahead and change the type to square
- 5:09:51everything is changed to square other
- 5:09:52than see look at this
- 5:09:54brand moving ahead I can go ahead and
- 5:09:57change the transparency for the gross to
- 5:10:00zero so that I will get color inside my
- 5:10:03squares each series have its own type
- 5:10:06and can have its own color also now I'm
- 5:10:08changing the individual one but brand
- 5:10:09Aid which we have changed previously
- 5:10:11using category is still remain so that's
- 5:10:13a good thing we can do it previously and
- 5:10:14then do it also go ahead and change the
- 5:10:17Border color so in this case I can
- 5:10:18choose different color and I can also
- 5:10:21change the width of the marker you got a
- 5:10:23different look and feel for your markers
- 5:10:26this will enhance the visual experience
- 5:10:28of your line now let me tell you one
- 5:10:31more trick for that we have to go and
- 5:10:33adjust the line width you can go ahead
- 5:10:36and reduce the line width to zero so
- 5:10:39that line disappears you will only see
- 5:10:41marker now this is for all the series
- 5:10:43you can choose individually which series
- 5:10:44you want what I can do is let me have
- 5:10:46the width three and let me go to let's
- 5:10:49say gross and make it zero there is no
- 5:10:52line for the gross there are only marker
- 5:10:54and it could be helpful sometime you
- 5:10:55just wanted to show the markers you
- 5:10:57don't want to show the line and then you
- 5:11:00can selectively enable data label also
- 5:11:02and go to the series let's say gross is
- 5:11:04on and net you can switch it off now
- 5:11:06you're only getting the labels for the
- 5:11:14gross what I would like to do here is I
- 5:11:16would like to play around with the
- 5:11:17legend means I would like to have not
- 5:11:20the major series I want to have the
- 5:11:22Legend series to do that let me add a
- 5:11:24new page and in this new page I'm going
- 5:11:26to add one more line Visual and this
- 5:11:29line visual I'm going to have it on
- 5:11:30month year xaxis is month year from item
- 5:11:33Dimension I'm going to take category as
- 5:11:34a legend and let me take a major as that
- 5:11:37on the y- axis now as you can can see
- 5:11:39for each series I have a line I can go
- 5:11:41to the markers and as you can see I have
- 5:11:43a series for each series I can have some
- 5:11:45kind of a marker or I can enable the
- 5:11:47marker for everything now I enable the
- 5:11:49marker for everything I go to the
- 5:11:51category one I disable the marker so
- 5:11:53there's no marker for category one now
- 5:11:54you can check it out here there's no
- 5:11:56marker so now let me go to category two
- 5:11:59and for category two let me change the
- 5:12:01markers as triangles and let me also
- 5:12:03make them little bigger same way I can
- 5:12:05go to category three and I can change
- 5:12:07the marker to square and and I can also
- 5:12:10make them little bigger can go to
- 5:12:12category 4 and choose X as a marker and
- 5:12:16make it little bigger also I can change
- 5:12:20color for some of them if required let's
- 5:12:22change the color for category 4 to the
- 5:12:24Violet for x and then I told you the
- 5:12:27trick you can hide some of the marker
- 5:12:28using transparency or you can hide using
- 5:12:31goow for that series there are few
- 5:12:32options and you can have border if
- 5:12:34required in this manner you can play
- 5:12:36around with this now what let's do one
- 5:12:38thing let's also experiment on the
- 5:12:40scatter visual that's one of the very
- 5:12:42common visual which we use so let me add
- 5:12:44a new page and in this new page I'm
- 5:12:46going to add the scatter visual let me
- 5:12:49add to access which is my discount
- 5:12:51percentage let me see the drive measures
- 5:12:53the discount percentage and the margin
- 5:12:56percentage on two x's let me add City
- 5:12:59from the geography table as values I
- 5:13:01have got a good number of cities scatter
- 5:13:03visual shows markers what we can do is
- 5:13:06we can change the marker completely for
- 5:13:09everything or we can change it for each
- 5:13:12category now as you can see I already
- 5:13:14have the marker open so for all the
- 5:13:15categories I can have you know something
- 5:13:17so first of all I would like to increase
- 5:13:19the size so I let me make them a little
- 5:13:21bigger now I can go to a particular City
- 5:13:23let's say I want to highlight a
- 5:13:24particular City so I can choose a
- 5:13:26particular City in the category so let
- 5:13:28me go to Los Angeles and let me choose
- 5:13:31different shape for Los Angeles I have
- 5:13:32choose it in a triangle now you can see
- 5:13:34one triangle into the
- 5:13:36middle let me do one more thing is
- 5:13:38basically uh right now the size is not
- 5:13:40govern by something so let me govern the
- 5:13:41size by gross so size is now govern by
- 5:13:44gross now this is too big for size so we
- 5:13:48need to reduce the size so we go to the
- 5:13:50all now you got to reduce the size here
- 5:13:52so we go to the size whenever I use
- 5:13:55gross I usually take any value between
- 5:13:58-25 to -30 depending on the need now
- 5:14:02let's go back to the Los Angeles now I
- 5:14:05what I'm going to do I've chosen the Los
- 5:14:07Angeles again and I'm going to
- 5:14:09change the border so border is switched
- 5:14:11on right now it's matching color so I
- 5:14:12switch off the matching color I want it
- 5:14:14little different color so that I can
- 5:14:15highlight it and let me increase the
- 5:14:16width now you can see the Los Angeles
- 5:14:19there with this one and color
- 5:14:21transparency let me reduce it to zero
- 5:14:24and I would also like to change its
- 5:14:26rotation so let me change its
- 5:14:28rotation I change the rotation to 97° so
- 5:14:31it's looking like Arrow right now here
- 5:14:33in this manner what can happen here is
- 5:14:35basically you can go ahead and do very
- 5:14:38special specific stuff on your markers
- 5:14:41you can change the shape for each
- 5:14:43category or series you can change the
- 5:14:46rotation color transparency of the color
- 5:14:49you can change the Border color
- 5:14:51transparency and width and these are the
- 5:14:54various features which has been released
- 5:14:55as part of October
- 5:14:582024 so why don't you go ahead and try
- 5:15:01them
- 5:15:02out the next visual which I want to
- 5:15:04discuss is be the funnel visual so let
- 5:15:06me add a new page for that funnel visual
- 5:15:08is especially use in case of sales when
- 5:15:10we have lead opportunities and
- 5:15:12conversions now again there are a couple
- 5:15:14of ways you can have it one is basically
- 5:15:16if you have multiple measures you can
- 5:15:17use the funnel visual in that let me
- 5:15:20drag
- 5:15:21cogs
- 5:15:24net
- 5:15:27gross we also drag margin here you can
- 5:15:31treat this as your opportunities leads
- 5:15:34conversions this you can treat like you
- 5:15:36know you know total leads you have how
- 5:15:38many of are opportunity how many are
- 5:15:40them of hot leads and finally how many
- 5:15:42are converted something like that in
- 5:15:44this manner you can get it now in case
- 5:15:46you don't want that you can have
- 5:15:47category let's say those opportunities
- 5:15:50are not in terms of the majors it is in
- 5:15:53terms of the values values in the rows
- 5:15:58let's say let's treat category as one of
- 5:16:01them and I bring in category here and as
- 5:16:03you can see now we have Category 2
- 5:16:05category 4 category 1 and it
- 5:16:07automatically you know adjust into that
- 5:16:10as that method otherwise what you can do
- 5:16:13is you can go to the set acces and you
- 5:16:14know you can say I want to certain
- 5:16:16category so it can give it but it's not
- 5:16:18going to make sense unless your
- 5:16:19categories are sorted in that particular
- 5:16:21manner like opportunity leads H leads
- 5:16:24and sales
- 5:16:25Etc if you are simply using numeric
- 5:16:28value should sort it in the best way and
- 5:16:30then you can have sort ascending and
- 5:16:31sort descending to make sure the kind of
- 5:16:34visual you want to get whether you want
- 5:16:35to get the funnel or you want to get a
- 5:16:38pyramid based on that you can take
- 5:16:40action on this visual again if you want
- 5:16:42to look at the property of this visual
- 5:16:44you have title subtitle divider spacing
- 5:16:48data labels on and off so you you can
- 5:16:51see the data into the middle of it you
- 5:16:53can switch it on and off you have inside
- 5:16:55Center and outside and as an
- 5:17:00option now you have data value
- 5:17:02percentage of first that is really
- 5:17:04important percentage of previous then we
- 5:17:08have data value and percentage of first
- 5:17:09and data value and percentage of
- 5:17:11previous these options are available I
- 5:17:14think percentage of first is something I
- 5:17:15want to keep and for that I would
- 5:17:18actually like to have it s
- 5:17:21descending this looks much better to me
- 5:17:24values a value font and color you can
- 5:17:27change decimal places you can control
- 5:17:29you can control the percentage decimal
- 5:17:31places in case you want to have
- 5:17:32background you can have a background I
- 5:17:35have a little bit lighter background
- 5:17:36there on the backand side now I made it
- 5:17:38it little bit more darker so you can see
- 5:17:40it now category labels the labels of
- 5:17:43category 1 2 3 4 here it is category but
- 5:17:46it could be anything else if you don't
- 5:17:47want that you can switch that off again
- 5:17:50I'm switching it on then we have display
- 5:17:52conversion label
- 5:17:54option that is the top and the bottom
- 5:17:57lines if you are seeing so basically
- 5:17:59this is 100% And it 24% got converted
- 5:18:03that's what this means is but if you
- 5:18:05don't want to display that you can
- 5:18:06disable that so this is for chart mostly
- 5:18:09useful in sales and finance based on the
- 5:18:13requirement you can use this visual to
- 5:18:15enhance your visual experience let me
- 5:18:17rename the page before
- 5:18:20I switch to the next
- 5:18:22visual the next is not a visual the set
- 5:18:25of visuals which is basically
- 5:18:28the maps which I wanted to explore and
- 5:18:32we have few Maps out here and some of
- 5:18:34them are dependent on settings and the
- 5:18:36login especially map and shape map
- 5:18:39visuals they are controlled by the
- 5:18:41preview settings and the security
- 5:18:42settings so let me showcase you the
- 5:18:44settings quickly once again so I'll go
- 5:18:47to file then I go to the options and
- 5:18:49setting and
- 5:18:54options and I have preview feature where
- 5:18:56I have the shape map visual if you can
- 5:18:58see which I have enabled then you have
- 5:19:01to go to the security settings and
- 5:19:03inside the security setting if you
- 5:19:04scroll down you have to enable RGS map
- 5:19:08and field m map visual now I have not
- 5:19:10logged in and if it gives a problem on
- 5:19:12my tenant settings you also need tenant
- 5:19:15settings to enable the map and when you
- 5:19:17are signed in it do create an impact so
- 5:19:20let me first start with the map visual I
- 5:19:22click on the map Visual and in the map
- 5:19:25visual I'll add State I have two options
- 5:19:28only state and city so let me start with
- 5:19:30the state state is part of my geography
- 5:19:32Dimension I drag it here and with that
- 5:19:35I'm going to drag
- 5:19:37net it creates bubble for me and the the
- 5:19:41moment I drag the net that controls the
- 5:19:43size of the bubble and then we can do
- 5:19:46little bit play around now because this
- 5:19:48visual have a legend and if I drag a
- 5:19:50legend it will also create a pie chart
- 5:19:52you can create a pie chart in case you
- 5:19:54need a pie chart and then let's look at
- 5:19:56the properties quickly we have the size
- 5:19:58properties then we have the background
- 5:20:00visual border Shadow title these are the
- 5:20:03same properties subtitles spacing
- 5:20:05Legends on and off in case you are using
- 5:20:08Legend if if you're not using Legend
- 5:20:10then that on and off option is not much
- 5:20:14useful then we go to Bubble and as you
- 5:20:17can see we have the size property which
- 5:20:19we can play around we can decrease or
- 5:20:21increase the size now depending on how
- 5:20:24much is your range you can choose this
- 5:20:26size then rendering is
- 5:20:31magnitude data range and auto there are
- 5:20:36small small differences in that then
- 5:20:37color now because because I used Legend
- 5:20:39I'll not get option for conditional
- 5:20:41formatting but if I remove the category
- 5:20:43from The Legend I have the option for FX
- 5:20:46means I can do conditional formatting or
- 5:20:48I can change the color manually also
- 5:20:51then if I go down we have category
- 5:20:53labels if I switch it on it will allow
- 5:20:55me to show the state labels or the
- 5:20:57category labels I can have a background
- 5:21:00or I can switch off the background to if
- 5:21:01I want to show only names I can have
- 5:21:04color for the map now if you go if you
- 5:21:07want to have a heat map you again have
- 5:21:09options for heat map and you know
- 5:21:11gradient zero how should it look
- 5:21:14gradient 50% and gate 100% how should it
- 5:21:16look and then you can increase or
- 5:21:18decrease the radius to Showcase uh the
- 5:21:21heat map here this play in pixel you can
- 5:21:24attend meter and transparency all these
- 5:21:26things you can control I'll switch off
- 5:21:28the heat map there is something known as
- 5:21:30map setting so right now the map setting
- 5:21:32is road but I can have aial this is how
- 5:21:36it will look like dark
- 5:21:44light gray
- 5:21:46scale and
- 5:21:48Road and we have the option for show and
- 5:21:51off show label off label so you see the
- 5:21:54labels I'll let me highlight you which
- 5:21:56labels let look at these
- 5:21:58labels and if I switch it off you will
- 5:22:00not see the country
- 5:22:02labels then we have few controls like
- 5:22:04auto zoom which is enabled so if I go
- 5:22:07here I can zoom
- 5:22:09or it will what happen if there is some
- 5:22:11value get selected by some some slicers
- 5:22:13or something then also it will
- 5:22:15automatically Zoom so let me add a
- 5:22:17slicer externally and try to select
- 5:22:20something let me add it City slicer the
- 5:22:23moment I select a city because of that
- 5:22:25state got filtered and you can see that
- 5:22:27that got highlighted and this is because
- 5:22:29of the feature of auto zoom then if you
- 5:22:32want you can have zoom buttons if you
- 5:22:34click on Zoom buttons you'll get this
- 5:22:36plus and minus which you can use for
- 5:22:38zoom
- 5:22:40in and you can change the position if
- 5:22:43you want to zoom
- 5:22:49here then there is a lesso button if I
- 5:22:52enable lesso this is really interesting
- 5:22:53feature what does Leo select does is
- 5:22:56basically I can press the control button
- 5:22:58and then I can select multiple
- 5:23:01values and to what does it do for that
- 5:23:04what I'm going to do is basically let me
- 5:23:05click here on this visual make it as a
- 5:23:08table
- 5:23:10Visual and let me few cities here like
- 5:23:14using control and drag and as you can
- 5:23:18see the values are changing let me do it
- 5:23:19only on Hawai here you can see only this
- 5:23:22value if I click back in the any space
- 5:23:25it will go away I selected two of them
- 5:23:28again click on empty space it will go
- 5:23:30select few of them here on this side you
- 5:23:32can see the values are changing so this
- 5:23:34is the advantage of leso Select
- 5:23:36basically with the control you can do
- 5:23:37the selection you have to enable the
- 5:23:38lesso select and geoc coding is
- 5:23:41basically what kind of geoc coding you
- 5:23:42want if you want different cultures you
- 5:23:44can use
- 5:23:46those so this is what we call as map
- 5:23:49visual let me add another visual which
- 5:23:50is basically the Bui map visual now in
- 5:23:54the field map visual we have location
- 5:23:56Legend latitude longitude so in case you
- 5:23:59have latitude longitude you can use I
- 5:24:00don't have so I can use city or state
- 5:24:03but this is not a visual for City let's
- 5:24:06see can we get it I drag the value here
- 5:24:09for the shading no this is not the
- 5:24:10visual for that this is a visual more
- 5:24:12suitable for States so I can put State
- 5:24:15and I have already drag one major based
- 5:24:17on that it is giving me color it's going
- 5:24:18to give one tool tip but if you want to
- 5:24:20have the shading basically what you can
- 5:24:22do is you can go
- 5:24:25here in the fill color you can use the
- 5:24:28conditional formatting
- 5:24:31here you can use okay and you can get
- 5:24:34the conditional formatting here then
- 5:24:36this one and all those controls and
- 5:24:38everything is applied here now if you
- 5:24:40want you going to use a legend and if
- 5:24:42you use Legend you might not get the FX
- 5:24:43option in the color so let me use a
- 5:24:45legend of category here now this option
- 5:24:48might not be really useful you do have
- 5:24:50the color but it always end up showing
- 5:24:51you only one category we create
- 5:24:54something known as topper um first
- 5:24:57topper and second topper kind of where
- 5:24:58we can find out every category which is
- 5:25:01topper in each state and there we can
- 5:25:04use this filter that out that only top
- 5:25:07categories are there so we see rank one
- 5:25:10and then it would be more beneficial for
- 5:25:12us to have this kind of visual so this
- 5:25:15is the fill map visual for you next
- 5:25:17visual which you want to explore is the
- 5:25:18shape Visual and the shape map visual is
- 5:25:21one visual where you can also have your
- 5:25:24own shapes coming in so I'm bringing in
- 5:25:26state but if you go here into the map
- 5:25:28settings it is showing that it's a US
- 5:25:31state map but if you have these are the
- 5:25:33other state maps which are also
- 5:25:34available but you can also bring in your
- 5:25:37own Maps
- 5:25:39or you can browse the map type you can
- 5:25:41have your custom map and you can browse
- 5:25:43the map and you can use that so right
- 5:25:47now we are using the USA map St
- 5:25:51we but you can have your own map and we
- 5:25:54have similar kind of setting here but in
- 5:25:55this one you have the color saturation
- 5:25:57already available so one of the ways you
- 5:25:59use color saturation secondly you use
- 5:26:01the fill color so if you go to the fill
- 5:26:03color directly without using the color
- 5:26:05situation you can have FX button and in
- 5:26:07the F button you can use let's say
- 5:26:09gradient and you can click okay so it
- 5:26:12will give you the conditional
- 5:26:14formatting it will give you the gradient
- 5:26:16based on that and also you can use the
- 5:26:19conditional formatting like rule based
- 5:26:20conditional formatting or field value
- 5:26:21based conditional formatting here but
- 5:26:24what you can also do here is you can
- 5:26:26have color saturation you say no no I
- 5:26:28don't want to control it let power ba
- 5:26:30controls it you can put net into the
- 5:26:32color saturation the moment you do it
- 5:26:34you will not get that particular option
- 5:26:35means now you have the gradient which is
- 5:26:38you can choose the color and based on
- 5:26:40min max value it's very similar to the
- 5:26:41gradient what we have there but if you
- 5:26:43don't use the color s situation you more
- 5:26:46flexibility to use conditional
- 5:26:48formatting where we will also be able to
- 5:26:50use um rule based conditional formatting
- 5:26:52or measor based conditional formatting
- 5:26:54which is field value
- 5:26:56base then for the blank areas no blank
- 5:26:58areas on or off I use off then you don't
- 5:27:02see the blank areas here you this is
- 5:27:03white in color and otherwise you want to
- 5:27:05show it or you want to show it in black
- 5:27:07color you can decide how you want to
- 5:27:08show the blank areas if you want to use
- 5:27:10Legend again Legend would be not very
- 5:27:12useful if unless you plan to show the
- 5:27:15top ranker or second top ranker we need
- 5:27:17to take example of what does you mean by
- 5:27:19top ranker and second top ranker what we
- 5:27:21need to do is we need to create category
- 5:27:23ranks and then we need to filter the top
- 5:27:25rank and that we will do once we learn
- 5:27:28how to create rank index and then later
- 5:27:31on we'll come back to conditional
- 5:27:33formatting then we will learn how to use
- 5:27:36that so this is shap ape map Visual and
- 5:27:39really powerful in case you want your
- 5:27:41own custom shape you can go ahead and
- 5:27:43try that out the next one which I want
- 5:27:45to use is
- 5:27:47Azor Azor map visual has recently been
- 5:27:50enhanced and one of the thing which you
- 5:27:52must remember that it requires a sign in
- 5:27:54so now I need to sign in before I use
- 5:27:57and it need to be enabled at my tenant
- 5:27:58level so let me sign in
- 5:28:14I have signed in into my
- 5:28:17popup let's remove this and try to add
- 5:28:19it
- 5:28:21again it give me a disclaimer
- 5:28:23Also let's try to add some location to
- 5:28:26it those of you who used your map visual
- 5:28:29in the past or seen the past
- 5:28:31video the location is something which
- 5:28:33very recently got added so let me add a
- 5:28:35location here but this visual is coming
- 5:28:37out as one of the powerful visuals that
- 5:28:39we can have here then we have a size
- 5:28:42which we can bring in using net here by
- 5:28:44default it has given all the same size
- 5:28:46now I have the size so let me go into
- 5:28:48the property of this visual so you have
- 5:28:50the map setting where you have the style
- 5:28:51different kind of style like
- 5:28:55Road
- 5:28:58hybrid
- 5:29:02satellite
- 5:29:04gray scale light
- 5:29:10Tera
- 5:29:15blank lanks
- 5:29:19accessible high contrast
- 5:29:22dark high contrast
- 5:29:25light these are the Styles available let
- 5:29:28me keep it a road
- 5:29:29only then you have view auto zoom o on
- 5:29:34and you can have different options if
- 5:29:36you want to disable the auto zoom like
- 5:29:39you know you can observe the difference
- 5:29:41the moment I remove the auto zoom it
- 5:29:43actually comes in and then you have the
- 5:29:45buttons which can control it but I think
- 5:29:47auto zoom is a better option so I'm
- 5:29:49going to keep it but yes you will get
- 5:29:51the zoom buttons you will have the reset
- 5:29:53options up and down options and some of
- 5:29:56the options are available on the visual
- 5:29:58for users to change
- 5:30:02it then you have the controls so word RP
- 5:30:06can enable disable style picker so if
- 5:30:09you in the top if want to use see this
- 5:30:12is the your style
- 5:30:14picker and I I can disable it so you
- 5:30:17can't change it on the Fly Like if I
- 5:30:18give this you can change it on the fly
- 5:30:20but I'm going to disable that navigation
- 5:30:22buttons you
- 5:30:26have I disabled that selection and
- 5:30:29switch on and off selection button Geo
- 5:30:31coding is auto I'm going to keep then
- 5:30:33you have
- 5:30:34the layer settings which is minimum and
- 5:30:37maximum unselected disappear you can
- 5:30:40have Legends in case we are not using
- 5:30:42Legends as of now here uh we'll see the
- 5:30:45field
- 5:30:47map not applicable right now bubble
- 5:30:50layer is a category label so we have the
- 5:30:53heat map option in the heat map option
- 5:30:56we can play around with the radius and
- 5:30:58when heat map is enabled we can switch
- 5:31:01off the bubble layer so that we only get
- 5:31:03the heat map layer in this case there
- 5:31:06are multiple levels so we can disable
- 5:31:07this
- 5:31:09now we have the color option where we
- 5:31:12have the color of the gradient right now
- 5:31:15which is applicable in this case if we
- 5:31:17switch off the heat map then that color
- 5:31:19option will go bubble layer is on right
- 5:31:22now in the bubble layer you have the
- 5:31:23cluster bubble and then the color and
- 5:31:25then we have the size of the bubble
- 5:31:28which is minimum and a maximum we can
- 5:31:29say minimum is five and maximum we can
- 5:31:31also control so we'll have little
- 5:31:32smaller bubble range selected is data
- 5:31:34range or magnitude or Auto we can keep
- 5:31:37it data range your auto a shape
- 5:31:40transparency we can control inside the
- 5:31:41shape so I'll make it little bit
- 5:31:43transparent color you have the
- 5:31:44conditional formatting option we have
- 5:31:47conditional formatting options and we
- 5:31:49can do conditional formatting based on
- 5:31:51gradient color rule based or field value
- 5:31:53base let me try based on gradient as of
- 5:31:56now based on the margin percentage uh
- 5:31:59it's rule based right now I'll make it
- 5:32:00gradient based so that I can easily do
- 5:32:02it or I can say based on certain rules I
- 5:32:05can have those values so this is
- 5:32:07gradient BAS
- 5:32:09color so this is all all I'm doing for
- 5:32:11bubble then bubble can have border or
- 5:32:13not you can decide right switch on
- 5:32:16Border switch off border you have the
- 5:32:18zoom option then you have the options
- 5:32:20which is pitch alignment Viewpoint or
- 5:32:24map labels are below or above right now
- 5:32:27I don't think we are showing
- 5:32:32labels you can enable the category
- 5:32:34labels now you have the
- 5:32:36labels and labels can have background or
- 5:32:38cannot have background and you can add a
- 5:32:40heat map layer as we discussed now if we
- 5:32:43go here can put let's say Legend I'll
- 5:32:46put category as a
- 5:32:49legend the moment I put the legend you
- 5:32:51can see the pie charts the labels are
- 5:32:54too big we need to disable them I'm
- 5:32:56disabling the category labels you can
- 5:32:59see the pie chart better as soon as I
- 5:33:00add the legend you cannot have the color
- 5:33:03using conditional formatting so that is
- 5:33:05gone you have the border and the width
- 5:33:08of the Border if you want simply you
- 5:33:10know a totally covered P you can have
- 5:33:12the transparency if you want you can
- 5:33:13increase the transparency of the
- 5:33:16colors you can CH change the size again
- 5:33:19we can start with little bit smaller and
- 5:33:21going to a little bit
- 5:33:23larger you can control the size you can
- 5:33:25control the shape transparency again I
- 5:33:29want lesser transparency in this case so
- 5:33:31these are the various options you can
- 5:33:32also use with the Azor map visual map
- 5:33:36visual is coming as an stronger option
- 5:33:38compared to all other visuals and you're
- 5:33:40getting a lot of enhancement on that so
- 5:33:42start exploring that it may give you
- 5:33:44options which you have in other visuals
- 5:33:46so it could act as a replacement of
- 5:33:48those visuals the next uh visual which I
- 5:33:51want to discuss here is card visual very
- 5:33:54simple visual so let's add a new page
- 5:33:58and from the build a visual I'm opening
- 5:34:01the Builder visual pan this time I
- 5:34:02closed it so I opened it by clicking on
- 5:34:06build a visual
- 5:34:08and in the Builder visual we have this
- 5:34:10is card visual we also have a new card
- 5:34:12visual which we'll learn after we learn
- 5:34:14the major because we wanted to create an
- 5:34:16icon measure for this and this visual is
- 5:34:19also available here in the insert of the
- 5:34:21Home tab so let me click on the card
- 5:34:24visual we do do have a multi row card
- 5:34:27Visual and the new card visual but let's
- 5:34:29focus on this so in the card visual
- 5:34:32let's drag a major and you can have one
- 5:34:34mejor only at a time so I drag net then
- 5:34:37if I try to Dr margin and it will
- 5:34:39replace margin so I can have only one
- 5:34:41major so I'll have net here now I'll
- 5:34:44open the format by clicking on the
- 5:34:48format and we have the size and the
- 5:34:51position which is coming because we
- 5:34:52draged versus what we how much size we
- 5:34:55have given padding is for the top and
- 5:34:57bottom if we want a tight fit text then
- 5:35:00we can reduce the top and bottom spaces
- 5:35:04background we can switch off we don't
- 5:35:05need a background and in casee you need
- 5:35:07a back ground and along with the color
- 5:35:09like you want your background color to
- 5:35:10change let's say my margin is positive
- 5:35:12then it should be green and red then you
- 5:35:14can do it using that then we have visual
- 5:35:17borders uh in case you need it shadow in
- 5:35:20case you need a shadow on and off as
- 5:35:22usual we have tried out in the pass
- 5:35:24title now sometime you may like to have
- 5:35:27title or you know want to have a
- 5:35:30category label like let me switch off
- 5:35:32the category label so you can see the
- 5:35:34net is not available now here so there
- 5:35:36is no net value here when I switch off
- 5:35:38the category label so instead of that I
- 5:35:41may like to have a title which is known
- 5:35:43as
- 5:35:44net and I may would like to do it is
- 5:35:48Central align and then I can have my
- 5:35:51card visual like this now you have the
- 5:35:53title now you can have a subtitle here
- 5:35:54but I don't feel a need for giving but
- 5:35:56you have an option for that having a
- 5:35:58subtitle then divider in case you need a
- 5:36:01divider between subtitle and the value
- 5:36:04and then when I go to the call out value
- 5:36:06that's why I created a little bit of
- 5:36:08space because in the call out value I
- 5:36:10want to use none so I can change my
- 5:36:12format here and decimal place I'm also
- 5:36:15going to make it zero my major do have a
- 5:36:17decimal place but I can change the
- 5:36:18number of decimal place text WP in case
- 5:36:20it is bigger then we can have a text WP
- 5:36:23then category level as we switched off
- 5:36:25but if you want you can have category
- 5:36:26level then you need to give a space
- 5:36:27according to it I think both are not
- 5:36:29needed you can have the font italic
- 5:36:31underline in case you need that again uh
- 5:36:34we have FX like basically the name
- 5:36:36should change based on on the
- 5:36:38conditional formatting let's say if the
- 5:36:40net is passing some value we want to
- 5:36:42have the label have changing its color
- 5:36:45or call out value changing is color so
- 5:36:47you can see these FX option is there in
- 5:36:49the call out value this is there in the
- 5:36:51category value category label it is
- 5:36:53there and as well as in the background
- 5:36:55also this same thing is available title
- 5:36:58also it is
- 5:37:00available text color background color FX
- 5:37:04option and background also we have FX
- 5:37:07option in means all these we can use
- 5:37:09conditional formatting to change these
- 5:37:13color so what I'm going to do here is
- 5:37:15I'm going to disable again the category
- 5:37:17label this looks much better and what I
- 5:37:19can do is I can copy paste this and in
- 5:37:22this new one instead of net I'll bring
- 5:37:25in Gross and it has taken the same
- 5:37:27properties so this is a trick that you
- 5:37:30create a card Visual and set all the
- 5:37:33properties and then duplicate it for the
- 5:37:37s similar measures and use that in such
- 5:37:40cases you will require lesser changes in
- 5:37:44the new card visual which are coming in
- 5:37:47and you will be able to use same set of
- 5:37:50properties in multiple card visuals
- 5:37:53finally go ahead and change it and now I
- 5:37:56can use gross as a title here in this
- 5:37:59manner you will require lesser amount of
- 5:38:01work to format all your card visuals
- 5:38:03there are certain time we can do multi
- 5:38:05select some of the common properties are
- 5:38:06visible and you can change those so that
- 5:38:08is also you can do a faster formatting
- 5:38:11so this is the card visual for you the
- 5:38:13next visual which I want to discuss is
- 5:38:15the multi row card Visual and what I'm
- 5:38:20going to do is I'm going to add that on
- 5:38:22the my card visual page so I opened
- 5:38:24again my card visual page and this is
- 5:38:26the multirow card visual here in a
- 5:38:28builder Visual and it is appearing
- 5:38:33here I can make it little bit bigger now
- 5:38:36as the name suggest it's a multi row
- 5:38:38card visual so one thing which comes to
- 5:38:41my mind that I can have multiple
- 5:38:43measures okay so let me copy paste it
- 5:38:47duplicate it and let me see can I have
- 5:38:51brand or category also as one of the
- 5:38:56field I can have category 1 Category 2
- 5:38:59Category 3 category 4 these kind of
- 5:39:01values and so I can have a field as well
- 5:39:04as a measure along with that so let's
- 5:39:06start formatting the and see what all
- 5:39:08the formatting options we have the
- 5:39:10movement I used categorical field it
- 5:39:12seems like I'm getting only vertical
- 5:39:13here I was getting horizontal also so in
- 5:39:16the first one let's add few more and see
- 5:39:18is this is the the style or can we
- 5:39:21change it seems like it do can do some
- 5:39:24kind of adjustment but let's see how
- 5:39:26much control do we have I clicked on the
- 5:39:29first one and I'm going to change the
- 5:39:30properties of the first one again the
- 5:39:31background is something which I don't
- 5:39:33require visual border again we have
- 5:39:35learned in the past we don't require
- 5:39:37that shadow we don't require title is
- 5:39:39definitely you can if you required you
- 5:39:41can call it
- 5:39:43kpi
- 5:39:45kpi or
- 5:39:47kpis then again bold italic underline
- 5:39:50text color you can do subtitle if you
- 5:39:53require divider in case you need a line
- 5:39:56between
- 5:39:59these spacing then let's go to the card
- 5:40:03so card we have a style which is top
- 5:40:09bottom
- 5:40:12left right these are just alignments if
- 5:40:15you look at it so you have styles your
- 5:40:18background your padding padding between
- 5:40:20these things asent bar bar is something
- 5:40:22which is available here basically and
- 5:40:24want to remove that you can can remove
- 5:40:27it and let me do a little bit of
- 5:40:29adjustment here and that's where the new
- 5:40:32card visual is much better here compared
- 5:40:35to this one because as you can see not
- 5:40:37much options are under control on the
- 5:40:39design in case of uh the kpis and that's
- 5:40:43where the new card visual is going to be
- 5:40:44a better option which we discuss in
- 5:40:46sometime now let me go here uh in this
- 5:40:48one and as you we have size visual
- 5:40:51border Shadow title call out values then
- 5:40:54category labels is something which I
- 5:40:55would like to disable now if I disable I
- 5:40:57will not see gross and anyway here I I
- 5:40:59don't want to see gross again and again
- 5:41:02in this one but if you I want to have
- 5:41:03category label I can have conditional
- 5:41:05formatting that can change the color so
- 5:41:07here we have the conditional formatting
- 5:41:09options on call out values and call out
- 5:41:11value is nothing but your actual value
- 5:41:13so I can make it bold so that you
- 5:41:16understand this is what we call call out
- 5:41:17value category label youve seen this is
- 5:41:20what you call category
- 5:41:23label and we have conditional formatting
- 5:41:25available at the call out value level
- 5:41:27and category label label here I don't
- 5:41:28need the category label so I'm going to
- 5:41:30hide it but definitely we can use
- 5:41:32conditional formatting so we can go
- 5:41:34ahead and say okay we need the
- 5:41:36conditional formatting based on let's
- 5:41:37say discount percentage and we have
- 5:41:40discount from 0 to 25 maximum or 35
- 5:41:46maximum and we'll say okay and as you
- 5:41:48can see the text has color but all the
- 5:41:51colors are very nearby tell you a better
- 5:41:54way to know the range so go here and add
- 5:41:56the discount percentage so you can see
- 5:41:58the entire discount percentage is
- 5:42:00between 22.8 n and
- 5:42:0423.4 so what I've done basically I set
- 5:42:07up the value between 225 and 235 and try
- 5:42:11to keep it but as our values are pretty
- 5:42:14nearby you will see that you know most
- 5:42:16of the values are having color which is
- 5:42:19very near to each other because these
- 5:42:21values are very nearby or we could have
- 5:42:24actually done what on the margin
- 5:42:25percentage if you take margin percentage
- 5:42:27basically uh you have we have a little
- 5:42:29bit bigger range but for categories we
- 5:42:31don't have so these kind of challenges
- 5:42:33can come if your ranges are very nearby
- 5:42:35so in such cases you can use use field
- 5:42:38value base or rule based and call out
- 5:42:40explicit color which can differentiate
- 5:42:42that we will learn little bit later as
- 5:42:45you might have seen that I added
- 5:42:46discount percentage and margin
- 5:42:48percentage also I can add here at this
- 5:42:51moment it is really important to know
- 5:42:52what category label it is and I have to
- 5:42:55now enable the category label if I want
- 5:42:56to show it so in the previous case the
- 5:42:59category label was not uh required when
- 5:43:01I only have the one value but now
- 5:43:02because I have multiple of them it is
- 5:43:05required that I have the category level
- 5:43:07multiple purpose so some of those
- 5:43:08purpose may not be easily served by the
- 5:43:11new card Visual and one of those purpose
- 5:43:12is this purpose where I have a category
- 5:43:14and I then I display these multiple
- 5:43:16Majors below it and this kind of display
- 5:43:18is something very specific to the
- 5:43:20multirow card this is multi card visual
- 5:43:23for you so the next thing I want to
- 5:43:25discuss uh filter pan with you and
- 5:43:28before going to the next visualization
- 5:43:30which is basically slicer I would like
- 5:43:32to discuss filter pain with you because
- 5:43:35how filter pain applies and house slicer
- 5:43:37is going to be a little bit different
- 5:43:39from that this is something I want to
- 5:43:40explain what I've done here is basically
- 5:43:42from different pages which we already
- 5:43:43created this is Matrix visual this is
- 5:43:46the tagged bar visual this is p Visual
- 5:43:48and this is table visual these are the
- 5:43:49same visual which we have created in the
- 5:43:51past some time back in the other pages
- 5:43:53and from there I copy paste it and
- 5:43:54resize it let me open the filter pan now
- 5:43:57now let's try to understand what is this
- 5:43:59so now when the no visual is selected
- 5:44:00you see filter on this page and filter
- 5:44:02on all page and you don't see any value
- 5:44:04inside it but if I click on a particular
- 5:44:06visual in this case when I clicked on
- 5:44:08the pi visual you do see category margin
- 5:44:10margin percentage as the filters which
- 5:44:13is available means
- 5:44:15both categorical variable and the
- 5:44:18numerical variable which is basically
- 5:44:20the majors Majors as well as the fields
- 5:44:22or the columns are available for
- 5:44:24filtering when I click on the table
- 5:44:25visual you see what is be added so
- 5:44:28typically what has been added is by
- 5:44:29default available in the filters of that
- 5:44:31particular visual we can definitely go
- 5:44:33ahead and add a few more values now let
- 5:44:36me come to this particular visual in the
- 5:44:38category Visual and if I want to filter
- 5:44:40something I go ahead and filter this now
- 5:44:42as you can see there is no impact on the
- 5:44:44other
- 5:44:45visuals I'm filtering a value and there
- 5:44:47is no impact on the other visual when
- 5:44:49I'm filtering from the visual level
- 5:44:50filter so visual level filter only
- 5:44:52impact a particular visual then the
- 5:44:55second thing I'm seeing some Majors also
- 5:44:57like margin margin percentage here in
- 5:45:00this visualization so let me go to this
- 5:45:02column
- 5:45:03net and let me say the value is
- 5:45:07what are the options I have so in the
- 5:45:09net I have option is less than is more
- 5:45:11than is blank Etc so what I'm going to
- 5:45:15say here is basically if you see I have
- 5:45:18values which is basically 1.3 million
- 5:45:201.7 million 1.8 million 2.5 million so
- 5:45:24let me say value is greater than and I'm
- 5:45:27going to write down 1.5
- 5:45:29million so this is 1.5 million value
- 5:45:32basically and I say apply filter so now
- 5:45:34you can see the it is getting filtered
- 5:45:37based on the value one most important
- 5:45:39thing which you have to remember that
- 5:45:41you can only use major filter the filter
- 5:45:45on a measure in the visual level filter
- 5:45:48only so you can only filter measure at
- 5:45:51the visual level now there is one more
- 5:45:55which you can use here and for that what
- 5:45:57let me do is let me simplify this table
- 5:45:59visual I go to the table Visual and open
- 5:46:01it build and from there I'm going to
- 5:46:02remove category I'm trying to simplify
- 5:46:04it and when I go to brand
- 5:46:08actually instead of basic filtering I
- 5:46:10can do the advanced filtering just like
- 5:46:13I have done in the text majure where I
- 5:46:15used Advanced filtering not the basic
- 5:46:16filtering so the basic filtering is
- 5:46:18basically the values I can select brand
- 5:46:21one and I can also select brand 10 Brand
- 5:46:2411 that's my basic filtering the values
- 5:46:27filtering then you need Advanced
- 5:46:29filtering so in advanced filing I can
- 5:46:31have contain uh does not contain but I
- 5:46:34have very similar so I can say Okay
- 5:46:35contain one and apply all those which
- 5:46:38contain one will come
- 5:46:41now as you can see in the contain I can
- 5:46:43have contain this or this there are only
- 5:46:45two options but if you need multiple
- 5:46:47contain what you need to do so in case
- 5:46:50you need more than one values in the
- 5:46:51advanced filtering what you do is go to
- 5:46:54the basic filtering let's say I need
- 5:46:55three conditions so check out three here
- 5:46:57and then go and say advanc filtering so
- 5:47:01you will get three conditions there and
- 5:47:02now you can say is and does not start
- 5:47:05with or start with so and and or
- 5:47:08combinations you can create so we can
- 5:47:10say is brand one or is brand 10 or is
- 5:47:13Brand 11 that's the three values
- 5:47:14basically in or multiple selection means
- 5:47:17that add otherwise we can say
- 5:47:22or contains or start with we say or
- 5:47:26contains let's say
- 5:47:28two either it is brand one or brand 10
- 5:47:31or it contains two we got a different
- 5:47:33combination in this manner you can have
- 5:47:35multiple conditions and and with the
- 5:47:37Eraser with the help of the Eraser here
- 5:47:39you can actually remove it so now you
- 5:47:42understand the basic filtering selection
- 5:47:43of values Advanced filtering you have
- 5:47:45lot of options and the options would
- 5:47:47change based on whether it's a number or
- 5:47:49whether it's aing data type you can have
- 5:47:51like contains does not contain is not
- 5:47:53blank blank is really important because
- 5:47:56is blank or is not blank or empty values
- 5:47:58when you don't have the values it is
- 5:47:59going to help you out now the Third Kind
- 5:48:01of filtering which we wanted to discuss
- 5:48:03is the top end and the that is because
- 5:48:06of which I actually I also removed the
- 5:48:08category because I want to explain you
- 5:48:10this easily so you have something known
- 5:48:11as top end filter in the top end you can
- 5:48:14specify I need five now five based on
- 5:48:17what let's say cogs discount margin
- 5:48:19margin percentage let's say net I'll
- 5:48:20bring in net here now remember right now
- 5:48:23you are not do net here but I still
- 5:48:26based on the net I want to filter and
- 5:48:28I'll say apply I ask for top five and
- 5:48:32you might be surprised why it is not G
- 5:48:34toet price the reason for that is this
- 5:48:35quantity because the sales quantity is
- 5:48:38unsummon summarize so I'm going to
- 5:48:40remove it and now you're only going to
- 5:48:42see five properties I don't have net
- 5:48:44inside this visual but still I can do it
- 5:48:46so this is top five based on net I can
- 5:48:49change it based on margin percentage or
- 5:48:52this percentage that percent I can only
- 5:48:54have one one such thing because if you
- 5:48:57say I want let's say State also here you
- 5:49:00can add a state as a visual level filter
- 5:49:02but if you now wanted to do let's say
- 5:49:04top end you can only apply one top end
- 5:49:06filter so you can't apply more than one
- 5:49:08top end filter if you want that kind of
- 5:49:10stuff where you have more than one top
- 5:49:11end filter then you have to go ahead and
- 5:49:13write down a top and major or you have
- 5:49:16to write down a rank and then you to
- 5:49:17filter it so top end and the major
- 5:49:20filters are visual level filter
- 5:49:22properties so visual level is something
- 5:49:24which only filters that particular
- 5:49:25visual see anything I'm doing on this
- 5:49:27visual is not impacting any other visual
- 5:49:29you might have seen the entire exercise
- 5:49:31which we have done there's nothing
- 5:49:33changing in other visual now what we're
- 5:49:35going to do is let's go ahead and
- 5:49:37continue with this these visuals will
- 5:49:39keep as is so this is filtering on
- 5:49:41category this is filtering on brand and
- 5:49:44what we going to do is on the page level
- 5:49:46filter now I'll go to the page level
- 5:49:48filter and let me bring in a brand on
- 5:49:51the page level filter this is Page level
- 5:49:53filter and I select brand one now
- 5:49:55there's no brand one here we don't know
- 5:49:57which whether in this category brand one
- 5:49:59are appears or not we definitely no
- 5:50:00brand appearance here and their Valu
- 5:50:02should change I click on brand one now
- 5:50:05the brand one does does not appear in
- 5:50:07that particular set of categories so it
- 5:50:09disappeared here brand one why you're
- 5:50:12getting brand one here the reason is the
- 5:50:14moment I filter the page
- 5:50:16data my top five got adjusted to that
- 5:50:19and because I only selected brand one I
- 5:50:21can get top five in that when I add
- 5:50:22let's say Brand 11 brand 12 brand 13
- 5:50:25brand 10 brand two I get a new top five
- 5:50:29based on my selection so that's where
- 5:50:32the top end filter is working and that's
- 5:50:33why we have brand still there and you
- 5:50:35can see other places we have more values
- 5:50:37and these values continue to change
- 5:50:39anything which you apply on the page
- 5:50:40level is going to filter all the content
- 5:50:42of the page now one of the limitation
- 5:50:45which the filters have and that's where
- 5:50:47we are going to have slicer that I I
- 5:50:50can't stop the filtering of this visual
- 5:50:54when I apply the page level filter so
- 5:50:56either I do visual level filter which
- 5:50:58filters the visual or I filter all the
- 5:50:59visual I cannot stop my filter to
- 5:51:03interact or stop the interaction between
- 5:51:06a filter
- 5:51:07of the page level or filter at the all
- 5:51:10page level which is below I cannot stop
- 5:51:12its interaction with any of my visual
- 5:51:15which is available in my page now at the
- 5:51:17page level filter we have basic
- 5:51:18filtering and advanced filtering in
- 5:51:20advanced filtering because I selected
- 5:51:21multiple values it's giving me this
- 5:51:23option but I can erase it again based on
- 5:51:25what I select I selected this on brand
- 5:51:27so I can have contained is not blank is
- 5:51:29not blank is empty does not contain so
- 5:51:31let's say do not start with b and we
- 5:51:34don't have any brand which which is
- 5:51:36doesn't start with B all the brands
- 5:51:38start with B so we will not have any
- 5:51:40value we'll do one thing we'll remove
- 5:51:42this filter all together on the brand
- 5:51:45and let's bring in state from the
- 5:51:48geography at the page level filter and
- 5:51:50here Advanced filtering is little bit
- 5:51:52interesting because then here we can say
- 5:51:54let's say start with n New York
- 5:51:59NE you can say we got New York as the
- 5:52:02state level and then there are few more
- 5:52:03State like New Jersey and New Mexico
- 5:52:06which start with new so it's also
- 5:52:08possible that the categories are not
- 5:52:10having that kind of data so they are not
- 5:52:12getting the values so we are able to
- 5:52:14filter the values so not now what I'm
- 5:52:16going to do is I'm going to erase these
- 5:52:17values and let's go to the all page
- 5:52:19level what's the difference between this
- 5:52:21page level and all page level so we
- 5:52:22understood that visual level is only at
- 5:52:24visual page level is going to filter all
- 5:52:26the visuals on the page but if I bring
- 5:52:29something at state
- 5:52:31level and let's say I select laska it's
- 5:52:33filtered the everything in this one go
- 5:52:35to other page
- 5:52:37this page is also
- 5:52:38filtered what this page this page is
- 5:52:41also filtered so everything is Alaska
- 5:52:43here we said no no no how do I make sure
- 5:52:45that it's only the multiple page level
- 5:52:48which filing so we filter Arizona here
- 5:52:50and then we go back to the filter pane
- 5:52:53page and Arizona is filtered here you
- 5:52:56say it may possible that the page level
- 5:52:59is filtering also on all the pages not
- 5:53:02this one so let's experiment let's go to
- 5:53:04the page level filter again this is
- 5:53:05filter on this page and let's go to the
- 5:53:08basic filtering and let try to filter
- 5:53:10let's say Alaska and Arizona now this
- 5:53:12page is Alaska and Arizona but if I go
- 5:53:14to this Azor map and you can still see
- 5:53:16all the values okay you say very good
- 5:53:19all the and you don't have a page level
- 5:53:20filter also here you can you can see
- 5:53:22this there is no page level filter this
- 5:53:24all page level is all fine okay let me
- 5:53:26go ahead and un check this and let's
- 5:53:28select Alaska I select Alaska come back
- 5:53:30to the filter pan and I see only alasa
- 5:53:33value here remember we have two values
- 5:53:35selected Alaska Arizona but the all page
- 5:53:37level filter is restricting it to Alaska
- 5:53:39so we are only getting the value of
- 5:53:40Alaska and the cities of
- 5:53:43Alaska in this manner what is happening
- 5:53:45is basically we are able to filter at
- 5:53:48different level visual level page level
- 5:53:50and all page
- 5:53:51level with this now we will go ahead and
- 5:53:55learn
- 5:53:56slicers now slicers are at the page
- 5:53:59level but there is a feature sync slicer
- 5:54:01which can make them available on
- 5:54:04multiple pages so we have to learn that
- 5:54:06we will now explore slicers what I've
- 5:54:09done basically is I already created a
- 5:54:10page where I
- 5:54:12have taken the visuals from the older
- 5:54:15page and when we was doing the filter
- 5:54:17pan these are the same set of visual
- 5:54:19which were there I removed visual level
- 5:54:22filter from the category uh pie chart
- 5:54:27and I kept visual level filter as you
- 5:54:29can see top five brand on the table
- 5:54:30level and I created a little bit of
- 5:54:32space here so that you know we can use
- 5:54:34the slicers now with we will use one
- 5:54:37property interaction here which I'm
- 5:54:38going to Deep dive into the details
- 5:54:40later but we will be able to understand
- 5:54:44the slicer functionality better if we
- 5:54:46understand that how the
- 5:54:48slicer Behavior can be changed using
- 5:54:51interaction to add the slicer we have
- 5:54:54two slicer options both available in
- 5:54:57Builder visual as well as homage insert
- 5:55:01so we will open the homepage insert and
- 5:55:04if we scroll down we will be able to see
- 5:55:05both the the slices the new slicer and
- 5:55:11the old slicer as of now we'll start
- 5:55:14with the old slicer and then we are
- 5:55:16going to go to the new slicer also if I
- 5:55:19enable the build visual region again we
- 5:55:21have the new new slicer here and we have
- 5:55:25the old slicer here they are not at this
- 5:55:27nearby place they're little bit far away
- 5:55:30but you have the two of them here the
- 5:55:32first thing which you want to do is we
- 5:55:33want to use this old slicer and so if
- 5:55:37you click on empty space and click on
- 5:55:39the new slicer you'll get it in empty I
- 5:55:42would start by filtering the brand so I
- 5:55:46can simply drag in a slicer and then I
- 5:55:48can drag in a value field value here and
- 5:55:51I can get a simple like this one and
- 5:55:55this is basically categorical because of
- 5:55:57that the slicer has come like this and I
- 5:55:59can actually select values like this if
- 5:56:02I click on another value it's going to
- 5:56:04remove the previous value and select the
- 5:56:06next value now if I want to select
- 5:56:08multiple I can click with control we can
- 5:56:11change this
- 5:56:13Behavior with control I can select
- 5:56:15multiple values control again control is
- 5:56:17present right now when I'm doing all
- 5:56:19these so this is the first look now
- 5:56:24there are tons of format available with
- 5:56:26this one also and then we can create the
- 5:56:28hierarchical sler also so basically
- 5:56:31let's look at the properties and then we
- 5:56:32have to do multiple versions of this
- 5:56:34slice survey so this is size and style
- 5:56:36and padding which is very common
- 5:56:37background we have seen visual border
- 5:56:39and Shadow these are the things we are
- 5:56:40not bothered about title is something
- 5:56:42which if you want you can add it now
- 5:56:44brand already is available as a slicer
- 5:56:47header which I can remove if I want
- 5:56:48title Now understand there is something
- 5:56:51known as slicer header the moment I give
- 5:56:52it it comes as a brand here and then
- 5:56:54there is a set of properties for that if
- 5:56:56I don't need I can create a title which
- 5:56:58is separate than slicer and the title
- 5:57:01can also be a function driven okay so I
- 5:57:04can write down brand and then I can get
- 5:57:07it based on a major and then there's a
- 5:57:10conditional formatting also available
- 5:57:12let's say in this one I want to write
- 5:57:15down the set of selected values on the
- 5:57:17title so I can do that we will once we
- 5:57:19learn little bit more about the majors
- 5:57:21we will be able to create that kind of a
- 5:57:24function which can give all the values
- 5:57:26on the title then we have the slicer
- 5:57:28setting now this is really important
- 5:57:29this is something which we right now
- 5:57:31seeing we call it as a vertical list you
- 5:57:34have tiles basically the tile will
- 5:57:36comeing something like this and that's
- 5:57:37why I kept little bit space here and
- 5:57:39make it so you have the tiles here and
- 5:57:42then if there are more values there
- 5:57:43would can be horizontal scale we have
- 5:57:46the horizontal one so this is style
- 5:57:49previously this was known as orientation
- 5:57:51horizontal this is style and if I click
- 5:57:53here as usual it's going to filter the
- 5:57:55values and with control I can click on
- 5:57:57multiple
- 5:57:58Val so this was previously known as and
- 5:58:01if you watched the last year video this
- 5:58:03is known as orientation horizontal then
- 5:58:06we have a drop down we can again adjust
- 5:58:09it so drop down is something which you
- 5:58:11will not see the values as Styles as
- 5:58:14well as the vertical you will have a
- 5:58:16drop down and when you open it you will
- 5:58:17be able to see the values you can create
- 5:58:20Slicer in any of such ways so let me do
- 5:58:22one thing let me duplicate this
- 5:58:26one and I'll change it to
- 5:58:30category so instead of brand let me go
- 5:58:33ahead and and this is really good
- 5:58:34feature you go to the arrow and then you
- 5:58:36go ahead and change it it get changed
- 5:58:38and this one we can I'll keep it as a
- 5:58:40tile okay so smaller value tile is
- 5:58:43better option let's look at the
- 5:58:46selection option so we have a single
- 5:58:47select means if you make it as a single
- 5:58:49select single select here is not going
- 5:58:51to make any difference but the only
- 5:58:52thing is even if I press with control
- 5:58:53it's going to keep the single value but
- 5:58:56if you go ahead and do a single select
- 5:58:57here let's say on the this kind of
- 5:58:59visual which is drop down or tile what
- 5:59:01would happen so what we let's do one
- 5:59:03thing let's have one more here make it a
- 5:59:06littleit small let's adjust the brand
- 5:59:09here and let me do one thing let's
- 5:59:11create little bit more space deleting
- 5:59:13this
- 5:59:14visual your brand let's duplicate this
- 5:59:17copy paste and let's create a little bit
- 5:59:20bigger visual here and this I'm going to
- 5:59:22bring in from other dimension so let me
- 5:59:24bring in state here I removed everything
- 5:59:26and now I'm going to drag State and
- 5:59:29definitely because the previous property
- 5:59:30it retained it dropped down I'm going to
- 5:59:32change it to Vertical list what happens
- 5:59:34when I make them single select what is
- 5:59:35the difference so here we don't see any
- 5:59:37difference because even if we click with
- 5:59:39control click the only thing is
- 5:59:40selecting one value the look and feel is
- 5:59:42having no difference when I go to drop
- 5:59:44down so this is right now my drop down
- 5:59:46and if I go to the selection and make it
- 5:59:48as single select on you can see it
- 5:59:52becomes radio buttons it becomes radio
- 5:59:54button and there is only one value you
- 5:59:57can uh select so if you want to select
- 5:59:59mult all and single select brand then
- 6:00:02you can watch my video Single select
- 6:00:03with all that will help now what I'm
- 6:00:05going to do is I'm going to switch off
- 6:00:07the single select and I'll go to the
- 6:00:10brand Visual and now here I'll make it
- 6:00:12as a single select as on and once I make
- 6:00:15the single select on you can see that
- 6:00:17this is how it looks like so the
- 6:00:18vertical list and
- 6:00:21the drop down has similar kind of
- 6:00:23feature we I'm again going to make it as
- 6:00:25a toggle of the single select off and
- 6:00:28these properties have changed over a
- 6:00:30period of time in last one year so those
- 6:00:32of you are watching the older videos and
- 6:00:33maybe think it's l bit different yes in
- 6:00:362023 we have lot of these UI changes lot
- 6:00:39of renaming has happened with the new
- 6:00:41format pan with the on object
- 6:00:43interactions the consolidation of the
- 6:00:45properties has happened in the different
- 6:00:46places so that's why you will see all
- 6:00:48these things with a little bit different
- 6:00:50name like we have this single select
- 6:00:51option now if I toggle this option I
- 6:00:53will not be able to see multi select
- 6:00:55option and select all option these are
- 6:00:57few of the changes which we have got as
- 6:01:00part of the
- 6:01:012023 before I tell you more about multi
- 6:01:04select let me case you how to use select
- 6:01:07all so I can enable the select all and
- 6:01:09in this state visual you can see now I
- 6:01:11have the select all option and once I
- 6:01:13click on the select to I will get all
- 6:01:16the values selected what I can also do
- 6:01:19is I can click on select all and it will
- 6:01:22uncheck all the
- 6:01:24values in the same manner I can go to
- 6:01:27the brand slicer and again there I will
- 6:01:29be enabling to select all once I enable
- 6:01:33the select all it will be start showing
- 6:01:36me select all option inside the brand
- 6:01:39and I can check and uncheck all the
- 6:01:42values using the select
- 6:01:44all
- 6:01:46and how do I erase the values so let me
- 6:01:49make it a little bit bigger so if you
- 6:01:51are not using slicer header then you
- 6:01:53will not get this erase option see if I
- 6:01:56want to erase if I have slicer header
- 6:01:58then I'll get so the disadvantage of not
- 6:02:01having this slicer header is that you
- 6:02:02will not get it title is not going to be
- 6:02:04a great option for us header seems to be
- 6:02:06better option because we got a eraser
- 6:02:08button we know the title is not a better
- 6:02:09option so I remove the title and now I
- 6:02:11if I select more than one values with
- 6:02:13control and then I can erase it so I can
- 6:02:16clear it off so that's the advantage of
- 6:02:18having the slicer header there is one
- 6:02:20option which we have not discussed and
- 6:02:21that was multi select with control and
- 6:02:25this is not visible completely so I can
- 6:02:26make it a little bit larger so you can
- 6:02:28see this so multi select with control is
- 6:02:30the property which um if I disable it
- 6:02:34which is right now on then what would
- 6:02:36happen is basically if I now select I'm
- 6:02:38not I have not pressed control but still
- 6:02:40I'm able to do multiple selection if I
- 6:02:42don't want to select anything then I
- 6:02:45have to either press select all and
- 6:02:46unselect all or when I selected multiple
- 6:02:49venue I can use eraser
- 6:02:50button come back and erase all the
- 6:02:53values so same way you can have this
- 6:02:56multi select here again we have to
- 6:02:58enable the slicer header if you need the
- 6:03:00Eraser so I enabled the slicer header
- 6:03:03and then I can enable this one and I and
- 6:03:05disable the title now I can select
- 6:03:09multiple values without pressing control
- 6:03:10and use the Eraser button to remove all
- 6:03:12the
- 6:03:14values but otherwise if you select let's
- 6:03:16say if I selected these three values now
- 6:03:18if I press control I continue to select
- 6:03:21the same number of value so I click
- 6:03:23again on that value to uncheck it so in
- 6:03:25powerb typically the selection is when
- 6:03:27you click first time it get checked and
- 6:03:29when you click on second time it get
- 6:03:30unchecked so in this manner you will be
- 6:03:34able to check uncheck value and had
- 6:03:35different kind of styles options on the
- 6:03:39slicer now let's look at the other
- 6:03:41properties like you have the Border
- 6:03:42background padding icons all those
- 6:03:44things you have adding icons and
- 6:03:46background and values so now let's go to
- 6:03:48the values let's check what options we
- 6:03:50have in the values by clicking on this
- 6:03:51state so that everything is we have a
- 6:03:53bold value we have italic we have
- 6:03:54underline if you want those we can
- 6:03:56change the color but I do usually don't
- 6:03:58prefer it because I would prefer these
- 6:04:00things to change by theme uh there's a
- 6:04:02border option so you can have a border
- 6:04:04top bottom right if you want you know
- 6:04:07values to have a border then you can
- 6:04:09have it top you want you can on the top
- 6:04:11left you want you can have that right
- 6:04:13you want you can have or you can have
- 6:04:14all of them then you can choose the
- 6:04:16color for the border and then you can
- 6:04:17have background right now there's no
- 6:04:18background but I can go ahead and put a
- 6:04:20background if you need it or we can
- 6:04:23simply give a white background or we can
- 6:04:26say reset to default so it will go back
- 6:04:28to the original value now this is what
- 6:04:31we had when we have one value let me go
- 6:04:34back and bring in the build a visual we
- 6:04:37can have this slicer having more than
- 6:04:39one Fields also let me bring in city
- 6:04:43that's where we start calling it heral
- 6:04:45slicer so now you have the hierarchy and
- 6:04:49you can open it and you can see the
- 6:04:50multiple values now I can either select
- 6:04:53the complete State like this or I can
- 6:04:55open like the California I can open and
- 6:04:58then I can select individual value from
- 6:04:59the California so both is possible and
- 6:05:01based on that it will work now remember
- 6:05:03we
- 6:05:04have check the option select with
- 6:05:06control so that is why the moment I'm
- 6:05:08clicking it is selecting multiple values
- 6:05:10and this is useful when you have the
- 6:05:13related values and you say okay if I
- 6:05:14select state I want to select all the
- 6:05:16cities this gives you flexibility to
- 6:05:18have more than one into one slicer
- 6:05:20instead of having dependent slicer you
- 6:05:22can have this so typically what happens
- 6:05:24is usually people say I want slicer one
- 6:05:26to filter slicers to definitely if they
- 6:05:29are from the same Dimension slicer one
- 6:05:31do filter the slicer 2 but in this case
- 6:05:34you have the values inside the the
- 6:05:35second one so you have a better control
- 6:05:37over it let me show you that example
- 6:05:39where slicer one will the slicer 2 so
- 6:05:41contrl C control V copy pasted it and
- 6:05:44I'm going to remove state from this
- 6:05:46slicer and let me go ahead here check
- 6:05:51all and let me click only on Alaska so
- 6:05:53City slicer is getting filtered by the
- 6:05:55state slicer which is city state and I
- 6:05:57can remove City from here now you see
- 6:06:00only Alaska is selected and Alaska do
- 6:06:02filtering the cities which we have now
- 6:06:04Arizona is also giving Arizona City here
- 6:06:06so slicer do filter each other when they
- 6:06:08belong from the same table but if you
- 6:06:10want that I I want one values inside
- 6:06:13another one like a hery then you can
- 6:06:15drag both of them into the one Visual
- 6:06:17and then you have that kind of a tap
- 6:06:19down selection which you can do and you
- 6:06:21can select the complete state or you can
- 6:06:22select single cities and pretty useful
- 6:06:24especially when you have the month year
- 6:06:27quarter all those things it is really
- 6:06:29useful now what we have seen till now in
- 6:06:33the slices was only the categorical
- 6:06:36slicer let now let me remove this city
- 6:06:38slicer and let me make space for the
- 6:06:41date slicers I go to the sales table I
- 6:06:44bring in sales date here and it created
- 6:06:47a table visual automatically let me
- 6:06:49click on the slicer the moment I click
- 6:06:51on the slicer because this is date is
- 6:06:54having the her is created the Hier
- 6:06:56slicer for me and as usual I can you
- 6:06:59know do those kind of selection which is
- 6:07:01month year quarter and I can either
- 6:07:03select let's say quarter q1 2018 I don't
- 6:07:05have data I have data in Q4 of 2018 so I
- 6:07:08can click there and can get some data
- 6:07:11now here we know date because right now
- 6:07:14it's getting hery and once we connect it
- 6:07:15with date table it will not get later on
- 6:07:18but we have an option where instead of
- 6:07:20date hery we can actually go ahead and
- 6:07:21say that we don't want to use the date
- 6:07:24hery we actually want to use the sales
- 6:07:26date itself it created this list visual
- 6:07:29but there are more options now so I'll
- 6:07:31open the format now again and let me
- 6:07:34close few of them so it's still remain
- 6:07:36bigger now if I go to the slicer
- 6:07:38settings you have vertical list tile but
- 6:07:42there are new options like between can
- 6:07:44have date range
- 6:07:45between we can have before before this
- 6:07:48date so anything before three 0 2020 now
- 6:07:53I have all the data before that but what
- 6:07:55I can do here is basically I can go
- 6:07:56ahead and ose this data and as you can
- 6:07:58see little bit change in the data is
- 6:08:00there there and if I scroll the more the
- 6:08:03lesser the values are coming
- 6:08:07similarly I have the after
- 6:08:09slicer we have the drop down we the very
- 6:08:12important thing which we have the date
- 6:08:14other than the drop down is relative
- 6:08:16date slicer you can say last one day
- 6:08:20month year now my data is ending in
- 6:08:232020 so if even if I say one year it's
- 6:08:25not going to come out and it is always
- 6:08:27run based on today so I let I have to
- 6:08:28say use three years in last 3 years I
- 6:08:31don't have anything in last 3 years also
- 6:08:33four years I have something last 4 years
- 6:08:36from and look at the date based on the
- 6:08:39date it calculated those last four years
- 6:08:42the relative date so relative when you
- 6:08:44go to this relative slicer when you
- 6:08:46drill down to the year then there is an
- 6:08:48option relative year or the calendar
- 6:08:50year so now when I say calendar year you
- 6:08:52can see the complete 2019 is coming when
- 6:08:54I said relative it actually the rolling
- 6:08:56four years which has come so in this
- 6:08:58manner you can use relative date slices
- 6:09:00also so you have option for days weeks
- 6:09:03months quarter year and all those so
- 6:09:05definitely it can help you like when you
- 6:09:07say I need month calendar rolling four
- 6:09:10months for the calendar or let's say
- 6:09:12last 1
- 6:09:13month now this is last one month but you
- 6:09:16have option here next the next one month
- 6:09:19and then you have this when you use this
- 6:09:22there is a little bit different option
- 6:09:23from next because you don't have the
- 6:09:24calendar and this one differently this
- 6:09:27is the reality so we only have the month
- 6:09:30or day so this day this week this month
- 6:09:32this quarter this year so you you can
- 6:09:34use this and this is one of the best
- 6:09:36options you can have in the date slicer
- 6:09:38remember one of the problem with the
- 6:09:41slicers that we cannot
- 6:09:44default it based on a function means if
- 6:09:47you ask me can you default it on today I
- 6:09:49can't do
- 6:09:50it there's no option actually can you
- 6:09:54default it on the first value no I don't
- 6:09:56have any option you have seen the
- 6:09:57properties we don't have any option
- 6:09:58let's go to the values even we don't
- 6:09:59have an option here we do have an anchor
- 6:10:02date option here we we don't have an
- 6:10:04option here also in the values where it
- 6:10:06can default using some major or a
- 6:10:10function so relative date slicer can
- 6:10:12help it you can initialize it on last
- 6:10:15one month this month last week this day
- 6:10:17this year this is one way and it will
- 6:10:20automatically keep on changing and this
- 6:10:21is really helpful but if you want to
- 6:10:24save it on Max month on Max this and
- 6:10:26that that's not good so best way in case
- 6:10:30you wanted to save it on the this month
- 6:10:33last month this year last year calendar
- 6:10:35year or relative year you have to use
- 6:10:38relative date slicer that's going to
- 6:10:39give you that flexibility to save it if
- 6:10:42you don't want to use it then we have to
- 6:10:44create a column which is going to give
- 6:10:47us values like today this month next
- 6:10:49month and using that we have to
- 6:10:50initialize which we will learn little
- 6:10:52bit later when we create the date table
- 6:10:55so you have the
- 6:10:56slicers you know the different kind of
- 6:10:58slicer and also you know the challenges
- 6:11:01with default value and how relative date
- 6:11:03can help here now there there are
- 6:11:05certain time when you will have
- 6:11:06challenges when you select certain value
- 6:11:08and the value is not there can you
- 6:11:10select the first value no it doesn't
- 6:11:12happen like that so first value
- 6:11:14selection last value selection little
- 6:11:16bit more Dynamic default value selection
- 6:11:19for the slicer is not available as of
- 6:11:21now we may see these kind of future very
- 6:11:23soon for the number slicers if you want
- 6:11:25to create a number slicer you also will
- 6:11:27get a between and all those options so
- 6:11:29let me quickly show you a number slicer
- 6:11:32and so let me go here and and bring in I
- 6:11:36have quantities which are only three in
- 6:11:39number and not
- 6:11:41getting okay and let me create make it
- 6:11:44as a slicer so I go to build a visual I
- 6:11:46make it slicer I have only three values
- 6:11:48It Is by default created a between
- 6:11:50slicer then I can have the less than
- 6:11:52quantity or equal to quantity greater
- 6:11:54than quantity so I can say Quantity
- 6:11:56greater than one I can say consider only
- 6:11:59those rows where quantity is greater
- 6:12:00than two the values are changing so we
- 6:12:02have between before and after for this
- 6:12:04one
- 6:12:06so number slicer date range slicer
- 6:12:08categorical slicer same slicer going to
- 6:12:12work for all of them you just need to
- 6:12:13change few
- 6:12:15property we will now discuss the uh new
- 6:12:22slicer so new slicer is available either
- 6:12:24in the insert
- 6:12:26menu under the slicer option or in the
- 6:12:30build visual it is also
- 6:12:33available I have enabled the build
- 6:12:35visual now it was not uh enabled so I
- 6:12:38enabled the build Visual and inside the
- 6:12:39build visual this is the ler new new
- 6:12:43slicer which we are going to explore
- 6:12:46powerbi has changed a lot over last one
- 6:12:49year the new slicer has been renamed as
- 6:12:53tile slicer over the course of time you
- 6:12:58can find it along with other new slices
- 6:13:02on the build window you will see tile
- 6:13:05slicer text slicer and the list slicer
- 6:13:09text slicer and list slicer are added
- 6:13:12little later after this video has been
- 6:13:15recorded but we will cover them little
- 6:13:18later so let me add a new page let me
- 6:13:22close the reasons which are not
- 6:13:27needed and in this visual first of all
- 6:13:30I'll add the new
- 6:13:31slicer now in the new slicer I'll need
- 6:13:34the column so I can go to
- 6:13:37the add data I can press the button add
- 6:13:40in the add data and I can
- 6:13:42add want to add
- 6:13:44brand and the moment I add the brand it
- 6:13:47gives me buttons for the brands like
- 6:13:50this now by default it's giv me a 3X3
- 6:13:54kind of a matrix I can
- 6:13:57goer by clicking on
- 6:14:00the format more options I can play
- 6:14:03around with size as you already played
- 6:14:05around padding border visual border and
- 6:14:08Shadow are common one we can give a
- 6:14:10title if
- 6:14:11needed so title is already available as
- 6:14:14a brand and then we have the conditional
- 6:14:16formatting available for color and
- 6:14:18background title can be aligned we can
- 6:14:21have a subtitle divider and spacing this
- 6:14:23is same for all those and we go to the
- 6:14:25slicer setting we have option for single
- 6:14:27select select all option you want to
- 6:14:29select all option that is also available
- 6:14:31here so those options are available
- 6:14:33we'll see when we want to use the select
- 6:14:35all option and in the shape we right now
- 6:14:37it's a rectangular shape but we can have
- 6:14:39rounded rectangular shape like this so
- 6:14:42they are now rounded rounded
- 6:14:44rectangles then rounded Corner we can
- 6:14:47remove the little bit of rounding by
- 6:14:49making it less or you can have custom
- 6:14:50style means you will be able to decide
- 6:14:53how much the top corner should be like
- 6:14:55if I make top Corner round little bit
- 6:14:58you can observe
- 6:15:00here then this is top left corner then I
- 6:15:04can have top right
- 6:15:05corner now you can observe here in this
- 6:15:08manner I can control but actually I
- 6:15:10don't want to do individually so I'll
- 6:15:12keep it like customize option off and
- 6:15:15I'll keep rounded rectangle and then we
- 6:15:18have the tab both top all those options
- 6:15:20are available we can play around with
- 6:15:22that now we go to the layout this is
- 6:15:24important one right why we are seeing
- 6:15:26this 3x3 because we have three rows and
- 6:15:28three columns the max number which you
- 6:15:30can give here is 10 so you can have 10
- 6:15:33rows
- 6:15:35or you can have 10
- 6:15:37columns what I'm going to do is I'm
- 6:15:39going to say row is
- 6:15:40one I'll have columns as 10 now let me
- 6:15:44try because I have 13 Brands so can I
- 6:15:46give let's say 15 you can't give 15
- 6:15:48let's try 11 you can't give 11 so you
- 6:15:51can maximum have 10 after 10 there would
- 6:15:53be a pagination for overflow so you can
- 6:15:55have continuous scroll means you can
- 6:15:57have a scroll or you can have the
- 6:16:00paginated I will make it
- 6:16:02paginated you want vertical means this
- 6:16:05Arrow would be here you can see there is
- 6:16:07an arrow here I when I went down and if
- 6:16:10I went up there's a
- 6:16:13down so I can keep it horizontal because
- 6:16:16I'm keeping it like this then I can make
- 6:16:18it little bit smaller like this
- 6:16:21now brand header look title looks little
- 6:16:25bit bigger so we can make it little
- 6:16:27smaller now usually I don't change the
- 6:16:29font as I told you in the past but in
- 6:16:32this case I'm manually changing it or
- 6:16:35maybe I'll just switch off the title I
- 6:16:37don't need a title actually so I'm I
- 6:16:40have removed my title so now these this
- 6:16:41is my brand now what I can do is let's
- 6:16:44create a visual and we can copy paste
- 6:16:46one visual from the other pages so we go
- 6:16:48to the slicer page and from there we
- 6:16:51copy this visual contrl C come to this
- 6:16:53page contrl V now if I filter brand one
- 6:16:56I'll get brand one you can click on any
- 6:16:59of the brands now let's go to the lier
- 6:17:03setting and single select is by default
- 6:17:05on I'm going to switch it off and I'll
- 6:17:07also add show all so now with the
- 6:17:09control click I'm able to select
- 6:17:11multiple and I can say select all also I
- 6:17:15say select all it is all selection is
- 6:17:17there and in this visual we have lot of
- 6:17:19settings around you know H selection and
- 6:17:21all those so when you go to the buttons
- 6:17:23here way down you have the default
- 6:17:26setting you have the H setting you have
- 6:17:28the Press setting you the selected
- 6:17:29settings so you have so many settings
- 6:17:30out here we we can do those settings
- 6:17:33then you have the call out value Val so
- 6:17:35call out values is by default default
- 6:17:37I'll change the color so that you can
- 6:17:39know which what one what is call this is
- 6:17:41the call out value the value which is in
- 6:17:43the middle is the call out value I'll
- 6:17:46and the best way to do is and then I can
- 6:17:48make it middle align so you can again
- 6:17:49see the difference here let me do the
- 6:17:51alignment little bit here so that you
- 6:17:53are able to
- 6:17:54differentiate now pay attention the
- 6:17:56small small adjustment are there when I
- 6:17:57change the alignment unit of display I'm
- 6:18:00keeping as whatever it is and then show
- 6:18:02blank as hyphen iph there is a blank
- 6:18:05value and then there is a label option I
- 6:18:07can switch it on and I can add another
- 6:18:09column let's say I want to add
- 6:18:12category so you can have little bit more
- 6:18:16information in these buttons you can
- 6:18:17have additional values so this is one
- 6:18:21option now we will remove this option
- 6:18:24label right now we don't want a label
- 6:18:26and I switch it off so that it doesn't
- 6:18:28take even a space now the option which I
- 6:18:31want to explore is images the default
- 6:18:34stage over stage selected stage we can
- 6:18:36have different different places where we
- 6:18:37can do this we can say add images field
- 6:18:41here we can use a field for images now I
- 6:18:43need to build a field because I don't
- 6:18:45have but what I've done for this is
- 6:18:46basically I have created few Mage which
- 6:18:49Ive loaded to my GitHub account I won't
- 6:18:50like to show you that
- 6:18:54first so in my GitHub account I have
- 6:18:56this icon folder where I've created few
- 6:18:58icons which is 1 2 3 4 5 6 7 8 9 10 11
- 6:19:02the these are just numbers and I also
- 6:19:04created few images here so I have brand
- 6:19:07images which is from B1 to
- 6:19:10B16 then I have category images which is
- 6:19:1213 then I have few human images also
- 6:19:16which are faces we can use for customer
- 6:19:18so I'm give you the link and you will be
- 6:19:20able to use it so what I'm going to do
- 6:19:22here is I will go to brand and this is
- 6:19:24known as B1 B2 B3 so I can go to any one
- 6:19:26of these you can copy this and replace
- 6:19:29the blob with the raw go here and you
- 6:19:32replace blob with the draw and if you
- 6:19:36open the you will still be able to see
- 6:19:37the image I want to use this but
- 6:19:40understand one thing I want to make this
- 6:19:41little bit Dynamic so I'll tell you how
- 6:19:42to create such a column so I I'll go
- 6:19:46back to my powerbi and in powerbi I'll
- 6:19:48go to the table View and inside the
- 6:19:51table view I click on the item table the
- 6:19:54item table is already open I'll click on
- 6:19:56that and you have this option for new
- 6:19:58column under the table tool when you
- 6:20:01click on the table you get the table
- 6:20:02tool and inside that one you have an
- 6:20:04option new column I'll click on the new
- 6:20:07column and I'll call this column as
- 6:20:09brand
- 6:20:12URL now in the brand URL I'll give this
- 6:20:14URL but it would be same I want the
- 6:20:17after B the changes should happen so I
- 6:20:19close my string at after
- 6:20:21B now I don't want this one coming from
- 6:20:25my image I want it Dynamic so between
- 6:20:28the two strings I can concatenate by
- 6:20:31them M perent but from where I'll get 1
- 6:20:332 3 4 5 6 I put 2 m% and between the 2
- 6:20:36m% I can again create one more and I'll
- 6:20:39here I'll take brand ID so what would
- 6:20:41happen with B without space brand ID
- 6:20:44ment again concatenating the string ment
- 6:20:46concatenate the strings do PNG now let's
- 6:20:50see what we get so we got a URL here and
- 6:20:54this URL should work similarly I can
- 6:20:57create a category URL we have category
- 6:20:59C1 C2 C3 and the folder name is also
- 6:21:01different there but let me go ahead and
- 6:21:03add a new
- 6:21:05column paste this and let me call
- 6:21:08it category
- 6:21:12URL I'll do some changes here first of
- 6:21:16all this is not brand this is category
- 6:21:18and this is
- 6:21:19C same way I can develop a logic for
- 6:21:22human for customer I only have 20 images
- 6:21:26so you may have to develop some logic
- 6:21:27that you keep on using those 20 images
- 6:21:30these cannot be brand ID here I need to
- 6:21:33put category ID
- 6:21:36so these are my two URLs so now this is
- 6:21:39category C1 C2 C3 C4 and this is brand
- 6:21:42URL now for both these column what we
- 6:21:44have to do is click on the column in the
- 6:21:46data category you have to call it as
- 6:21:48image
- 6:21:50URL this is image URL okay same way for
- 6:21:54category click on category Ur and into
- 6:21:56the column tools you should get column
- 6:21:58tools and inside the column tools go
- 6:22:00ahead and change this data category to
- 6:22:03image UR
- 6:22:05both of them are now image Ur now let's
- 6:22:07go back to our visualization we got the
- 6:22:08images inside the image field I'll click
- 6:22:10on add
- 6:22:12data item and I'll click on brand URL
- 6:22:17now you can see images here now we need
- 6:22:19to do a little bit of adjustment I'll
- 6:22:21I'll make I made it little bit larger
- 6:22:23but I can go ahead and decide the
- 6:22:26transparency saturation blur
- 6:22:29position position could be
- 6:22:32left position could be right
- 6:22:35and we need a different kind of slicer
- 6:22:37for that so this we will keep top or
- 6:22:39bottom only set as background we can set
- 6:22:41it as a background so this is setting
- 6:22:43for the default one you can change the
- 6:22:45setting for the hover pressed or
- 6:22:48selected you can change those things
- 6:22:50settings but I'll keep it default what I
- 6:22:52would like to do now is I would like to
- 6:22:54add another slicer so I'll add a new
- 6:22:56slicer here and in this slicer the new
- 6:22:59slicer I'll make it little bit vertical
- 6:23:01after I add the column so in this one
- 6:23:03I'm going to use add data I'll go to
- 6:23:07item and I'll add
- 6:23:09category I have the categories the
- 6:23:11settings which I want here is basically
- 6:23:13I'll go to the slicer settings uh I
- 6:23:15don't want single select I want multiple
- 6:23:17select I don't want show all option and
- 6:23:18I'll let you know why I don't want the
- 6:23:20show all option I go to the shapes I
- 6:23:23would like it little bit rounded so
- 6:23:24rounded rectangles and I'll I'll reduce
- 6:23:27it to it's say 15 I don't want to round
- 6:23:30it one also no custom option layout I'll
- 6:23:33go in here I'll say five rows and I
- 6:23:36don't want too many columns I only want
- 6:23:38one column space between the card I'm
- 6:23:40going to reduce little
- 6:23:42bit then overflow is continuous scroll
- 6:23:45no I want pagination and vertical
- 6:23:47pagination or horizontal let's keep it
- 6:23:50horizontal so right now we don't have
- 6:23:54any kind of overflow so we can keep it
- 6:23:56scroll also continuous scroll there's no
- 6:23:58need basically we have given the five
- 6:24:01now we'll go to the call out values
- 6:24:02we'll keep call out values as is as of
- 6:24:04now let's go down and in
- 6:24:07label if you want the label we can
- 6:24:10enable but label what happens you can
- 6:24:12add additional field which we don't want
- 6:24:13here we don't want subcategory or
- 6:24:15something like that I'll go to images
- 6:24:17and here I want to add an image so I'll
- 6:24:19use
- 6:24:20add data and inside the data I'll go to
- 6:24:24item and I'll use category now I got the
- 6:24:26categories here this is first category
- 6:24:28why it is first C we actually need a
- 6:24:29major but we are using a column so we
- 6:24:32can only use First
- 6:24:34I'll do a little bit of adjustment and
- 6:24:36now what could happen basically here is
- 6:24:38actually might not need values like
- 6:24:40category 1 2 3 4 5 in your organization
- 6:24:43it might be possible but looking at the
- 6:24:44color of the brand or let's looking at
- 6:24:46the logo you are able to decide and that
- 6:24:48is the use case I want here so I
- 6:24:50actually want to switch off the values
- 6:24:52now there are only icon this is category
- 6:24:541 this is Category 2 Category 3 this is
- 6:24:56category 4 Category 5 this is what I
- 6:25:00want so I with the logo itself I'm able
- 6:25:04to to decide I'll go down the button
- 6:25:06properties now let's look at button
- 6:25:07properties fault H pressed and selected
- 6:25:10values we can do different different
- 6:25:11settings right I I'll keep it on default
- 6:25:14padding you want white padding narrow
- 6:25:16padding we can use narrow paddings
- 6:25:18border I don't like but border on this
- 6:25:20button at least I don't want a border so
- 6:25:22I'll remove border these images are good
- 6:25:23enough we come to Shadow let's have a
- 6:25:25little bit of Shadow here but the
- 6:25:28challenge with the shadow if you want to
- 6:25:30have Shadow here it takes a lot of space
- 6:25:32and then you have outside or inside
- 6:25:34Shadow based on that it is going to give
- 6:25:36you the shadow so while the option is
- 6:25:39pretty good but because I need a lot of
- 6:25:41space I'm not going to use the shadow
- 6:25:42option glow is another the Shadow and
- 6:25:44glow options are something which
- 6:25:46actually require a little bit of space
- 6:25:48and then you need to go ahead and you
- 6:25:50know choose the colors and all those
- 6:25:53so for that outside and inside is the
- 6:25:57option Center bottom center right top
- 6:26:00right and all those options are there
- 6:26:01for the glow disable that as ENT bar is
- 6:26:04one option where you will have a bar in
- 6:26:06front of it so every line you can see
- 6:26:09there's a bar this bar if you need then
- 6:26:11you can enable the ascent bar which
- 6:26:13which also I don't need and let me say
- 6:26:15reset to default so I I have reset it to
- 6:26:17default the only thing which I don't
- 6:26:18need is the Border in this manner now
- 6:26:20you can see that we have a different
- 6:26:22visual experience here we don't have
- 6:26:24even names and in this case we have the
- 6:26:29names and the selection is highlighting
- 6:26:31you might have this is actually multiple
- 6:26:34select we have to check and uncheck we
- 6:26:36can have select all it's all selected
- 6:26:37and deselect all and in this case you
- 6:26:39can only see a boundary basically very
- 6:26:42so when you use these kind of stuff
- 6:26:44maybe we would like to change more
- 6:26:46properties when it is selected so what
- 6:26:49you can do is here it is default when it
- 6:26:51is pressed do you want to do something
- 6:26:54okay so want to increase the
- 6:26:57transparency or you saturation something
- 6:27:00you want to do when it is press so let
- 6:27:02me increase the transparency and press
- 6:27:04now let me go ahead and press
- 6:27:08it then when it is selected so I'll go
- 6:27:11ahead and say saturation is less and
- 6:27:13then transparency is more saturation is
- 6:27:16less these are the seating in this press
- 6:27:18so now when it is pressed it looks
- 6:27:20little bit different so these kind of
- 6:27:21stuff can help you now when I'm
- 6:27:23selecting you can see the
- 6:27:25difference so these things especially
- 6:27:28when you are only dealing with the image
- 6:27:29you need that because so when it is text
- 6:27:32you will be able to identify because of
- 6:27:34the text highlighting but you need it
- 6:27:36when it is only image you need some kind
- 6:27:38of change in the Highlight as well as
- 6:27:41the saturation so that you can identify
- 6:27:45that there is a difference when we are
- 6:27:47selecting or pressing it so this new
- 6:27:50slicer allowing you to give a visual
- 6:27:53appealing experience and as you can see
- 6:27:56we can use images to make it be more
- 6:27:59intuitive let us now discuss the newly
- 6:28:01released feature of tech slicer Tech X
- 6:28:04slicer was released in November
- 6:28:072024 so let's jump onto the release
- 6:28:11notes this is the powerbi November 2024
- 6:28:15feature summary and then we scroll
- 6:28:18little down you will find inside the
- 6:28:21content we have a new visual the visual
- 6:28:24is texer and it came as a
- 6:28:27perview now let me click on that and
- 6:28:30we'll reach to the notes these are the
- 6:28:33notes of the new visual the text slicer
- 6:28:35introducing the new text slicer now
- 6:28:38available in our core visual Gallery
- 6:28:41this oneth brings the arrival of the new
- 6:28:43text Slicer in powerbi offering new
- 6:28:46possibilities for both users and
- 6:28:49organization how to enable you have to
- 6:28:52go to the options and setting options
- 6:28:54preview features and text slicer visual
- 6:28:57you have to enable it using that I'm
- 6:29:00going to Showcase you that setting the
- 6:29:02Tex slicer works by allowing user to
- 6:29:05input specific text that act as a filter
- 6:29:08targeting a design data feed by entering
- 6:29:11the design text into the slicer input
- 6:29:14box the slicer effectively Narrows down
- 6:29:16the data set to display only relevant
- 6:29:19information that contains the enter text
- 6:29:23the functionality is particularly
- 6:29:25helpful for handling large data set
- 6:29:27where quick and precise filtering is
- 6:29:30essential for Effective data analysis
- 6:29:32and presentation
- 6:29:34now how to create you will get this new
- 6:29:36text slice and you can drag it to the
- 6:29:38canvas to filter the data set add a
- 6:29:41field from the data model to the to the
- 6:29:43Field Val to establish the text slicer
- 6:29:46functionality allowing it to filter the
- 6:29:48data set based on the user input simply
- 6:29:51add text to the slicer input box select
- 6:29:54apply icon or press enter the slicer
- 6:29:57immediately filters the data had
- 6:29:59displaying the visual results the new
- 6:30:01text slicer introduced powerful
- 6:30:03customization filtering tool for powerbi
- 6:30:06improved user experience and unmatch
- 6:30:09customization so let's jump onto the
- 6:30:11powerbi to explore this feature out I'm
- 6:30:15here on the powerbi and before I explore
- 6:30:18that feature of text slicer let me
- 6:30:20showcase you how to enable this feature
- 6:30:23go to file options and setting options
- 6:30:28it will open a popup inside the preview
- 6:30:31feature when you scroll down you will
- 6:30:33see new text slicer visual feature you
- 6:30:35have to enable that click on okay if
- 6:30:38you're enabling it for first time as I
- 6:30:40already enabled I'm going to click on
- 6:30:42cancel you might have to open a new file
- 6:30:45or close and open the file to get this
- 6:30:48slicer inside your
- 6:30:51visualization I'm back onto the powerbi
- 6:30:54report View and let me add a page to use
- 6:30:57this visual so let me click on the plus
- 6:31:00button and here what I'm going to do is
- 6:31:02first of all let me create a a visual
- 6:31:04want to create a table visual brand wise
- 6:31:08net brand wise
- 6:31:11net let me converted into a table visual
- 6:31:15now I would like to add the text
- 6:31:18slicer here in the text lizer let me add
- 6:31:22the brand from the item into the fields
- 6:31:25by bringing the into the
- 6:31:27fields here let me type one and press
- 6:31:30enter and as you can see all the branch
- 6:31:33that contains one has been
- 6:31:37filtered I clicked inside and I'm now
- 6:31:40entering 11 and let me press enter now I
- 6:31:43am getting data only for Brand 11 or
- 6:31:46everything which contains 11 again go
- 6:31:49back and let's say WR 10 and let me
- 6:31:51click on this Arrow which is apply
- 6:31:54button I'm getting everything which
- 6:31:56contains 10 and in this case it is only
- 6:31:59brand 10 and we use nine and arrow
- 6:32:04apply I got brand n same way I can
- 6:32:07filter other things on the three dots
- 6:32:11you have the options like export data
- 6:32:13show as table Spotlight sorted sending
- 6:32:15descending and format you have a clear
- 6:32:18button to clear the selection you will
- 6:32:20get all the values now I would like to
- 6:32:23create a dependent slicer on this text
- 6:32:27slicer which will get filtered and based
- 6:32:30on that slicer I'm going to filter the
- 6:32:33table visual ual or other visuals let me
- 6:32:36add one more
- 6:32:38slicer let me add brand to the slicer
- 6:32:41and make it as a list
- 6:32:43slicer if I go ahead and try to filter
- 6:32:46one in the text slicer it will filter
- 6:32:50both cable visual as well as the brand
- 6:32:53list slicer but I only want it to filter
- 6:32:56the brand list slicer and based on that
- 6:32:58I want to filter the table visual for
- 6:33:01that we have to use edit interaction and
- 6:33:04feature or click on the any of the
- 6:33:06visuals and go to format enable edit
- 6:33:10interaction this case we have to disable
- 6:33:13brand text slicers interaction with all
- 6:33:16other visuals other than the brand list
- 6:33:21Slicer in this case there are only two
- 6:33:24but let me add few more so that you
- 6:33:26understand it better let me control C
- 6:33:28control V I create two visuals now this
- 6:33:31visual is filtering let me Al so change
- 6:33:34this visual to
- 6:33:36category let me disable B text slicers
- 6:33:39interaction with this new visual also
- 6:33:42brand Tex slicer as of now is only
- 6:33:45interacting with the brand list slicer
- 6:33:49and it is not interacting with any other
- 6:33:52visual on the page as of now so let me
- 6:33:56start playing around with this let me
- 6:33:58end two the TX slicer as of now is only
- 6:34:01filtering the brand list slicer and when
- 6:34:04I filter the value in the brand list
- 6:34:06slicer it is going to filter the other
- 6:34:08visuals in this manner I am able to
- 6:34:11create a dependency of a search on a
- 6:34:14slicer and then I'm able to use that
- 6:34:16particular slicer which is filtered by
- 6:34:19the search to filter my other visuals in
- 6:34:21this manner I able to create a search
- 6:34:24experience along with the list
- 6:34:28experience let me enter a value one and
- 6:34:31click on apply and once I do that I will
- 6:34:34only be seeing value which contains one
- 6:34:37in my brand values and using those
- 6:34:41values let's say I can select brand 10
- 6:34:43and 11 and that will filter my
- 6:34:45visualization so what is happening here
- 6:34:47is I am able to create of dependent
- 6:34:51slicer on my text slicer and then I'm
- 6:34:54able to use that dependent slicer to
- 6:34:57filter my values of all other visuals TX
- 6:35:00slicer as of now support only one f
- 6:35:04means either I can have brand or I can
- 6:35:06let's say drag category and once I drag
- 6:35:09category it will only filter category it
- 6:35:12cannot filter brand and category
- 6:35:14together so I can have one at a time in
- 6:35:17the past on the similar situation when I
- 6:35:19use the text filter which is a very
- 6:35:21similar slicer to the text slicer we
- 6:35:25have concatenated the values of all the
- 6:35:28columns of a table into one column and
- 6:35:31then we have used that particular column
- 6:35:33to fill filter the values I'll go to the
- 6:35:36table view I go to the item table and
- 6:35:38here I'll create a new column click on
- 6:35:41any of the column and you will get the
- 6:35:44column tools and inside the column tools
- 6:35:47click on new column once you click on
- 6:35:49the new column in this new column we can
- 6:35:52append multiple Columns of the item
- 6:35:55table into one column and then we can
- 6:35:59use that for filter so let's create an
- 6:36:02column appended
- 6:36:05column and here we can have
- 6:36:09brand
- 6:36:11m% is m%
- 6:36:15category
- 6:36:17m% is m per a now we got a combined
- 6:36:23string I could have added all the
- 6:36:25columns but right now just for
- 6:36:26Simplicity I added only few columns now
- 6:36:30let's go back and inside this text
- 6:36:33slicer instead of brand let's add that
- 6:36:36appended
- 6:36:40column and let me do one thing now let
- 6:36:42me enable the interaction this visual
- 6:36:45let me start filtering out now as you
- 6:36:48can see with the category one what it is
- 6:36:50all fitting I have added this new column
- 6:36:53A pend column Here and Now what I've
- 6:36:56also done is I have enabled the
- 6:36:58filtering on both the visuals and I'm
- 6:37:00going to remove this visual now I don't
- 6:37:02need this additional for understanding
- 6:37:04of this so let me remove this now let me
- 6:37:07start filtering let's say I enter a
- 6:37:09value let's say 10 when I enter 10 I see
- 6:37:13both brand 10 as well as brand 2 I'm
- 6:37:16seeing brand two because 10 can be
- 6:37:19anywhere it can be in brand it can be in
- 6:37:21item so in this case it is coming
- 6:37:23because of item we can add a new visual
- 6:37:26on item name and we can see that these
- 6:37:30are the items which are getting filtered
- 6:37:32because of 10 it may be anywhere in the
- 6:37:35string broad category or name
- 6:37:40anywhere in this manner you can work on
- 6:37:42multiple columns but that's still a work
- 6:37:44around hopefully I get supported with
- 6:37:48multiple columns will be able to use
- 6:37:50that so this is all about the new text
- 6:37:54prer why don't you go ahead and try that
- 6:37:57out
- 6:38:03now we will discuss about the list
- 6:38:05slicer the list slicer was released in
- 6:38:09October
- 6:38:112024 so first of all let's have a look
- 6:38:13at the release notes of October 2024 so
- 6:38:17I'm here on October 2024 release
- 6:38:23notes and if I scroll a little down I
- 6:38:26can see one of the feature is new list
- 6:38:29slicer and this is under
- 6:38:32preview so let's click on that and we'll
- 6:38:35reach to the feature so first of all we
- 6:38:38have to enable it so to enable it go to
- 6:38:41options and setting option preview
- 6:38:43feature and list slicer visual we have
- 6:38:45to enable it let's look at the release
- 6:38:48notes major enhancements are upcoming in
- 6:38:51the image support label additional
- 6:38:54conditional formatting option and
- 6:38:56improve default style specifically
- 6:38:58designed for erical layouts please note
- 6:39:02new visual is in the early development
- 6:39:05and we won't recommend using it in the
- 6:39:07production permanently however this is
- 6:39:10excellent opportunity to experience the
- 6:39:12capability of this new slicer provide us
- 6:39:15the feedback for the further Improvement
- 6:39:17so it is still in the preview feature
- 6:39:20the new list slicer can become hcal when
- 6:39:23more than one field is driv into the
- 6:39:25field data well this action will
- 6:39:28activate additional formatting settings
- 6:39:31specific to antical data some of the
- 6:39:34advanced new slicer level customization
- 6:39:37offering are selection shape layout
- 6:39:40overflow St style selection icon expand
- 6:39:44collaps icon and button style these are
- 6:39:47the few attributes which has been
- 6:39:49released with the new list slicer so why
- 6:39:52don't we go ahead and explore it out and
- 6:39:55for that I'm going to use N2 n12 file so
- 6:40:00I'm here on the N2 n12 file and I'm
- 6:40:03going to add a new page to explore this
- 6:40:05visual so the new slicer I have already
- 6:40:08added but let me tell you how I added it
- 6:40:11go to file options and
- 6:40:14setting
- 6:40:16options options and setting popup has
- 6:40:18now opened up inside that preview
- 6:40:20features and inside the preview feature
- 6:40:23you have to enable the list
- 6:40:26slicer and then you can click on okay so
- 6:40:30that you can use it some of the feature
- 6:40:32require restart so you might have to
- 6:40:34close and open your file again as I've
- 6:40:37already added I'm pressing on cancel so
- 6:40:40I'm back on my layout let me add the
- 6:40:43list slicer it looks like very similar
- 6:40:46to the normal slicer so let me doag item
- 6:40:49R and you can see there is a single
- 6:40:52select list which has been created here
- 6:40:55now let me do one thing before I go
- 6:40:57ahead and add certain additional stuff
- 6:41:00let me enable the format for it in case
- 6:41:02you are not able to see the format
- 6:41:04option on the right hand side to enable
- 6:41:06the format page you can get it from the
- 6:41:09view view
- 6:41:12format and then on the right hand side
- 6:41:14you have another format option once you
- 6:41:16click that you should be able to see the
- 6:41:18format page once you see the format pen
- 6:41:21you can start working on the properties
- 6:41:23if you're visually selected so we know
- 6:41:25the size and style very simple based on
- 6:41:28your location and the size they can
- 6:41:30change
- 6:41:34then we have the padding padding uh
- 6:41:37right now I would like to keep as is I
- 6:41:39don't want to change it background in
- 6:41:41case we want it to have a background
- 6:41:43color we can change it and if you change
- 6:41:45the color we need to make it a little
- 6:41:47less transparent so that we can see it
- 6:41:49but right now I don't need any
- 6:41:51background color so I'm going to disable
- 6:41:53it visual Border in case you need a
- 6:41:55border and if you want to have the
- 6:41:57Border you need to increase the light
- 6:41:59and come out of the visual there you can
- 6:42:02see the visual border
- 6:42:04again I don't need visual border so I'm
- 6:42:05disabling it in case you need Shadow for
- 6:42:08the visual you can enable it you can
- 6:42:10observe the
- 6:42:11shadow below the visual and then for the
- 6:42:14shadow we have various option like
- 6:42:16outside and outside where bottom right
- 6:42:19bottom bottom left right Etc again I
- 6:42:23don't need Shadow as of now so I'm going
- 6:42:25to disable it title we already have a
- 6:42:28title as brand but we can use a major in
- 6:42:31the title we can have different headings
- 6:42:34like heading 2 3 4 on normal right now I
- 6:42:37keep it as is we can have font color we
- 6:42:40can have font name size Bard italic
- 6:42:44underline and the text color for the
- 6:42:47title we can also have a background
- 6:42:49color for the title and the alignment we
- 6:42:51can keep it let's say cental align or
- 6:42:53the right align or left align Tex rep in
- 6:42:56case there is a bigger title it should
- 6:42:58wrap out every visual now can have a
- 6:43:00subtitle so we can have a subtitle if
- 6:43:03needed if we enable it we'll get
- 6:43:05additional space for subtitle then we
- 6:43:07can have a divider between the visual
- 6:43:09and the title subtitle right now I'm
- 6:43:12going to disable that also spacing
- 6:43:15customize spacing if you want to
- 6:43:17customize the spacing between the titter
- 6:43:19and the divider but right now I don't
- 6:43:23want to change it I can even reduce it
- 6:43:25further to save some space now comes the
- 6:43:28important slicer setting it is a single
- 6:43:30select slicer you can see the radio
- 6:43:32buttons I can make it multi- select by
- 6:43:35unchecking the single select and now I
- 6:43:37can select more than
- 6:43:40one now importantly this visualiz a show
- 6:43:43all so you will say that is there with
- 6:43:46the slicer when we have the multi select
- 6:43:49but even if I enable the single select I
- 6:43:52have the select all is this property
- 6:43:55only specific to this one or added to
- 6:43:57normal slicer let's check that out right
- 6:43:59away let's bring in the additional
- 6:44:01slicer the normal slicer put Brown
- 6:44:03inside it and let us see is that
- 6:44:06property also changed for this visual we
- 6:44:08go here to the slicer setting and we use
- 6:44:11select all and then we enable single
- 6:44:14select so you can see in the single
- 6:44:16select we don't see select all in the
- 6:44:19normal slicer but in the list slicer we
- 6:44:22have single select along with the select
- 6:44:24all so let me remove this normal slicer
- 6:44:27or the old slicer and we can now enjoy
- 6:44:30select all but does it work work to
- 6:44:34check that out let me create a visual
- 6:44:35brand
- 6:44:37wise net
- 6:44:39major now let me do select all
- 6:44:42everything is working let me deselect
- 6:44:44all brand one brand 10 Brand 11 brand 12
- 6:44:49one more thing which you might have
- 6:44:50noticed if I do select all and if I
- 6:44:52uncheck brand one only one is getting
- 6:44:54unselected so we have one deselection
- 6:44:57feature also here so these are some of
- 6:44:59the properties so let's go back to the
- 6:45:02format pan again of this
- 6:45:05slicer we are on the slicer settings so
- 6:45:08we have played around with that now we
- 6:45:10are very happy with the select all
- 6:45:12option also then here the shape
- 6:45:15rectangle shape rounded rectangle snip
- 6:45:18uh snip tab both these are the shapes
- 6:45:20which are available so I'm going to
- 6:45:22leave them as is I'm not want to chck
- 6:45:25but I would like to go to the layout
- 6:45:27layout is fixed number of button is on
- 6:45:30number of button sh is it and I can
- 6:45:32uncheck that it it creates a little
- 6:45:35compact UI space between the button if
- 6:45:38you want to increase the button space
- 6:45:39between the button you can do that but I
- 6:45:41think right now it is fine indentation
- 6:45:43now reverse
- 6:45:45indentation now this will play a little
- 6:45:47better role when we have more than one
- 6:45:50intend the butter container that also
- 6:45:52will play a little better role when we
- 6:45:54have more than one when we create the
- 6:45:56hercal slicer call out values the values
- 6:45:59which we have if you disable the call
- 6:46:01out value you not see anything we need
- 6:46:03to have the call out value it means
- 6:46:05these are the color for the values like
- 6:46:06brand one brand 10 so font size bold
- 6:46:11italic underline color transparency
- 6:46:14alignment like we can make them right
- 6:46:16align penter align left align all these
- 6:46:19properties are display unit is Auto and
- 6:46:22show values as blink and then we have
- 6:46:24the layout vertical
- 6:46:27alignments also there then we have a
- 6:46:29selection icon which we can enable or
- 6:46:31disable definitely we need the selection
- 6:46:34icon what happens if we don't have
- 6:46:35selection iton I click click on Brand 11
- 6:46:38Brand 11 selected brand 12 but I'm not
- 6:46:40able to see so better to have a
- 6:46:42selection icon then I have buttons this
- 6:46:45is also little important because the
- 6:46:48buttons are not visible unless you start
- 6:46:50grading a Bott once you have bot you can
- 6:46:52see the you know buttons then you can
- 6:46:55have fill or don't fill you can have a
- 6:46:58shadow you can have blow you can have
- 6:47:00Ascent bar on the buttons so with this
- 6:47:03property you can create a button land of
- 6:47:04a UI but definitely if you want to make
- 6:47:06it as a button then you need little more
- 6:47:08space for each one of
- 6:47:11them so if I want to let's say have
- 6:47:14Shadow now you can see if I made give it
- 6:47:17little more space then I can have the
- 6:47:19Shadow or you reduce the number of
- 6:47:21buttons then you can also have these
- 6:47:24things so I will disable that but these
- 6:47:26are the various property you can play
- 6:47:28around now let's take the next step by
- 6:47:31bringing in one more
- 6:47:33field to the slizer and let me bring in
- 6:47:36category once I bring in category you
- 6:47:38can see that I can open the arrow there
- 6:47:41will be nothing on the select on but for
- 6:47:43each brand I can have next level and I
- 6:47:46can do the right now it is single select
- 6:47:48we can switch off the single select to
- 6:47:50make it multi select that's one more
- 6:47:51change which has came in last one year
- 6:47:54where if you uncheck the single select
- 6:47:55it become multi- select so in this
- 6:47:57manner you have these properties and now
- 6:48:00you can play around the little more
- 6:48:01properties here on the layout and on the
- 6:48:05icon so especially expand icon now if I
- 6:48:08go here and play around expand icon I
- 6:48:12can go to the layout look at where is
- 6:48:14expand icon right now it is on left look
- 6:48:17at that Arrow now it is going to
- 6:48:21WR look at the icon
- 6:48:24here same way alignment we can play
- 6:48:27around THS and the spacing all these
- 6:48:32things we can play around with this list
- 6:48:35license some important properties have
- 6:48:37come in and powerbi is paying a lot of
- 6:48:40attention to the visual property so here
- 6:48:44what we are going to get is basically a
- 6:48:46new visual experience which with lot of
- 6:48:49properties which we can play around and
- 6:48:51make it suitable for our use case now we
- 6:48:54have quite a few kind of slicer we have
- 6:48:55a normal slicer the we have the list
- 6:48:58slicer which is previously known as the
- 6:49:00new slicer or the button slicer then we
- 6:49:03have text slicer and we also have the
- 6:49:06list slicer so why don't you go ahead
- 6:49:08and try the list slicer out we have
- 6:49:11learned slicers and we saw slicer apply
- 6:49:13on a page but in case of filter we do
- 6:49:15had an option where it can work on all
- 6:49:17the page and we have something very
- 6:49:19simiz sync slicer is a process in which
- 6:49:23we can sync a slicer on one page with a
- 6:49:27slicer on another page now usually We
- 6:49:31sync the slicer
- 6:49:33which is having the same name or the
- 6:49:35same table on the other page at little
- 6:49:38bit later I'll also show you a way where
- 6:49:41you can sync the slicer which do not
- 6:49:43belong to one table means the slicers
- 6:49:47are coming from two different tables and
- 6:49:49they can have two different names also
- 6:49:52but they are of same type like
- 6:49:55City so let me add this page and here
- 6:49:58there are certain slicer which are
- 6:49:59applied and I have this visual copy this
- 6:50:01visual need page two so can I can I get
- 6:50:04the category slic can I go ahead have a
- 6:50:06category slicer and if I filter
- 6:50:08something here can it do filter there on
- 6:50:11this first of all this is a single
- 6:50:12select kind of a slicer can I do that
- 6:50:14there's something known as s slicer
- 6:50:16there would be limitations what is
- 6:50:17happening on that select category two
- 6:50:19and if I go to this page is it going to
- 6:50:21be
- 6:50:22category so there are couple of ways to
- 6:50:25achieve syn slicer I'm going to tell you
- 6:50:28both of them so one of the way is from
- 6:50:31menu options where you go to the the
- 6:50:32menu and use the view Tab and there you
- 6:50:36have the syn slicer option that you can
- 6:50:38use and the second option is when you
- 6:50:40copy paste the slicer you do get an
- 6:50:43option to sync you have to click that
- 6:50:46option to sync and then it will get
- 6:50:48synced automatically so let's start with
- 6:50:50the first option and then there is a
- 6:50:52known as we have insert and in the
- 6:50:54insert we have we have View and inside
- 6:50:56view we have sync slicer so if I select
- 6:50:58this slicer it is telling me that I can
- 6:51:01sync it in the slicer and the page two
- 6:51:03we have View and inside view we have
- 6:51:05sync slicer so if I select this slicer
- 6:51:07it is telling me that I can sync it in
- 6:51:10the slicer and the page two let me do
- 6:51:12that so one option is think and second
- 6:51:15is visible I've done that now I go back
- 6:51:17to the Category 3 category 4 I come back
- 6:51:19on the page two I see only category 4
- 6:51:21enlarge it the slicer are getting other
- 6:51:23way and easier way to do this thing
- 6:51:25slicer is copy it contrl C and crl V it
- 6:51:28asked for saying slicer you I want now
- 6:51:30you can see that I select brand one I go
- 6:51:33here it is I'm able to sync the slicer
- 6:51:35Pages this is sync this is the old
- 6:51:37slicer and the copy paste or using the
- 6:51:40sync slicer paint which is available in
- 6:51:42the view we can do that but can we do it
- 6:51:45on the model new slicer where is our new
- 6:51:46slicer our new slicer and I do the same
- 6:51:48let me contrl c go to the page contrl V
- 6:51:51is asking for slicer brand 10 I filter a
- 6:51:54brand 10 here I go to the other slicer
- 6:51:56it should show brand 10 because they
- 6:51:57belong to the same table if I go to the
- 6:51:58new slicer page is also brand 10 so both
- 6:52:01the old slicer and the new slicer can be
- 6:52:05you think either by copy paste or using
- 6:52:07view think slicer only thing you have to
- 6:52:10do is click on a slicer know where it
- 6:52:12should be visible so in this manner can
- 6:52:14sync the slicer and then they can filter
- 6:52:16the data across the
- 6:52:18pages so now we would like to discuss a
- 6:52:21use case which is syn slicer across
- 6:52:24different fields and these different
- 6:52:27fields could be across two different
- 6:52:29tables columns so typically the SN
- 6:52:31slicer is for the same field so let's
- 6:52:34say if I have geography City on page one
- 6:52:36I have a geography City on page two I
- 6:52:38want to sync them but this case is a
- 6:52:41little different I want to sync the
- 6:52:43slicer which is across two tables let's
- 6:52:45say customer City and geography City I
- 6:52:48want to sync them they may not have even
- 6:52:50name a city they could be little
- 6:52:52different name so we want to sync slicer
- 6:52:55across two different field that's what
- 6:52:57the main objective is for this one what
- 6:52:59has happened that I have used a little
- 6:53:01different file that's very common file
- 6:53:04which I use for abstract thesis series
- 6:53:06the file at GitHub which you can also
- 6:53:09get from my GitHub account the file
- 6:53:12follows the same model which we are
- 6:53:13following in the learn power ba series
- 6:53:17you will be able to relate with the
- 6:53:19fields which I'm using in this art of
- 6:53:22the video also so how can we do that so
- 6:53:26to do that let's try that out on power
- 6:53:29ba file so let me open my power ba file
- 6:53:32so I'm here in my power ba file and I'm
- 6:53:36using the generic model which I'm using
- 6:53:38in most of my other videos so here I'm
- 6:53:41using my common sales model which I'm
- 6:53:44using for most of my videos and this
- 6:53:47model contains a sales table join with
- 6:53:50the date item customer and geography
- 6:53:53table one to many single directional
- 6:53:55join from Dimension to fact the same
- 6:53:58model we are going to continue here and
- 6:54:00here what we wanted to try out is is
- 6:54:03basically I would like to add let's say
- 6:54:06from the customer Dimension I have a
- 6:54:11city and let me convert this into a
- 6:54:16slicer I have a customer slicer City and
- 6:54:20I also would like to add a slicer from
- 6:54:23geography table which is city let me
- 6:54:26change this also to a
- 6:54:28slices so I have two slices which are
- 6:54:30basically on City on different one one
- 6:54:32is on geography City another one is on
- 6:54:35customer City so if I select one of them
- 6:54:37as you can see there is no impact on
- 6:54:40each other but if I go down and add
- 6:54:43let's say some Visual and in that visual
- 6:54:45I'll take data from item brand and and
- 6:54:50take a measure like
- 6:54:52net now if I select something let's say
- 6:54:56I select one of the city from here you
- 6:54:57can see the data is changing if I select
- 6:54:59another one from here you can see
- 6:55:01changes I select from both of them may
- 6:55:04not get any data because mostly these
- 6:55:06cities are kind of similar kind of City
- 6:55:09whether this is this page or let's say
- 6:55:11if I even duplicate this page they are
- 6:55:13on this page I would like to have sync
- 6:55:16slicer so I want to sync the slicer
- 6:55:19either on within the page or across the
- 6:55:22pages so how do I do that because if I
- 6:55:25select a value there is no way I can you
- 6:55:27know think with this and if I go to
- 6:55:30let's say View and if I I go to sync
- 6:55:33slicers as you can see I have do have
- 6:55:35option where I can sync it with other
- 6:55:37page but I don't seems to have an option
- 6:55:40where I can sync these different one
- 6:55:42with this as you can see I can see the
- 6:55:45slicer here there are two slicers which
- 6:55:47I can see across different pages which
- 6:55:49is visible this one city customer city
- 6:55:52as you can see it is highlighting that
- 6:55:54customer city is available in those
- 6:55:56pages and I can sync them by clicking on
- 6:55:59the value so if I do
- 6:56:01this if I sync it across the pages if I
- 6:56:04clicked on let's say Atlanta here and if
- 6:56:06I go to the duplicate page you can see
- 6:56:08that Atlanta
- 6:56:10values but how do I sync these two SES
- 6:56:14on the same page which are from
- 6:56:16different dimension let's look at the
- 6:56:19details of the sync slicers
- 6:56:21again in the syn slicer what I'm going
- 6:56:23to do here is I'm going to go to the
- 6:56:26Advance option I've unchecked the
- 6:56:27syncing right now I go to the advance so
- 6:56:30let me give it as a name City
- 6:56:32Dy so I've given it as a name c Dy and
- 6:56:36let me come to this slicer and also give
- 6:56:38it as a name c Dy now this is cdy and
- 6:56:42this is also cdy let me select one of
- 6:56:45these now you can see whatever values
- 6:56:47I'm selecting is also getting selected
- 6:56:50on the other
- 6:56:52slicer so now you can see that whatever
- 6:56:55value I'm selecting here on the first
- 6:56:57slicer is also getting selected on the
- 6:57:00second slicer so there from different
- 6:57:02dimension but I able to sync them now
- 6:57:05can I sync them across the page so what
- 6:57:07for that what we have to do is let's say
- 6:57:09this is the slicer here I go and here I
- 6:57:12so if I give the name as tore Dy it will
- 6:57:16also get sync so let's say if I select a
- 6:57:19value here check this value let me
- 6:57:21select a value Austin here go back to
- 6:57:23the first page you can see all these
- 6:57:26three slicer are now showing the atin
- 6:57:28value so I'm able to sync across page
- 6:57:32which I was able to do previously but
- 6:57:34across different dimension table or
- 6:57:37across different table columns I'm able
- 6:57:40to sync using syn slicer so the property
- 6:57:43is lying in the advance once you rename
- 6:57:45and give them a common name that is
- 6:57:48where you have an opportunity that you
- 6:57:50can syn slicer across tables with
- 6:57:53columns coming from two different tables
- 6:57:56so why don't you go ahead and try this
- 6:57:58out we will now try to create combo
- 6:58:01visuals combo visuals are the visual
- 6:58:03where we
- 6:58:04have basically either bar and line
- 6:58:07together or stagged bar and line
- 6:58:10together so couple of combo visuals are
- 6:58:12there uh they can be found here in the
- 6:58:15build visuals region or you can find
- 6:58:17them here now line visual we have
- 6:58:19already seen the secondary axis now the
- 6:58:22thing which you are going to get here is
- 6:58:24the secondary AIS and I'm going to start
- 6:58:25with the cluster column
- 6:58:28chart I bring in the cluster column
- 6:58:30chart and here on the xaxis let me bring
- 6:58:33in brand and on the y- axis let me bring
- 6:58:36in
- 6:58:40net now there is a line axis line Y axis
- 6:58:45now what I'm going to do first time I'm
- 6:58:46going to bring in Gross here
- 6:58:50and you will find that the there's a
- 6:58:52line y- axis but I did not get in a
- 6:58:55secondary Y axis if you see both of them
- 6:58:58get adjust yis there's no secondary y
- 6:59:01axis
- 6:59:02now this happens when you take the two
- 6:59:06variables which are having the similar
- 6:59:07kind of stuff it automatically put them
- 6:59:09on the same one now what happens if you
- 6:59:12need the secondary AIS I actually want
- 6:59:14it to have so you go to the visual
- 6:59:16format which is right now available here
- 6:59:18otherwise go and click on the three dots
- 6:59:20and format to get it in case you are not
- 6:59:22getting it now you are not getting a
- 6:59:24secondary Y axis we do see the property
- 6:59:26of the secondary Y axis here and you go
- 6:59:29and enable the values the moment you
- 6:59:31enable the the values start showing the
- 6:59:34secondary y AIS now because of kind of
- 6:59:37values you have there was no need of
- 6:59:38secondary ya axis it was not showing but
- 6:59:40you can enable it let me disable it and
- 6:59:42let me do one thing instead of gross let
- 6:59:44me try to bring in
- 6:59:46margin on the second line
- 6:59:50AIS now the moment I bring in margin
- 6:59:53percentage because I manually switched
- 6:59:55it off it's not showing me so I will
- 6:59:58switch it on and do but usually what
- 7:00:00happens is basically when you have the
- 7:00:03majors which are not of the same kind of
- 7:00:06a range it will show you the secondary
- 7:00:10yaxis automatically now what I'm going
- 7:00:12to do here is I'll going to play around
- 7:00:15few things and tell you what all you can
- 7:00:16do now this is one thing which you can
- 7:00:18have similarly you can even have a
- 7:00:22legend and along with the legend also it
- 7:00:24will work but Legend do not work for the
- 7:00:26line so if you want multiple lines you
- 7:00:29need to have multiple measures so like I
- 7:00:31have I have margin on the line axis I
- 7:00:33can have discount but the legend is not
- 7:00:36going to work if you're looking for a
- 7:00:38legend then it's not going to work on
- 7:00:41the secondary y AIS it is true across
- 7:00:44line
- 7:00:45chart line clustered column chart and
- 7:00:48line
- 7:00:49tagged column chart it's through across
- 7:00:52that so I'm going to remove it again
- 7:00:54same thing we have one more thing which
- 7:00:55we have done in the past instead of
- 7:00:57having it as a legend we can have it
- 7:01:00second AIS more than one and
- 7:01:02both are them in the expanded manner
- 7:01:04then also we can have it but again we
- 7:01:06have the lines based on the majors we
- 7:01:08know can't use legend for that now you
- 7:01:11have the lines U then again you can use
- 7:01:13different kind of formattings what we
- 7:01:15are going to do here is first of all um
- 7:01:18we will go to
- 7:01:19the below and the there is section for
- 7:01:22columns where we can do the formatting
- 7:01:23for the columns and then there is a
- 7:01:25section for the line where we can do the
- 7:01:26formatting for the line now because we
- 7:01:29are using only one to xais or we are not
- 7:01:32using any Legend there is only one major
- 7:01:34we get the FX option so that is again
- 7:01:38the what you are showing on the primary
- 7:01:40AIS even if you're showing the line on
- 7:01:41the primary AIS still if ideally there
- 7:01:44is this column contains one there's no
- 7:01:47Legend then you will be able to get the
- 7:01:49FX option means you can do conditional
- 7:01:51formatting now if you want border we can
- 7:01:53have the Border here I like to increase
- 7:01:56little bit transparency this is too
- 7:01:57darker so I actually wanted to increase
- 7:01:59a little bit transparency to look look
- 7:02:01and match the column color is something
- 7:02:03which I want to use I also want to
- 7:02:04increase the Border width so that it is
- 7:02:06little bit wider so these are some of
- 7:02:09the things we have done in the others
- 7:02:10also and then if required you can
- 7:02:13increase the space between categories so
- 7:02:14that they are little thinner bar you can
- 7:02:17use reset to default for a particular
- 7:02:19category to make it now series is we are
- 7:02:21talking about margin all or discount so
- 7:02:23if all what are the options you have is
- 7:02:25you can decide for both the lines
- 7:02:27whether you want solid or dotted now
- 7:02:28here I'm going to CH show you this line
- 7:02:32smooth and sted so now I'm going to make
- 7:02:33it smooth you see this is the smooth
- 7:02:35line and this is the property I've not
- 7:02:37shown you in the line visual because we
- 7:02:38had too many values there then you have
- 7:02:41the sted layout which is basically the
- 7:02:42step one so let's do one thing uh
- 7:02:44instead of all the series let's go to
- 7:02:46the margin percentage we have the margin
- 7:02:48percentage as the smooth
- 7:02:50line so we have one smooth line and when
- 7:02:52we have stepped line now width right now
- 7:02:55is three but I'm going to do one thing
- 7:02:57I'm going to go to markers enable it now
- 7:02:59both the lines are markers what I'm
- 7:03:01going to do here is I go to the margin
- 7:03:02percentage and let me see do I need
- 7:03:05disable no I need margin I need marker
- 7:03:07for margin percentage I don't need
- 7:03:09marker for the one the step layout so I
- 7:03:13removed
- 7:03:14the marker for the discount percentage
- 7:03:16so there is no marker for the discount
- 7:03:18percentage let me change it to margin
- 7:03:20percentage I keep the marker and I can
- 7:03:23have different kind of marker let me
- 7:03:24take a different kind of marker this
- 7:03:25time make it little bit bigger color I
- 7:03:28am fine with whatever color it has but
- 7:03:31what I'm going to do here is I will go
- 7:03:32up and right now already in the series I
- 7:03:35have margin
- 7:03:36percentage I go to the line and I make
- 7:03:40St as
- 7:03:41zero all the value is there now what we
- 7:03:44can do here is basically when we go to
- 7:03:46the data label and enable
- 7:03:48it now we have enabled for everything
- 7:03:52now one thing is that only for this dot
- 7:03:55this values is coming this percentage
- 7:03:57value is only for this dot you see
- 7:04:00carefully that for this dot the values
- 7:04:01is coming I can completely remove the
- 7:04:03marker also and keep the values also
- 7:04:05sometime we do that kind of hiding off
- 7:04:07line and just keeping the value let's
- 7:04:09say I'm showing net and I want to show
- 7:04:10the value of gross and I put a line of
- 7:04:13gross and then I just keep the values of
- 7:04:15gross and don't show anything on but I
- 7:04:18can see the de values and all the data
- 7:04:20level properties like title value this
- 7:04:22is basically major driven so basically
- 7:04:25what I happening these labels are major
- 7:04:27driven labels now everything which you
- 7:04:30want to do you can have a major me for
- 7:04:32title you can have measure for Value you
- 7:04:33can have measure for details so three
- 7:04:36things you can have like not everywhere
- 7:04:37I want to have titles so what I can do
- 7:04:39here is basically when I go to data
- 7:04:41label I can for the margin
- 7:04:43percentage I wanted to have a title also
- 7:04:48for margin percentage I have title in
- 7:04:50the single line right now it is there if
- 7:04:52you remember the property we have here
- 7:04:54is when we go Below in the layout we can
- 7:04:58decide whether it's a single line or
- 7:04:59multi-line I can make it multi-line
- 7:05:02uh now I'm as of now I'm only doing it
- 7:05:04for Discount I can do it for all of them
- 7:05:07in this manner we can do those changes
- 7:05:09so this is our bar and line let me call
- 7:05:13it with the simpler
- 7:05:15name and let me duplicate
- 7:05:17this same way what I can do is I can
- 7:05:20click on this and convert it into staged
- 7:05:23bar and line now when I convert it you
- 7:05:26will might see only small difference
- 7:05:28nothing much has changed but the things
- 7:05:30will change the moment I bring in
- 7:05:31category
- 7:05:33here once I bring in the legend now you
- 7:05:36can see the Legends also here and then
- 7:05:40as usual on the column values you have
- 7:05:43this thought order
- 7:05:46reversal and you can have the space
- 7:05:49between the
- 7:05:50serieses now for line we
- 7:05:54have markers and everything so you can
- 7:05:57play around with the data label if you
- 7:05:59want and then we have the series label
- 7:06:02when we go down we have the CDs discount
- 7:06:03and margin the labels are shown here
- 7:06:07basically if I enable it now you can
- 7:06:09decide for each series what you want the
- 7:06:12position on right or left you want and
- 7:06:14the value and the series color whatever
- 7:06:16you want and word r if the series name
- 7:06:18is pretty long you can have that you
- 7:06:20want to have background so I enabled the
- 7:06:22background but both the series color and
- 7:06:24the background color uh need to be a
- 7:06:26little bit different so let me change
- 7:06:27the background color to different
- 7:06:32you can see transparency I can
- 7:06:36increase total labels again because it's
- 7:06:38a stagged visual so you can have the
- 7:06:39total label but it will look too busy if
- 7:06:42I have that and then we have the error
- 7:06:45bar options and where you can use
- 7:06:47various stuff in this manner um I have
- 7:06:50this tagged and line
- 7:06:52visual as you can see that with the new
- 7:06:55major driven labels and with the help
- 7:06:57from the data label enhancement and the
- 7:07:00enhancement which has been done for the
- 7:07:03bar WID for the transparency and the
- 7:07:07Sorting of the bar we got a new era in
- 7:07:11the visualization of the tagged Visual
- 7:07:13and the clustered column bar visual to
- 7:07:15take them to the next level and as you
- 7:07:17can see those of you have watched the
- 7:07:19series in the last year you will see a
- 7:07:21lot of difference in terms of what we
- 7:07:23are creating here versus what we have
- 7:07:25created last year visual level format
- 7:07:29sting has been released in August 2024
- 7:07:32and now we are going to discuss those
- 7:07:35this part of the video I'm using a
- 7:07:37little different file not the same file
- 7:07:39which we are using for learn power ba
- 7:07:40series I'm using the abstract thesis
- 7:07:43data file but I'm using the same model
- 7:07:46so you will be able to relate with what
- 7:07:48I doing using the same fields which are
- 7:07:51available in your learn powerbi files
- 7:07:54which I have shared with you on the
- 7:07:56GitHub so let me quickly jump onto the
- 7:07:58August 2024 notes and in August 2024
- 7:08:02notes if you scroll a little bit down
- 7:08:03you get this new feature which is visual
- 7:08:06level format things now you might be
- 7:08:09knowing that visual level and
- 7:08:10calculations have came few days back and
- 7:08:13you would like to format those strings
- 7:08:15and there was this challenge how do we
- 7:08:16format how this option has came and
- 7:08:19there are various things which has been
- 7:08:21supported now so it is not only
- 7:08:23supporting at the visual level but it
- 7:08:25has been done in a manner that you can
- 7:08:27do it at the model level visual level
- 7:08:29and and the element level so let's
- 7:08:31understand this feature first of all let
- 7:08:32me click on that SC down for visual
- 7:08:35level format strings let's understand
- 7:08:37this feature visual level format thingss
- 7:08:39are here providing you with the more
- 7:08:41options configure matting and configure
- 7:08:43the formatting originally bu for visual
- 7:08:45calculation this has been actually bu
- 7:08:46for the visual calculation the core
- 7:08:48ability that the visual level format
- 7:08:50strings provide is the ability to format
- 7:08:52visual calculation basically it allows
- 7:08:54you to format the visual calculation
- 7:08:56which is basically when you create these
- 7:08:57new visual calculation or visual level
- 7:08:59calculation or me visual calculation are
- 7:09:02not in the water you cannot format them
- 7:09:04unless you are using them in data labels
- 7:09:07or a specific part of the card and new
- 7:09:09slicer manual basically what happens is
- 7:09:11because we were formatting our measures
- 7:09:13at the model level and then if you want
- 7:09:16to format them further we were
- 7:09:17formatting them in the data labels and
- 7:09:19few places in the card which were nicer
- 7:09:21other than that we were not able to
- 7:09:22format and if you want to format your
- 7:09:24visual calculation that's the option we
- 7:09:26were using now we would like to go
- 7:09:28beyond that and we would like to them at
- 7:09:30the visual level with visual level
- 7:09:32formatting string you can do that so
- 7:09:34means you will be able to format the
- 7:09:36visual calculations for visual level
- 7:09:38format string however are useful even
- 7:09:40without visual without visual
- 7:09:42calculation they are also useful what
- 7:09:44are the three levels now we can do it
- 7:09:45model level we format this model level
- 7:09:48you can set the format for columns and
- 7:09:50measures in the model anywhere you can
- 7:09:52use that column or measure the
- 7:09:53formatting of the apply unless over
- 7:09:55written by a visual calculation element
- 7:09:57level form what is the visual level then
- 7:10:00this is what is introducing here or
- 7:10:02introduced today with with this release
- 7:10:04notes you can set the format of the
- 7:10:06string any column or a major or a visual
- 7:10:08calculation that is on your visual even
- 7:10:10they already had a format string in
- 7:10:12cases the model level format string were
- 7:10:14written visual level format string would
- 7:10:16be used because this visual level will
- 7:10:19have higher priority over the model
- 7:10:20level now next come the element level
- 7:10:23you can set the format for data labels
- 7:10:25and specific elements of the new card
- 7:10:28and new slicer visual this will be
- 7:10:30pended including much more in the future
- 7:10:33any format string you set here will
- 7:10:36override the format string on the visual
- 7:10:38add the model so now you will explain
- 7:10:41you element level selected element on a
- 7:10:43selected visual measures or column and
- 7:10:45visual calculation both it applied
- 7:10:47visual selected visual applies to measor
- 7:10:49and columns and visual calculations
- 7:10:51model it applies to all the pages and
- 7:10:54the reports on the same model and which
- 7:10:57one will impact it has been given here
- 7:10:59so first is model level if you have the
- 7:11:01visual level the visual level will apply
- 7:11:03if you have the element level then the
- 7:11:05element level settings will apply it has
- 7:11:06been explained from where you can get
- 7:11:08the model level so model L you can set
- 7:11:10from the major tool or the column tool
- 7:11:13or you have these properties under the
- 7:11:15modeling from where you can apply the
- 7:11:17model level setting for visual level you
- 7:11:19can find it under the data format once
- 7:11:21you open and select the visual when you
- 7:11:23further go down you let's say you want
- 7:11:25to set up the data label inside the data
- 7:11:28label further you can go ahead and
- 7:11:30change the formatting of your measure
- 7:11:34using the format strings so this example
- 7:11:37is been given now the total is shown as
- 7:11:39scientific notation but only in the data
- 7:11:41label not in other places such as tool
- 7:11:44tip as shown below notice how the
- 7:11:46element level formatting is used in the
- 7:11:48data label but visual level model format
- 7:11:51thing is still used for the other
- 7:11:53elements in the same visual now we have
- 7:11:56understood this feature detailed time
- 7:11:58has come that we go to powerb desktop
- 7:12:00and explore this feature out so let's
- 7:12:03move to the power ba desktop and here
- 7:12:05I'm going to add a new page and in this
- 7:12:07new page I'm going to add a table visual
- 7:12:11in this table visual let me bring in BR
- 7:12:13let me also bring in and let me
- 7:12:16duplicate it a bar visual because not
- 7:12:19every property applies everywhere in the
- 7:12:21bar visual let me go ahead and enable
- 7:12:22the data labels also I'll open up the
- 7:12:24property Pane and I will enable now the
- 7:12:26data labels as you can see data is now
- 7:12:29displayed in millions and this happens
- 7:12:31because of the data label properties so
- 7:12:34go to data
- 7:12:35labels go down and then open values and
- 7:12:39inside the values you will see the
- 7:12:41display format is Auto and you can
- 7:12:43change it as per your requirement so now
- 7:12:46let's go ahead and custom on look at the
- 7:12:48formatting of the major this click on
- 7:12:50the major under the major tool you will
- 7:12:51be able to see the formatting of the
- 7:12:54major right now the formatting is joural
- 7:12:57and all other values are set to the
- 7:12:58default values so let's start by by
- 7:13:01changing the format so I can click on
- 7:13:03the format and start writing down my own
- 7:13:06format so I would like to write down a
- 7:13:09format hash comma hash HH hash and I'll
- 7:13:12not give any decimal place or zeros
- 7:13:15after that now if you see the other
- 7:13:17things were disabled and if you look at
- 7:13:19my net menue here now net has no decimal
- 7:13:22place it has been formatted using the
- 7:13:24million format let's look at the bar
- 7:13:26Visual and in the bar visual on the tool
- 7:13:28tip you will see it is following the
- 7:13:30model format
- 7:13:31we have to now discuss the label format
- 7:13:34but before that let's experiment with
- 7:13:36the properties of table visual I can go
- 7:13:38to properties and under which I can
- 7:13:40found data format I don't want to set up
- 7:13:42for brand but I would like to set up it
- 7:13:43for net which is auto as of now
- 7:13:45following the model level formatting I
- 7:13:48can click into the format and replace it
- 7:13:50with a million format of hash comma hhhh
- 7:13:54do0 so I will now get one decimal place
- 7:13:57press enter to commit and now go back to
- 7:13:59the table visual where we have done this
- 7:14:01you can see one decimal place is coming
- 7:14:04which is the visual level format
- 7:14:06different from the model level now to
- 7:14:08explore the additional properties what
- 7:14:10we are going to do is we are going to go
- 7:14:12to the bar Visual and try to set up some
- 7:14:14visual level and elements level
- 7:14:15formatting I go to the bar visual here
- 7:14:18and in the bar visual I go to the
- 7:14:19property and I have data format and I
- 7:14:21want to give a data format now the
- 7:14:22format which I given for the table
- 7:14:23visual definitely not going to apply
- 7:14:25here we will give the same format here
- 7:14:27hash comma Hash Hash has do0 it means
- 7:14:30one decimal cas you will observe no
- 7:14:32difference in the data label but when
- 7:14:33you go to the tool tip you see it is one
- 7:14:35decimal place in the million format and
- 7:14:37that is what we wanted so now my visual
- 7:14:39is following the visual level format but
- 7:14:41I'm missing a visual with a global
- 7:14:43format so what I'm going to do here is
- 7:14:45I'm going to add one additional visual
- 7:14:47here so let me add a bar visual here and
- 7:14:50inside this bar visual I will go ahead
- 7:14:53and add net and brand from the item
- 7:14:56table and now if you look at this visual
- 7:14:59you have the global format now we would
- 7:15:01like to go ahead and experiment with the
- 7:15:03element level formatting so let me click
- 7:15:05on the first bar visual which I've
- 7:15:07created and go to the data labels in the
- 7:15:11data label let's scroll down to the
- 7:15:13values and inside the values we have
- 7:15:16display unit you can select the display
- 7:15:18unit as null and you will observe that
- 7:15:21now the labels are also following visual
- 7:15:23level format in display unit you can
- 7:15:26also choose any other formats like
- 7:15:29thousands
- 7:15:31million
- 7:15:32billion Etc you can prefer to choose
- 7:15:35Auto format Auto is the one of the most
- 7:15:37common format we use and once you are
- 7:15:40using Auto format you can decide the
- 7:15:42number of decimal places let's say you
- 7:15:44can change it to one or two now I would
- 7:15:46like to give a custom format the moment
- 7:15:48I choose it it shows me the visual level
- 7:15:50format let's start writing down now hash
- 7:15:52comma Hash Hash Hash the million format
- 7:15:56d0 and0 means you have to show two
- 7:15:59decimal places in place of 0 0 if I
- 7:16:03would have used Hash Hash it means the
- 7:16:05digits are optional it means if there is
- 7:16:07a one digit it will show one digit not
- 7:16:10two digit after the decimal so let's
- 7:16:12look at this line where we have 7.0 if I
- 7:16:14would have used Hash Hash after the
- 7:16:17decimal it would have only shown 7 not
- 7:16:1970 dou 0 makes it compulsory to have two
- 7:16:22decimal places we are now using three
- 7:16:25different formatting for this measure
- 7:16:27net so if I click on this measure net
- 7:16:30you will see at the model level we don't
- 7:16:32have any decimal places and if you go to
- 7:16:35the tool tip of the second bar visual
- 7:16:37you don't see any tool tip on the table
- 7:16:39visual you see the visual level format
- 7:16:41with one decimal place on the first bar
- 7:16:43visual you see on the data label the two
- 7:16:46decimal places means the element level
- 7:16:49formatting and in the tool tip you see
- 7:16:51the visual level formatting now we have
- 7:16:53explored the format string feature at
- 7:16:55Major level visual level and the element
- 7:16:58level but the visual level format
- 7:17:01feature has came for the visual
- 7:17:02calculation so let's go ahead and
- 7:17:04explore one visual calculation too let
- 7:17:06me add a visual calculation on the table
- 7:17:08visual the calculation I want to add
- 7:17:10here is next next of the net I want it
- 7:17:13means it's going to give me the next row
- 7:17:15let me press enter and it is giving me a
- 7:17:18calculation which is giving me Nest but
- 7:17:20the formatting is not following any of
- 7:17:22the format which we have done at the
- 7:17:24model or the visual level we need to
- 7:17:26change the format and to change the
- 7:17:28format we'll go to the format pan format
- 7:17:31pain properties and inside this we will
- 7:17:32choose this calculation and now here we
- 7:17:35can give a format what we want hash
- 7:17:37comma Hash Hash has the million format
- 7:17:40and as you can see the calculation is
- 7:17:42showing without any decimal place but
- 7:17:44net is following its own format which is
- 7:17:47basically having one decimal place now
- 7:17:50you have seen how to format a visual
- 7:17:52calculation at the visual level we have
- 7:17:56now learned how to format at element
- 7:17:59level visual level and mod level so why
- 7:18:02would you go ahead and try out visual
- 7:18:03level format
- 7:18:05strings let's understand what is Dax and
- 7:18:08what I'm going to do is I'm going to use
- 7:18:10the definitions which has been provided
- 7:18:12on Microsoft Larn site so that we are
- 7:18:15you know very near to what Microsoft has
- 7:18:17given so Dex is data analysis expression
- 7:18:21is a Formula expression language used in
- 7:18:24analysis services powerbi and power
- 7:18:27power in Excel Dex formula include
- 7:18:29functions op ators and values to perform
- 7:18:33Advanced calculation and queries on the
- 7:18:35data in related tables and columns in
- 7:18:39the tabular data model so in all these
- 7:18:42analysis Services power VI power pivot
- 7:18:45we use tabular data model so in the
- 7:18:47table of data model to create the
- 7:18:49formulas or the calculation we use Tex
- 7:18:52and this is what we are going to use now
- 7:18:54onwards a lot when we are going to learn
- 7:18:57the formulas The Columns the calculated
- 7:19:00column Majors tables RLS Etc so Dex is
- 7:19:05used in Dex calculations Dex formulas
- 7:19:08are used in Majors calculated column
- 7:19:11calculated tables visual calculations
- 7:19:14and Ru of security these are the places
- 7:19:16where Dex calculations are used so first
- 7:19:19of all what is Dex measure measures are
- 7:19:21Dynamic calculation formulas where the
- 7:19:24result change depending on the context
- 7:19:27means if the your filter context is
- 7:19:28changing then the results will change
- 7:19:31majors are used in reporting that
- 7:19:34support combining filtering model data
- 7:19:38by using multiple attributes such as
- 7:19:40power V report or Excel pivot table or
- 7:19:43pivot chart measur are created by using
- 7:19:45Dex formula bar in the model designers
- 7:19:48and we'll go to the power VI desktop
- 7:19:50this is where we are going to learn the
- 7:19:52Dex measures we have the option to
- 7:19:55create the measures we have it in under
- 7:19:58the Home tab we will also get it in to
- 7:20:00the table tools that's calculated column
- 7:20:03the calculated column is a Col column
- 7:20:06that you add to an existing table in the
- 7:20:09model designer and then create a Tex
- 7:20:12formula that defines that column's value
- 7:20:15when a calculated column contains a
- 7:20:17valid Dex formula the values are
- 7:20:20calculated for each rows as soon as the
- 7:20:23formula is entered the values are then
- 7:20:25stored in the inmemory data model so
- 7:20:28basically the Dex calculated columns
- 7:20:32will be calculated and will be stored in
- 7:20:34the model while the measures are
- 7:20:36basically runtime which is going to be
- 7:20:39executed when we actually use them onto
- 7:20:42the visualization T calculated tables
- 7:20:45calculated table is computed objects
- 7:20:49based on the formula expression DED from
- 7:20:52all or part of the other tables in the
- 7:20:55same model instead of querying and
- 7:20:57loading the values into your new table
- 7:21:00column from a data source a de formula
- 7:21:03defines the tables value so basically
- 7:21:06you are not getting it from The Source
- 7:21:07you are actually calculating it based on
- 7:21:10the other data which is coming from
- 7:21:14source so basically it can be based on
- 7:21:16other table or time we may create tables
- 7:21:19like calendar table which is actually
- 7:21:21driven by completely by the formula only
- 7:21:23calculated table support relationship
- 7:21:26with other tables means yes do you are
- 7:21:28calculating a table but still it can
- 7:21:30have relationship with our tables
- 7:21:32calculated tables are recalculated if
- 7:21:34any of the table it pulls data from our
- 7:21:38refreshed or updated so if it is taking
- 7:21:41data from any table and that table's
- 7:21:43data get refreshed it will also get
- 7:21:45refreshed and updated visual calculation
- 7:21:48the Dex visual calculation has been very
- 7:21:50decently added to powerb a visual
- 7:21:53calculation is a DEX calculation that
- 7:21:55defined and executed directly on a
- 7:21:58visual so it is only at the visual level
- 7:22:00not beyond that so the scope of visual
- 7:22:02calculation is visual visual
- 7:22:04calculations make it easier to create
- 7:22:07calculations that are previously hard to
- 7:22:10create getting a simpler decks easier to
- 7:22:12maintain and better performance so the
- 7:22:15reason for giving this is basically you
- 7:22:17want to have a simpler Dex like looking
- 7:22:19into previous no R next Row first row
- 7:22:23last row or even creating the running
- 7:22:25sum all these are going to be really
- 7:22:27easy if you use Dex visual calculations
- 7:22:30Dex queries Dex queries can be created
- 7:22:33and run in Dex query view of power ba
- 7:22:36desktop and open source tools like Dex
- 7:22:38Studio unlike the calculation formulas
- 7:22:41which can be only created in a tabular
- 7:22:44model Dex query can also be run against
- 7:22:47analysis service multi-dimensional model
- 7:22:49Dex queries are often easier to write
- 7:22:51and more efficient than the
- 7:22:53multi-dimensional data expression MDF
- 7:22:55queries so those of you who have used
- 7:22:57the multi-dimensional models you might
- 7:22:59know that the m DX query is used and it
- 7:23:01is real now Dex is easier again the Dex
- 7:23:04query is basically we are trying to do
- 7:23:07what we are doing in the sequel to write
- 7:23:09down the select query here we are
- 7:23:10writing down Dex queries now the Dex
- 7:23:12query when you wanted to write down in
- 7:23:14Dex query view or Dex Studio you need to
- 7:23:17make sure that it returns a table and
- 7:23:19you can also use evaluate function to
- 7:23:21evaluate these queries just like select
- 7:23:24does the job for you in the SQL World
- 7:23:26evaluate is going to do the job for you
- 7:23:28so to run the Dex queries you need to
- 7:23:30use evaluate one should make sure that
- 7:23:32the query should return return a table
- 7:23:34so if it returns a table then it's going
- 7:23:36to be displayed in the Dex query view or
- 7:23:38the de view you can also use order by
- 7:23:41index queries which we do not use in the
- 7:23:43visual explicitely because what happens
- 7:23:45in the visual we have a option to sort
- 7:23:47on a particular column and we use that
- 7:23:50option to sort we we do need to mention
- 7:23:53that okay order by this column that has
- 7:23:55been taken care by the visual features
- 7:23:58data type what all data types de support
- 7:24:00you can import data into a model from
- 7:24:03many different data sources that might
- 7:24:06support different data types when you
- 7:24:08import data into a model the data is
- 7:24:10converted to one of the tabular model
- 7:24:13data types and these are the data types
- 7:24:16it will be converted whole number
- 7:24:18basically the number without a decimal
- 7:24:21place so this is very similar to
- 7:24:23integers decimal numbers Boolean text
- 7:24:26date date and time valid dates are all
- 7:24:29dates after March 1 1900 so if you have
- 7:24:32a date before that then it might not
- 7:24:34work currency and a blank these are the
- 7:24:36various data types which you which are
- 7:24:39supported on the Dex and you when you
- 7:24:41are going to use that you will realize
- 7:24:43that these are sufficient for our
- 7:24:45calculations and you know working on the
- 7:24:49so Dex variable you can create variable
- 7:24:52within an expression using where so you
- 7:24:54can create a variable variable is
- 7:24:56technically not a function it's not a
- 7:24:58function it is a keyword to store the
- 7:25:01results of an expression as named
- 7:25:03variable so basically you are going to
- 7:25:05have an expression and that expression
- 7:25:08will be saved as a variable it will be
- 7:25:11given a name and that name can be used
- 7:25:13further that variable can be passed as
- 7:25:15an argument to another as an argument to
- 7:25:18other major expression for example major
- 7:25:21equal to where Max of Max State and then
- 7:25:23you'll use the written statement and
- 7:25:25then you're going to use it again like
- 7:25:27in this case we are using calculate sum
- 7:25:29of say gross am out filter all date date
- 7:25:32of date equal to Max so I'm using the
- 7:25:34variable and it is really important
- 7:25:36whenever you are using a variable
- 7:25:38whether you are using in a measure or
- 7:25:39whether you are using it in a column you
- 7:25:41need to use the written statement
- 7:25:43written statement is only needed when
- 7:25:45you are using variable if you are not
- 7:25:47having a variable you could have used
- 7:25:49simply let's say major equal to sum of
- 7:25:50gross amount that will also work when
- 7:25:52you're using Dex variable so you need to
- 7:25:54make sure when you're are using Dex
- 7:25:56variables you should use a written
- 7:25:57statement to complete your measure or a
- 7:25:59calculator column so these are the
- 7:26:02various definitions I wanted you to know
- 7:26:05before we move into the depth of the
- 7:26:07deex now we will now go ahead and
- 7:26:09discuss context there are various kind
- 7:26:11of context in Dex and it is really
- 7:26:14important to understand that now some
- 7:26:16time when we are using these context we
- 7:26:19may use only the word context or a
- 7:26:21visual context or a row context we'll
- 7:26:24also try to understand that so let's
- 7:26:27understand the different kind of
- 7:26:28contexts which are available in power ba
- 7:26:31or in the tax so what is context context
- 7:26:34is an important concept to understand
- 7:26:37when creating the Dex formula context
- 7:26:39enables you to perform Dynamic analysis
- 7:26:42as the result of a formula change to
- 7:26:45reflect the current row or the cell
- 7:26:48selection and also any related data
- 7:26:51understanding context and using context
- 7:26:53efficiently are critical for building
- 7:26:55High performing Dynamic analysis and for
- 7:26:58troubleshooting the problems in the
- 7:27:00formula so basically context is applying
- 7:27:02everywhere and we need to understand
- 7:27:04what are the different kind of context
- 7:27:06and which context is applying back
- 7:27:08formulas in the table or model can be
- 7:27:10evaluated in different context depending
- 7:27:13on other design elements what are those
- 7:27:15Design Elements filter applied in a
- 7:27:17pivot table or a report filter defined
- 7:27:20within a formula relationship is
- 7:27:22specified by special functions using
- 7:27:25formula there are different type of
- 7:27:26contexts B context query context and
- 7:27:29filter cont context now let's understand
- 7:27:32row context row context can be thought
- 7:27:35as row context can be thought of as the
- 7:27:38current row if you create a formula in
- 7:27:41the calculated column the row context
- 7:27:43for the formula is include the value
- 7:27:46from all the columns in the current row
- 7:27:49if the table is related to another table
- 7:27:51the content is also included all the
- 7:27:54values from other tables that are
- 7:27:57related to the current row is basically
- 7:27:59every row it will get executed and every
- 7:28:02row has a context that is where the row
- 7:28:05context comes in place for example
- 7:28:07support you create a calculated column
- 7:28:09quantity 1 plus quantity 2 let's add the
- 7:28:12values from two columns quantity one and
- 7:28:14quantity 2 from the same table this
- 7:28:17formula automatically gets only the
- 7:28:19value from the current Row in the
- 7:28:21specified column so it's only getting
- 7:28:23one row it is not getting more than that
- 7:28:25so that is where the row context is
- 7:28:27applied the row context also follows any
- 7:28:30relationship that has been defined
- 7:28:32between the tables including
- 7:28:33relationship defined with the a
- 7:28:36calculated column by using Dex formulas
- 7:28:39to determine which Row in the related
- 7:28:41tables are associated with the current
- 7:28:43row related function can fetch a related
- 7:28:46table based on the relation so basically
- 7:28:49you you can say Quantity plus related
- 7:28:51tables quantity so it is going to fetch
- 7:28:54row by row that values so all these
- 7:28:56places is row context so basically your
- 7:28:59row itself is a filter of data it is not
- 7:29:02going beyond that particular rows
- 7:29:04calculation so it's not that if I say
- 7:29:06Quantity 1 plus quantity 2 it going to
- 7:29:08sum up all the quantities in the table
- 7:29:10that's not going to happen we will take
- 7:29:12example when it's going to happen but
- 7:29:14that's not going to happen with the row
- 7:29:16context is in place so Dex is multiple
- 7:29:19row context Dex include function that
- 7:29:21iterates calculation over a table these
- 7:29:24functions can have multiple current rows
- 7:29:27which each with its own content T in a
- 7:29:30sense these function let you create the
- 7:29:33formula that perform operation
- 7:29:35recursively over an inner and outer loop
- 7:29:37so basically you are executing on more
- 7:29:40than one rules for example suppose your
- 7:29:43model contains product table and sales
- 7:29:45table user might want to go through
- 7:29:47entire Sal table which is full of
- 7:29:50transaction involving multiple products
- 7:29:52and find the largest quantity order for
- 7:29:54each product for any one of these
- 7:29:56transac this is one example when you
- 7:29:59want to calculate multiple rows of the
- 7:30:02sales table against the each product
- 7:30:03that's where you are using multiple row
- 7:30:05contacts with the Dex you can build a
- 7:30:07single formula that Returns the correct
- 7:30:09value and results are automatically
- 7:30:12updated at the time user adds the data
- 7:30:14to a table so the Dex will take care of
- 7:30:18the execution and you will get the
- 7:30:20correct formula so one of the example
- 7:30:22using earlier is like I want to find out
- 7:30:24the first sales State when the customer
- 7:30:26came to me for first time so this is
- 7:30:28minx filter sales custom customer ID
- 7:30:30equals to earlier customer ID so it's
- 7:30:32going to look at for all the customers
- 7:30:34in that table and go to find out the
- 7:30:36minimum save date to summarize the
- 7:30:38earlier function store the row context
- 7:30:41from the operation that precedes the
- 7:30:43current operation so basically it's a
- 7:30:45multiple row context which is coming
- 7:30:47into play in this case so let's
- 7:30:49understand query context query context
- 7:30:52refers to the subset of the data that is
- 7:30:54implicitly retrieved from a formula for
- 7:30:57example when a user places a measure or
- 7:31:00the field into the report the engine
- 7:31:02examines the row and the column headers
- 7:31:05slicers and Report filter to determine
- 7:31:07the context the necessary query then
- 7:31:09runs against the model data to get the
- 7:31:12correct subset of the data makes
- 7:31:15calculation defined by the formula and
- 7:31:18populate the values in the report so
- 7:31:19basically what happens when you create a
- 7:31:21visual so it has it might be getting
- 7:31:23slies it might be creating filters it
- 7:31:26might have the columns row columns or
- 7:31:29column head
- 7:31:30based on all those a query context is
- 7:31:33formed and then you get the result so
- 7:31:35this is what the query context is
- 7:31:37because the context changes depending on
- 7:31:39where you place the formula the result
- 7:31:41of the formula can also change for
- 7:31:44example suppose you create a formula
- 7:31:46that sums the value in gross amount
- 7:31:48column of the sales table let's say sum
- 7:31:50of gross amount if you use this in a
- 7:31:53calculated column within a sales table
- 7:31:55the result of the formula will also be
- 7:31:58same as the entire table because the
- 7:32:00query context of the formula is always
- 7:32:02the entire data set of the c table the
- 7:32:05results will have gross amount for all
- 7:32:07regions all products all years and so on
- 7:32:10so if use the sum of gross sales amount
- 7:32:13in a calculated column versus a major
- 7:32:15your expectation of result should be
- 7:32:17different in case of a mejor it is based
- 7:32:20on the query context of what is present
- 7:32:22in the visual in column headers Ru
- 7:32:25headers or what is coming because of
- 7:32:27filters and slices but in case of the
- 7:32:29calculated column is going to take the
- 7:32:31complete Sal table and go to calculate
- 7:32:34however user typically don't want to see
- 7:32:36the same results hundreds of time but
- 7:32:39instead of instead of want to get profit
- 7:32:42of a particular year a particular
- 7:32:44country or a particular product or
- 7:32:46combination of these to get the grand
- 7:32:48total so this is what we want we
- 7:32:50actually wanted to group the data this
- 7:32:52is what we do in a powerb visual we
- 7:32:54wanted to have the grouping of the data
- 7:32:56based on particular year country Etc in
- 7:32:58a report the context is changed by
- 7:33:00filtering or adding or removing the
- 7:33:02fields and using the slices for each
- 7:33:05change the query context in the measure
- 7:33:07is evaluated therefore the same formula
- 7:33:10used in a measure is evaluated in
- 7:33:12different query context for each cell so
- 7:33:14basically your visual may have different
- 7:33:16set of columns different set of filter
- 7:33:18filters and slices and based on that it
- 7:33:20is going to be evaluated in different
- 7:33:22query context let's come to now filter
- 7:33:25context filter context is a set of
- 7:33:28values allowed in each column or in the
- 7:33:31values retrieved from a related table
- 7:33:33filter can be applied to the column in
- 7:33:36the designer or presentation layer
- 7:33:38reports or pivot table filters can also
- 7:33:41be defined explicitly by filter
- 7:33:44expression in the formula so we have
- 7:33:45filters and slices we also have you know
- 7:33:48filter expression in which we can use in
- 7:33:51calculate or the expression function
- 7:33:53that also can give us the filter context
- 7:33:56filter context is added when you specify
- 7:33:58filter filter con States on a set of
- 7:34:01values allowed in a column or a table
- 7:34:03using the arguments to the formula
- 7:34:06filter context applies on the top of
- 7:34:09other contexts such as row context or
- 7:34:11query context so filter context is going
- 7:34:13to apply on on top of the other context
- 7:34:16such as row context and query context
- 7:34:17that we to remember in tabular model
- 7:34:20there are many ways to create the filter
- 7:34:22context within the context of client
- 7:34:25that can consume the model such as
- 7:34:27powerb reports user can create filter on
- 7:34:30the Fly by adding slicers or report
- 7:34:32filters on the row or column headings
- 7:34:34you can also specify filter expression
- 7:34:37directly within the formula to specify
- 7:34:40related values to filter tables that are
- 7:34:43used as inputs or to dynamically get the
- 7:34:46context of the values that are used in
- 7:34:48the calculation you can completely clear
- 7:34:51or selectively clear the filter of a
- 7:34:54particular column this is very useful
- 7:34:56while creating the formulas that
- 7:34:58calculates Grant to so what would happen
- 7:35:00now there is a filter context which is
- 7:35:02applying and because the visual is
- 7:35:04getting executed the visual rowes is
- 7:35:07actually having a particular value
- 7:35:10getting filtered now you don't want that
- 7:35:12kind of filter happening because of the
- 7:35:14visual Ro so there are functions like
- 7:35:16all all selected using which you can you
- 7:35:19know go beyond your context you can
- 7:35:22completely clear or selectively clear
- 7:35:24those particular columns filter context
- 7:35:27and get a formulas which will help you
- 7:35:29to get Grand totals so this is what we
- 7:35:32understood about different context not
- 7:35:34what you're going to do is you're going
- 7:35:35to explicitly look at this row context
- 7:35:38and filter context and when we go to the
- 7:35:40visualization quite a few time we are
- 7:35:42only going to talk about filter context
- 7:35:45but by the definition you might see that
- 7:35:47it is applicable on a larger context or
- 7:35:49some other context but we'll try to
- 7:35:51limit ourself to use few terms and I'm
- 7:35:55going to explain you what are the terms
- 7:35:56which we are going to use when we are
- 7:35:58going to look at these context in the
- 7:36:01visuals let's understand the difference
- 7:36:04between the row context and the filter
- 7:36:07context and also look at the powera file
- 7:36:10to understand the different kind of
- 7:36:12context we have understood few minutes
- 7:36:14back so let me take you through uh the
- 7:36:17next slide let's have a look at the
- 7:36:19differences so basically the row context
- 7:36:21as we have understood already is a
- 7:36:23physical row of the table so basically
- 7:36:25when you're doing a calculated column
- 7:36:27then what essentially you're doing is
- 7:36:29every row by row that calculation is
- 7:36:31happening or basically row filtering is
- 7:36:34applying on every row so you are only
- 7:36:36limited by the data of that particular
- 7:36:38row that is where we say row context is
- 7:36:41applied now similarly when you use
- 7:36:42iterator functions like filter sumx
- 7:36:45average X add columns you can also
- 7:36:48access the row context so like say if
- 7:36:50you use in the sumx you use the sales
- 7:36:52table then you're also creating a row
- 7:36:55context because at that time you are at
- 7:36:57the row of the table and you can do that
- 7:36:59while creating a major also now row
- 7:37:01context applies to one row at a time not
- 7:37:04more than one row because we have multi-
- 7:37:06row context if you remember for that a
- 7:37:08filter context if you apply how can it
- 7:37:10come it come can come because of the
- 7:37:12slicers or the filter which are
- 7:37:13available on the page it may come
- 7:37:15because of the visual so visual has
- 7:37:17every row and it row has a column or row
- 7:37:20because of which the values are coming
- 7:37:22and they are coming as a filter context
- 7:37:24Dex calculations like when we use
- 7:37:27calculate function we are giving filter
- 7:37:29expression and those are also acting as
- 7:37:31a filter context and filter context
- 7:37:33usually applies to a set of rows now
- 7:37:35let's jump out the power be file and try
- 7:37:38to understand the row context first of
- 7:37:41all if I go to my sales table in the
- 7:37:44table view if you remember we have done
- 7:37:46certain calculations and one of the
- 7:37:48calculation which we have done here is
- 7:37:50the gross amount when you look at the
- 7:37:52gross amount what is this calculation
- 7:37:54sales quantity multiply by price now
- 7:37:56this is a calculated column there is no
- 7:37:58aggregation here and this calculation is
- 7:38:01going to be done row by row so here row
- 7:38:04context is applying and you're only
- 7:38:06getting a data of a row you're not
- 7:38:08getting beyond that same way we have
- 7:38:10cogs calculation which is again the row
- 7:38:13by row calculation discount amount is
- 7:38:15again row by row calculation but if I
- 7:38:17come to sum of gross sales if you
- 7:38:19remember we discussed in the query
- 7:38:22context now here what is happening the
- 7:38:24entire table is available when we are
- 7:38:26doing this kind of operation and what
- 7:38:28are the other Contex text apply now when
- 7:38:31we are on a visual the other context may
- 7:38:33come because of able visual or the bar
- 7:38:36visual or because of the grouping they
- 7:38:38are providing in the visual now here
- 7:38:40there is nothing which is coming in for
- 7:38:42that and that is why you are getting the
- 7:38:44full total and that that is why you will
- 7:38:46find that I am keep on mentioning this
- 7:38:48whenever you are using aggregate
- 7:38:50function in a colum it gives you full
- 7:38:52table so you have access to full table
- 7:38:55and to reduce that you have to use some
- 7:38:57kind of a filter function or something
- 7:38:59like we have seen the example of earlier
- 7:39:01in multi row context so same example we
- 7:39:04have here the first change date where we
- 7:39:06are using this filter function and
- 7:39:08earlier a multi row context so here we
- 7:39:11are having this multi row context
- 7:39:13basically what is happening your
- 7:39:15customer ID equals to customer ID in the
- 7:39:17full sales table we're finding out the
- 7:39:20subset of the rows which are satisfying
- 7:39:23these conditions in the sales table
- 7:39:25where current rules customer ID is
- 7:39:28equals to the customer ID of the sales
- 7:39:30table and that subset of row you're
- 7:39:33using to find out the minimum sales
- 7:39:35state which is becoming your first sales
- 7:39:37dates same way we have also calculated
- 7:39:40the last sales date so these are you
- 7:39:43know the calculation which is coming
- 7:39:45from multirow Context now let's go back
- 7:39:48to the
- 7:39:50visualization and in the visualization
- 7:39:52if you look at this visual this visual
- 7:39:55is having row if you look at this row it
- 7:39:57is filtering the data for that Row for
- 7:39:59category one but also if you look at the
- 7:40:02gross column this particular row it is
- 7:40:05not giving this total like what we are
- 7:40:07getting in the column because here the
- 7:40:09categories filter context is applying on
- 7:40:12this visual row and restricting the data
- 7:40:14to category one so basically what you
- 7:40:16call the data is getting grouped so data
- 7:40:19is getting filtered for category one for
- 7:40:22this particular visual row so here we
- 7:40:25can say that you know each row is
- 7:40:28getting a filter context of category so
- 7:40:30when there is a category or there's a
- 7:40:32brand each row will get the filter
- 7:40:35context of those UNS sumarized column or
- 7:40:38group by columns and because of that you
- 7:40:40are getting that particular value for
- 7:40:43each row so filter context is passing
- 7:40:46now additional filter context can be
- 7:40:48added from filters from slicers and then
- 7:40:51that will further reduce your data for a
- 7:40:54row so different kind of filter contexts
- 7:40:57are getting applied on this one so now
- 7:40:59what could happen you could go ahead and
- 7:41:01add a filter or a slicer and can apply
- 7:41:04to this particular Visual and that will
- 7:41:06also give you the context so what
- 7:41:08happens let's say I can go here and put
- 7:41:10a brand let's say I mly put a filter as
- 7:41:13a page and I can select brand one now
- 7:41:15what you are seeing is this filter is
- 7:41:17also getting passed to this Visual and
- 7:41:19your result or your query context has
- 7:41:22changed to get the results so now we are
- 7:41:25getting data of brand one for this
- 7:41:28Visual and in inside this visual every
- 7:41:30rule like category one is getting data
- 7:41:32for category one category four is
- 7:41:34getting data for the category four so
- 7:41:36the context is getting applied to each
- 7:41:39and every row so now you might have got
- 7:41:42a little bit of idea of different kind
- 7:41:44of context and what would happen that
- 7:41:46you know when we are going to go ahead
- 7:41:49and look at various calculation we will
- 7:41:51talk about that context and sometime we
- 7:41:53might simply use the generic term
- 7:41:56context but looking at whether we are
- 7:41:58talking at the visual level or whether
- 7:41:59we are talking in a calculation the
- 7:42:02calculation could be in the major
- 7:42:04formula you will be able to identify
- 7:42:08that which context we are talking about
- 7:42:10here which context is going to apply
- 7:42:12when we use that particular kind of
- 7:42:13calculation or when we are talking about
- 7:42:16visual which context we are talking so
- 7:42:18let's understand how we are going to use
- 7:42:21various terms so whenever there is a
- 7:42:23slicer or filter which is passing the
- 7:42:25filter context we may simply use the
- 7:42:28term okay the it is getting filtered or
- 7:42:30it is getting filter context similarly
- 7:42:32the visual may also pass the filter
- 7:42:35context so we can say use the term
- 7:42:37context filter context visual row filter
- 7:42:40context or row filter context means when
- 7:42:43the visual have let's say category or
- 7:42:45brand and it is filtering the data for
- 7:42:48that also there is a filter context
- 7:42:50which is passing but we will K may use
- 7:42:52to explain you better like okay this is
- 7:42:54visual rows filter context is passing
- 7:42:57now when we use Dex formula and we have
- 7:43:00the filter because of that we may say it
- 7:43:02is Formula filter context or simply the
- 7:43:04context so this is how we are going to
- 7:43:06use the terms uh in the upcoming videos
- 7:43:09based on that it will be helpful for you
- 7:43:12to identify which context we are talking
- 7:43:14about so now we will understand Dex
- 7:43:16query View and first of all what we are
- 7:43:18going to do is we are going to go and
- 7:43:19look at the release note of Dex query
- 7:43:21view to understand it little bit in
- 7:43:23details and we are just starting with
- 7:43:25the Dex journey I might not be able to
- 7:43:28give you complete
- 7:43:29overview of what all Dex query view can
- 7:43:32do so what we will do is first let's
- 7:43:35understand the basic of what de query
- 7:43:36view can do and later on we will come
- 7:43:39back and explore Dex query view in
- 7:43:41little bit details so let's start the
- 7:43:43journey with the blog in November 2023
- 7:43:46the feature of Dex query view has been
- 7:43:48released an additional tab on the left
- 7:43:52hand pan has been added for Dex query
- 7:43:54View and this feature will allow you to
- 7:43:58run Dex qu directly from Power VI
- 7:44:02desktop you don't need external Studios
- 7:44:05for that release notes of November 2023
- 7:44:08talks about this feature but very
- 7:44:10recently a detailed article has been
- 7:44:12given on blog. powerbi.com or powerbi
- 7:44:18microsoft.com
- 7:44:20slus blog we are going to look into the
- 7:44:23article as well as we are going to play
- 7:44:25around with the Dex query view in powerb
- 7:44:29desktops let's quickly have a look at
- 7:44:31the blog as you can see as a first thing
- 7:44:34the various components have been
- 7:44:36explained so we have the data pane here
- 7:44:39we have the quick measures option we
- 7:44:42have the command bar here ribbon Dex
- 7:44:45query view access via the fourth view
- 7:44:47option the fourth view option which we
- 7:44:49are going to check out in some time Dex
- 7:44:52query
- 7:44:55editor which is this portion and the
- 7:44:58result grade which is the this
- 7:45:00particular section and then we can have
- 7:45:03query tabs we can have multiple
- 7:45:07queries how Dex query view is going to
- 7:45:10help us out H has been described in this
- 7:45:12blog quick queries from the data Paine
- 7:45:15to make it easy to create Dex queries
- 7:45:18direct model author can use Dex query
- 7:45:21view new measure authoring workflow we
- 7:45:24will see how can we create new measures
- 7:45:26directly from here CeX query of the
- 7:45:29visuals create your own Dex
- 7:45:32query now those of who who are from the
- 7:45:35powerbi world and never used deck studio
- 7:45:38uh you might not have seen the use of
- 7:45:41evaluate now what happens when you want
- 7:45:43to
- 7:45:44evaluate a query in the Dex view or in
- 7:45:49the Dex Studio you require evaluate and
- 7:45:51then you write down evaluate and a query
- 7:45:54a DEX query typically should return a
- 7:45:55table so all every time we trying to
- 7:45:58bring in uh xquery we try to return a
- 7:46:02table and then you say evaluate and the
- 7:46:04expression which return returns as a
- 7:46:06table and that's how you get it now if
- 7:46:08you want to create something new or you
- 7:46:10want to Define Majors then you use the
- 7:46:12Define keyword where you can Define the
- 7:46:14majors now these measures are defined in
- 7:46:17the context of that particular query so
- 7:46:21let's read out the definition from here
- 7:46:23evaluate evaluate which is required that
- 7:46:27specific what data you want to see
- 7:46:30Define which is optional that can
- 7:46:33specify a measure or named Dex formula
- 7:46:36to use in the Dex query this measure can
- 7:46:39already be in the model or not if
- 7:46:42already exists you can make changes that
- 7:46:45only apply to the Dex query to try them
- 7:46:48out you can also have the option to
- 7:46:51update the model with these mejor which
- 7:46:53we will get into more details later in
- 7:46:56this blog so in this blog they have
- 7:46:58shown you how can you save the changes
- 7:47:01in the major and we are going to
- 7:47:02experiment with that
- 7:47:05also when we are going to take the
- 7:47:07Practical examples now one example has
- 7:47:11been given for a de query summarized
- 7:47:12column is one thing which
- 7:47:15returns table and that is how we can use
- 7:47:17it if you go down more examples have
- 7:47:19been given also equalent sqls have been
- 7:47:21provided in this blog so that you can
- 7:47:24understand what's happening out
- 7:47:27here as you you can see the queries are
- 7:47:29run using evaluate
- 7:47:33expression select column is another
- 7:47:35function which can return return you a
- 7:47:36table with the selection of columns what
- 7:47:39you want and we order by something which
- 7:47:43we don't frequently use in powerbi
- 7:47:46because we use the visual sorting and
- 7:47:49visual sorting internally applies that
- 7:47:51order by but here you can explicitly
- 7:47:53call order by
- 7:47:55function then show data preview in the
- 7:47:58quick measure then it will generate a
- 7:48:01query for you Dex query and you can run
- 7:48:06that few more
- 7:48:12examples then you have uh Define with
- 7:48:16the references if you have a major and
- 7:48:18you want to Define its references then
- 7:48:19you have an option when you are running
- 7:48:21the query you can see the def references
- 7:48:24has been defined you can change the
- 7:48:25definition a little bit while uh doing
- 7:48:29the evaluation of that particular major
- 7:48:33in the Dex view so as you can see some
- 7:48:36of the majors have been changed and it
- 7:48:37is asking do you want to update or
- 7:48:39override those measures I may or may not
- 7:48:42want that I'm just experimenting it here
- 7:48:44by changing it what would happen so you
- 7:48:46have a place where you can experiment
- 7:48:48how your different measures or different
- 7:48:51combination of the defination is going
- 7:48:54to result in the data and then few more
- 7:48:57things have been explained
- 7:48:59here we have learned now quite a few
- 7:49:02visuals and there are still few visuals
- 7:49:04which are left out and we will take up
- 7:49:07those visuals once we are able to learn
- 7:49:11T and able to create more complex M once
- 7:49:14we are done with that we will come back
- 7:49:16and we will learn how to use conditional
- 7:49:19formatting and how can we create some
- 7:49:22other visuals and in those visuals we
- 7:49:24need few calculations which are
- 7:49:26dependent on some decks this time when
- 7:49:29we are going to learn creation of new
- 7:49:31major just like we created the majors
- 7:49:33initially uh we can take help of a new
- 7:49:35major which is available on the top
- 7:49:37under the major tool or table tool or
- 7:49:40Home tab but we are also going to take
- 7:49:43help of this new feature which has came
- 7:49:45in 2023 which is Dax query view view in
- 7:49:48the Dex query view we will be able to
- 7:49:51put the definition of an existing major
- 7:49:53modify it and get a new major or we
- 7:49:57simply Define a new major and and we
- 7:49:59will be able to use it so Dex query view
- 7:50:02is something very similar to those who
- 7:50:04have learned SQL it's like in a SQL
- 7:50:06editor or SQL Developer where you write
- 7:50:09down the SQL statement and execute them
- 7:50:12to get the query result so these are the
- 7:50:13Dex queries which we are going to write
- 7:50:15down here and you will get the results
- 7:50:16so before we Deep dive into the majors
- 7:50:21we're going to learn little bit about
- 7:50:23this Tex query View and as I already
- 7:50:25opened it you can see that there is
- 7:50:27already in a statement top top and 100
- 7:50:29customer we do have a table with that
- 7:50:31name I'll explain you what this so
- 7:50:33whenever we are going to do anything in
- 7:50:35a visualization we are not going to use
- 7:50:37this valuate function at the max I will
- 7:50:39do this top and 100 now top end is a
- 7:50:41function which can give top values 100
- 7:50:44is the number of values and customer is
- 7:50:46the expression or the table which I've
- 7:50:48given so it's giving me of 100 customers
- 7:50:50important thing which we have to
- 7:50:52remember when we are in the Dex query
- 7:50:54view is that whatever we are writing
- 7:50:56down here when we are to evaluate it
- 7:50:58should give us a table and there are
- 7:51:00many ways we can get table we will learn
- 7:51:02them as we go move forward now if we
- 7:51:04look at what all options we have on the
- 7:51:07top of the Dex query view we have
- 7:51:09something known as format query so if
- 7:51:10you write down a complex query and if
- 7:51:12you want to format it let's say can we
- 7:51:13format it further yes this is how it
- 7:51:15will get formatted you want to comment
- 7:51:17you want to write down something let's
- 7:51:18say we have written I will learn Dex you
- 7:51:22can go and comment it here you want to
- 7:51:23uncomment you can uncomment or these
- 7:51:25three lines are I want to uncomment I
- 7:51:27can go ahead and uncomment in one go
- 7:51:29comment then we want to find something
- 7:51:31we can use find and find it here inside
- 7:51:33this one you want to replace something
- 7:51:35and then you have a command pet where
- 7:51:37you know above the cursor below the
- 7:51:38cursor you want to search something that
- 7:51:40can help you I want to execute a major
- 7:51:42how do I execute a major or get its
- 7:51:44value in the de can remove this and you
- 7:51:46can have multiple queries you have tabs
- 7:51:48below to M run the multiple queries so
- 7:51:51what I can do here is I can go to one of
- 7:51:53the existing major and I can right click
- 7:51:56and say quick queries I have evaluated
- 7:51:58Define and evaluate Define with
- 7:52:01reference and evaluate Define all
- 7:52:03measures in this model now evaluate
- 7:52:05means simply it will give me evaluate
- 7:52:07expression Define and evaluate will give
- 7:52:09me definition how it defined now so let
- 7:52:11me add the Define and evaluate so it's
- 7:52:14giving me a function summarize column
- 7:52:16I'll explain you what this summarize
- 7:52:17column means so let me evaluate this
- 7:52:19first of all I can also evaluate this
- 7:52:22without so basically what happens in Dex
- 7:52:24query view that we need to evaluate and
- 7:52:26then we need a table expression this is
- 7:52:28how it works so summarize columns is
- 7:52:30also going to give us table expression
- 7:52:31what it does is you can have the name
- 7:52:34and then you can have expression name
- 7:52:35expression name expression you can also
- 7:52:37add filters this is how summarized
- 7:52:39column works now if the major is in the
- 7:52:41schema or the model you can use it but
- 7:52:43let's say I want to change this
- 7:52:45definition of the major how does we
- 7:52:46Define a major first of all let's
- 7:52:48understand now this one so we first we
- 7:52:50say Define mejor the table and the mejor
- 7:52:52name the new major name or the major
- 7:52:54name which you want and the definition
- 7:52:56the expression basically so this is our
- 7:52:58expression part this is the left hand
- 7:53:00side measure name part this is how you
- 7:53:02define it now can I have the two
- 7:53:04definitions here yes I what I can do is
- 7:53:06I can say multiply by two and I can keep
- 7:53:08a bracket to give the preference
- 7:53:10multiplication any way is going to take
- 7:53:12a preference I can run this now you can
- 7:53:14see that it takes the new definition the
- 7:53:16local definition local definition would
- 7:53:18be given a priority you can simply say
- 7:53:19evaluate then you see the old definition
- 7:53:21now let us say I want to Define my own
- 7:53:23new major so what I can do is I can copy
- 7:53:26and I'll say gross one what is my gross
- 7:53:28one what was my gross actually my gross
- 7:53:30was sum of sales gross amount this was
- 7:53:33my gross so what I need to do is now I
- 7:53:35need to add this measure and before I
- 7:53:37tell you I I'll even tell you one single
- 7:53:39function which is row what row function
- 7:53:41can do is row function can actually take
- 7:53:44a name expression name expression name
- 7:53:46expression and it only gives me one row
- 7:53:48summarize column is even more powerful
- 7:53:50it can have a group buse also we have
- 7:53:51not added the group by there so so let
- 7:53:54me execute it first of all evaluate for
- 7:53:57first time evaluated with net original
- 7:53:59definition of net because we have not
- 7:54:00used Define what I can do here is
- 7:54:02basically I can add a column name static
- 7:54:04column and I'll call this as grand total
- 7:54:07because row is giving me only one row it
- 7:54:10typically used also to create one row of
- 7:54:12data row again but it gives me a table
- 7:54:14name so expression name expression name
- 7:54:17expression this is what the syntax is
- 7:54:19name expression name expression keep on
- 7:54:20going like this now third one is gross
- 7:54:22we created here I'm not calling it gross
- 7:54:24one I'm simply using gross and then I'll
- 7:54:26use my gross one and gross one is only
- 7:54:29local it's not being created till now so
- 7:54:31I got it but what do You observe here
- 7:54:33other than you know it's giving me the
- 7:54:35data is update the model override the
- 7:54:38measure update the model add new measure
- 7:54:40these are the two new options which are
- 7:54:42coming in it means if I want I can add
- 7:54:45this measor but right now what I'm doing
- 7:54:47I'm testing it so no need to do now we
- 7:54:49have learned about this thing something
- 7:54:50known as sum you already know this same
- 7:54:52way as sum we have min max count count
- 7:54:56majors are there now let's go ahead and
- 7:54:59do this now I'm going to create it and
- 7:55:00then we are going to use it there also
- 7:55:02so let me say what is Max here and let
- 7:55:05me call it as gross two then gross three
- 7:55:08this is Min Min of gross amount then we
- 7:55:10can have one more which is Count now I
- 7:55:12don't want to count the see gross amount
- 7:55:15I want to count let's say order number
- 7:55:17and remember my order numbers are unique
- 7:55:19so when I go to new function which is
- 7:55:21distinct count which is going to count
- 7:55:23the distinct values I'm not going to use
- 7:55:26order number I'm going to use sales City
- 7:55:28ID so what is my sum of gross amount
- 7:55:30what is my Max of gross amount Min of
- 7:55:32gross amount count of order numbers and
- 7:55:35what are the distinct number of CI in
- 7:55:36this and I need to add all of them into
- 7:55:38my row also it cannot happen that I I
- 7:55:41just get it and here I can use this
- 7:55:43formatting now let's all this formatting
- 7:55:45every row we get this and now you can I
- 7:55:47can do that copy paste let me put a
- 7:55:49comma also here and then start doing the
- 7:55:51copy paste we need gross I'm I'm giving
- 7:55:53a different name here okay gr Min is two
- 7:55:56Ross three is a Max also not following
- 7:55:59the order and if you remember I am not
- 7:56:01given name here this is gross 4 so let's
- 7:56:04call now gross 4 was there so we will
- 7:56:06say count orders and this way will say
- 7:56:09distinct cities distinct cities distinct
- 7:56:11cities so correctly the name now let's
- 7:56:13run it now you getting this now some of
- 7:56:15those we can create a as a major so
- 7:56:18let's say I want this update as a new
- 7:56:20major and it is asking this change can
- 7:56:22not be undone means once I create I
- 7:56:24can't undo means I have to manually go
- 7:56:26and delete it you can't use control Z
- 7:56:28means is going to update the model we
- 7:56:29are fine with that isn't it okay fine
- 7:56:31again I say update so I used update
- 7:56:33again let me create Min of gross also
- 7:56:35and Max up and some we already have so
- 7:56:38we don't need it actually we will learn
- 7:56:39the sux function now in some time then
- 7:56:42we will try to create it from here we
- 7:56:44know a easier way here copy paste copy
- 7:56:46paste and do it I would like now let's
- 7:56:48take an example of this visual here data
- 7:56:50is grouped by category so how can we get
- 7:56:53similar kind of example in Dex query
- 7:56:56view how can we get the group data we
- 7:56:58will use summarize columns or summarize
- 7:57:01now these two functions have the ability
- 7:57:04to have group wise as well as aggregated
- 7:57:06column together and using that you can
- 7:57:08create a table which will give you
- 7:57:10aggregated columns as well as Group by
- 7:57:12columns so let's go ahead and try that
- 7:57:14out so if you remember when we came
- 7:57:16initially here we have been given a
- 7:57:18function which was summarize columns now
- 7:57:20look at the definition of summarize
- 7:57:21column what does it says you can give
- 7:57:23group bu you can give filter then name
- 7:57:25expression name we already using name
- 7:57:26expression name expression why don't we
- 7:57:28go ahead and give a group buy how do we
- 7:57:30give a group buy we need item category I
- 7:57:32given a group buy then I have name
- 7:57:34expression name expression and let's try
- 7:57:35out evaluate this now I can't evaluate
- 7:57:38it alone I need to have the Define also
- 7:57:40because there are few things which is
- 7:57:41not created as measur and we are getting
- 7:57:43the similar kind of results here we
- 7:57:45created additional measure there is
- 7:57:47average gross if I want to add it and
- 7:57:49without even defining I can put a comma
- 7:57:50at the end and I can say average cross
- 7:57:53comma and if I use that start suggesting
- 7:57:55me the majors then I can use average
- 7:57:58cross it suggest me as soon as I type it
- 7:58:00let me run it oh my God in this manner
- 7:58:02this summarize column everything which
- 7:58:04you want to use here should finally the
- 7:58:05valuate should return table say what
- 7:58:07happens I'm asking about return table
- 7:58:09return table what happens if I don't do
- 7:58:11that let's say I simply write down
- 7:58:12evaluate this average gross now it is
- 7:58:13already available isn't it let's select
- 7:58:15an execute it doesn't so it needs table
- 7:58:17and start renaming it also let's say we
- 7:58:20call this table one we call the first
- 7:58:22one is test there's nothing there what
- 7:58:24we're going to do is every time and
- 7:58:26again we going to go here and create the
- 7:58:29majors by just copy pasting by doing
- 7:58:31little bit faster stuff and
- 7:58:33understanding those things so now we
- 7:58:34have understood Dex query views and we
- 7:58:36also understood the basic functions
- 7:58:38available with us what we are going to
- 7:58:39do here is basically uh is there are too
- 7:58:41many visuals in this file so at this
- 7:58:43stage we're going to remove all these
- 7:58:45Pages I'll remove them one by one and
- 7:58:47now we'll start learning Dex with almost
- 7:58:50an empty file
- 7:59:13so what we have done is now we
- 7:59:15completely created the mt5 by deleting
- 7:59:17the page we'll save this file and we
- 7:59:19will also now do a save as and in this
- 7:59:22save as this time we are going to give
- 7:59:23it as a n22 name also but we are going
- 7:59:25to say this is the second file so that
- 7:59:27you can different that's where we
- 7:59:28started learning the data analytics
- 7:59:30expression and interchangeably we might
- 7:59:33use Query view as well as the new major
- 7:59:35functionality here whenever we want to
- 7:59:37use that we would like to learn about
- 7:59:39these conditional statement if and
- 7:59:40switch so while these can be used in
- 7:59:42column and measure so initial example
- 7:59:45what we are going to take is here to
- 7:59:46learn these basics of these statement we
- 7:59:48are going to use them in column but they
- 7:59:49can be used in major when we'll do
- 7:59:51conditional formatting we will come
- 7:59:53across a situation where we would be
- 7:59:54needing the if or the switch state so
- 7:59:56let me showcase you the syntax and then
- 7:59:58we can apply it anywhere so I'm here on
- 8:00:00my table View and inside the table view
- 8:00:03the item table is already opened I would
- 8:00:05like to Showcase you that statement here
- 8:00:06both the statements so if a statement
- 8:00:08and what I would like to do very simple
- 8:00:10thing I have five categories I want
- 8:00:11category one and two in group one
- 8:00:13category three and four in group two and
- 8:00:15the last category in group three that's
- 8:00:17what I want so let's start creating
- 8:00:18group using the if statement in a new
- 8:00:20column so again you clicked on a column
- 8:00:22then you will have a column tool if you
- 8:00:24clicked on the table you will have table
- 8:00:25tool in both you have new column click
- 8:00:27on the new column let me start calling
- 8:00:30this column new column is group
- 8:00:32one and I'll start with if statement if
- 8:00:36what is my condition if category because
- 8:00:38I'm creating a column I can simply use
- 8:00:40the column name belongs to the table
- 8:00:41without using the table name but ideal
- 8:00:43situation is use table name column in
- 8:00:45why I'm using in because I have more
- 8:00:46than one value or I can use R statement
- 8:00:48in what and in we give here in the curly
- 8:00:51brace
- 8:00:52category 1 comma double quotes category
- 8:00:56two close so what what is the if
- 8:00:58statement logical test what is the true
- 8:01:00value and what is the false value now
- 8:01:02because I have already created a True
- 8:01:03Value I need to have another if in the
- 8:01:06false value so I want to call this as
- 8:01:07group one but for remaining values I
- 8:01:10don't have else I again need a if what
- 8:01:13if I need is I need to Loop the if so
- 8:01:15here what I'm going to do is if category
- 8:01:18is three and four then it is group two
- 8:01:22so this is in the else of the first now
- 8:01:24what is the else of the second if I'm
- 8:01:25looping the if inside it so the false
- 8:01:27state when it is false what is that
- 8:01:29group
- 8:01:30three I close this if is close but right
- 8:01:33now let's focus only on this if so we
- 8:01:35have a condition when that is true what
- 8:01:38is the outcome when that is false what
- 8:01:40is the outcome this is one now look at
- 8:01:42the bigger if this is the condition when
- 8:01:44it is true what is the outcome and when
- 8:01:46it is false what is the outcome so true
- 8:01:48false outcomes I'm closing the first St
- 8:01:50enter I found there is some uh spelling
- 8:01:53mistake so let me correct
- 8:01:55those now this is correct Category 2 is
- 8:01:57in group one Category 5 is in group
- 8:02:00three Category
- 8:02:013 is in group two category 4 is in group
- 8:02:05two Category 3 is in group two category
- 8:02:071 is in group one Category 2 itself is
- 8:02:10in group one and below that category 5
- 8:02:12is in group three everything is correct
- 8:02:14now we use this group see this was only
- 8:02:18two if what happens if you have so many
- 8:02:20multiple ifs then it will become a real
- 8:02:22big challenge isn't it to Loop such
- 8:02:24things so we need something known as
- 8:02:26case statement we typically know know in
- 8:02:28the SQL very equivalent of that one and
- 8:02:30we have something known as switch here
- 8:02:32switch which is equivalent of case
- 8:02:33statement now switch can be used in two
- 8:02:35maners so first we will learn switch
- 8:02:37where we can give a column and we can
- 8:02:39handle each and every value of that
- 8:02:40column so the first we will learn the
- 8:02:42switch where we can give the switch
- 8:02:43statement with a column or with a major
- 8:02:46now here we have a column so we going to
- 8:02:47give a column and handle each and every
- 8:02:49value and then we will learn the another
- 8:02:51version which is switch true where we
- 8:02:52can give conditions like we have given
- 8:02:54in if so let me start by creating
- 8:02:55another new column and let me call that
- 8:02:57as group two now here what is going to
- 8:02:59happen is I'm will use switch now the
- 8:03:02switch I can have expression expression
- 8:03:03can be true then I have value result
- 8:03:06value result combination but it can also
- 8:03:08be a column or a measure so I'll use
- 8:03:09category as a column now when because I
- 8:03:11used a column or I used a variable which
- 8:03:14is having value not true false I need to
- 8:03:16now specify each and every value so
- 8:03:18category one what is the outcome of that
- 8:03:20group one now in this manner I have to
- 8:03:23now repeat this combination so let me do
- 8:03:25one thing let me move this comma from
- 8:03:27here to here here so that I can easily
- 8:03:28repeat it and let me remove it from here
- 8:03:30so now what I have to do is category 1
- 8:03:32group one Category 2 what should be the
- 8:03:35Category 3 category 4 last one we can
- 8:03:37leave for else which we can call as
- 8:03:40group three now here we need to change
- 8:03:42category two is one Category 3 is two
- 8:03:46group two four is group two again so
- 8:03:49this is switch statement with a column
- 8:03:52or a categorical value or something
- 8:03:54which is having a value not true and
- 8:03:56false so we have one three same groups
- 8:03:58should exist these values should match
- 8:04:00there should not be any difference and
- 8:04:01they are matching you can see so this is
- 8:04:04working now this means if I have
- 8:04:06thousands of value I need to write it
- 8:04:07down thousands of rows but what happens
- 8:04:09if I have a better matter to write it
- 8:04:10down can I use something which where I
- 8:04:12can give the conditions just like we
- 8:04:13have given in the case of if because
- 8:04:15think about numerical value where we
- 8:04:16have a range greater than equal to Z and
- 8:04:18less than5 or less than th000 will I
- 8:04:21write down 1 2,000 values no I don't
- 8:04:23want to I need something which gives me
- 8:04:25the that particular so for that we have
- 8:04:26a switch true version
- 8:04:28and to make it a little bit easier I'm
- 8:04:29going to copy this statement I'll click
- 8:04:32on any column and again create a new
- 8:04:34column we paste this statement I'll call
- 8:04:36this group three and let me move it down
- 8:04:39comment it double slash is for comment
- 8:04:43we'll use these things so we start a new
- 8:04:44Switch this switch is now this time with
- 8:04:46true we call this as switch true now
- 8:04:49what happens when you use switch true
- 8:04:51your expression should return true and
- 8:04:52false and then you have to use the value
- 8:04:54so what is my first statement my first
- 8:04:56statement is category in category 1 and
- 8:04:58two then group one I don't need to use
- 8:05:01if I simply need to use one statement
- 8:05:03which gives me true and false if it is
- 8:05:05true this is going to be my result so
- 8:05:07this statement should return true and
- 8:05:09when this return returns true it's going
- 8:05:10to give me this result if it returns
- 8:05:11false it goes to the next level so here
- 8:05:13I don't need another if looping simply I
- 8:05:16give the next statement and if this is
- 8:05:18true this is going to take the next
- 8:05:20result now after I give all these
- 8:05:22condition finally I can give one
- 8:05:25else and then I can close the switch
- 8:05:28statement so how switch true works you
- 8:05:30give a statement if it is true what is
- 8:05:32my value another statement if it is true
- 8:05:35what is my value and finally you given
- 8:05:37else value True Values True Values
- 8:05:40finally else values so if there are if
- 8:05:43if if if okay please remember in such
- 8:05:46situation the order is also really
- 8:05:47important now what happens sometime when
- 8:05:49you deal with numbers you have a choice
- 8:05:50of writing down between numbers or
- 8:05:52sometime you can simply say so let's say
- 8:05:53I say if it is greater than 80 I can
- 8:05:55give the next condition as greater than
- 8:05:5760 because greater than 80 is already
- 8:05:59covered in the first Cod and then I can
- 8:06:01give greater than 60 in that order so
- 8:06:02first is greater than 80 then 60 but if
- 8:06:05I put first greater than 60 it covers 80
- 8:06:08so it cannot you cannot have greater 80
- 8:06:10after that so the order of these
- 8:06:12conditions is also really important in
- 8:06:14some cases so you to take care how which
- 8:06:16order you are going to give it if I
- 8:06:17would have handled a multiple condition
- 8:06:19and there is some kind of um priority I
- 8:06:21need to give Whenever there is a
- 8:06:22priority which we need to give in switch
- 8:06:24statements it always need to come before
- 8:06:27remember that and based on that you will
- 8:06:29be successfully able to create switch
- 8:06:30statements enter another column created
- 8:06:33and we got the values here same as what
- 8:06:36we have got in the rest
- 8:06:38tool now let's create start creating
- 8:06:41some expression function and what I'm
- 8:06:43going to do I'm going to go to the major
- 8:06:45Table and there I'll create one of them
- 8:06:47and then we will learn more and more
- 8:06:51details on the expression function as we
- 8:06:53go move forward we will try with some
- 8:06:55basic expression functions first and
- 8:06:58then we will go little bit detail into
- 8:07:01this one but as we progress further into
- 8:07:04the deck create more formulas you will
- 8:07:06learn that we can do more powerful
- 8:07:08things so let me create a table visual
- 8:07:10on a new page I'll start with something
- 8:07:12which we discussed initially but we have
- 8:07:14not done if if you remember we have this
- 8:07:16column if you remember we had this
- 8:07:19column gross amount is nothing but
- 8:07:21quantity multip by sales price we also
- 8:07:24created a mejor on that and why this is
- 8:07:27able to give a result got as usual we
- 8:07:29are using sum of gross amount so result
- 8:07:31inan and this is creating an implicit
- 8:07:34measure gross is an explicit some of
- 8:07:36gross implicit and we when we will learn
- 8:07:39the calculation groups later it will not
- 8:07:42allow implicit measur so we'll only need
- 8:07:44to use explicit measure and that's why
- 8:07:46I'm creating explicit measure so at some
- 8:07:48stage you need to use calculation group
- 8:07:49you always have the measures which are
- 8:07:51explicitly soit measure and explicit me
- 8:07:54do I need to create a column first and
- 8:07:56then need to do so this is is not needed
- 8:07:58that is where the expression fun and
- 8:08:00expression function can be used both for
- 8:08:02column and measure we learn how to use
- 8:08:04that in a column also so first of all
- 8:08:07I'm going to create a new major and in
- 8:08:09this major I'll call it
- 8:08:11as Pro level th X now when I put this
- 8:08:15any expression function sum X main x max
- 8:08:17X count X there is nothing for distinct
- 8:08:20count as of now there's no expression
- 8:08:22function for that for these is this is a
- 8:08:24table expression now this table can be
- 8:08:26as simple as table name it could be a
- 8:08:28filter with Filter expression is going
- 8:08:30to give table then there could be
- 8:08:32complex table Expressions which will
- 8:08:34include functions like summarize all all
- 8:08:38selected all these kind of stuff would
- 8:08:40be there and then we have an expression
- 8:08:42the calculation or a major already
- 8:08:44existing Majors could be there or we can
- 8:08:46Define here now when you use Simple
- 8:08:48table it's fine you can use set of
- 8:08:49column and calculation inside that but
- 8:08:51when you we are going to do the complex
- 8:08:53measures when we have the table
- 8:08:55expression itself is in complex then we
- 8:08:57might have to use calculate few places
- 8:09:00inside the sumx itself in the expression
- 8:09:02portion that we will learn little bit
- 8:09:04later so let's start with very simple
- 8:09:06expression function here sales and we
- 8:09:08are going to use sales in the table part
- 8:09:12of the expression and in the expression
- 8:09:14we will say sales price multip by sales
- 8:09:19quantity it means I'm trying to create a
- 8:09:22roow level calculation so what's
- 8:09:23happening here this is my level and as
- 8:09:26I've given the complete table the
- 8:09:28table's row level is my row level so
- 8:09:30this expression has to execute at the
- 8:09:33each row level and and that's going to
- 8:09:35be little bit costlier calculation that
- 8:09:37compared to the simple gross which was
- 8:09:40simply a sum and that is where we might
- 8:09:42have to take a call should I create a
- 8:09:43calculated column and then majure or I
- 8:09:46simply create a mejor it's a really
- 8:09:48small data so it doesn't matter much
- 8:09:49here in this case it's going to give you
- 8:09:50same kind of performance on a larger
- 8:09:52data you might have to take that call
- 8:09:54and if you look at the numbers all these
- 8:09:56three numbers are same the than the
- 8:09:57formatting we have done formatting on
- 8:09:59the gross we can do on the gross row
- 8:10:02also the results are same the ground
- 8:10:05total is also
- 8:10:06same grand total is also same now we
- 8:10:09have used sux same way let's if you
- 8:10:12remember we done Min of gross and Max of
- 8:10:14gross we not don't want to take
- 8:10:16everything so this was gross two was Max
- 8:10:19if I want to achieve the same Max using
- 8:10:22this one can I achieve so I copy gross
- 8:10:25row Max and I can use max X here instead
- 8:10:29of and Max X also having the similar
- 8:10:35syntax and then we have a variant thir
- 8:10:38argument Returns the largest numeric
- 8:10:41value or largest string result from
- 8:10:46evaluating expression from each row of
- 8:10:49the table so you have this values which
- 8:10:51right now I don't want to use simply use
- 8:10:54this and let me add it to visualization
- 8:10:57it's giving the same result same way M
- 8:11:00so this is the simplest way to start
- 8:11:02with the expression fun expression
- 8:11:03function can be used as the col column
- 8:11:05level also but we will that little later
- 8:11:08so now let's create little bit different
- 8:11:10version of expression function so what
- 8:11:13I'm going to do here is now I'll create
- 8:11:15a new
- 8:11:16major and in this new
- 8:11:18mejor I will use a filter I'll say
- 8:11:22brand one
- 8:11:25Ross and we keep on coming back to this
- 8:11:29then I can use filter here filter
- 8:11:31function I'm using filter now
- 8:11:35the let me try to use item here I use
- 8:11:40item I say item brand equals to Brand
- 8:11:45one question close can I use sales here
- 8:11:49I'm not able to use sales the moment I
- 8:11:50use a different
- 8:11:52table other than my table which is item
- 8:11:55I can take anything from item here
- 8:11:57I can I can count the item I can count
- 8:11:59the brand I'm not able to get that so
- 8:12:02what I can use here is I can use the
- 8:12:04gross here major I can use a measure
- 8:12:05here this portion I use a filter which
- 8:12:09does not belongs to the table on which
- 8:12:11I'm using the filter in the table region
- 8:12:14if I in the expression if I use a filter
- 8:12:16which is on a table on which final my
- 8:12:18column is not there I want to do the
- 8:12:20calculation then what I have to do here
- 8:12:21is the major expression can be a major
- 8:12:24Al and as you can see this is giving the
- 8:12:26correct value but there's one more way
- 8:12:28now not for the brand one let's say I
- 8:12:30want to filter something as quantity or
- 8:12:33something on the sales table itself if I
- 8:12:34want to filter something on sales table
- 8:12:36let's say
- 8:12:41gross
- 8:12:43sales
- 8:12:45one
- 8:12:47THX filter I can use
- 8:12:51sales
- 8:12:53item sales sales Item ID equals to one
- 8:12:58close the filter and then I can use
- 8:12:59sales quantity I can sum the sales
- 8:13:01quantity or maybe because we are using
- 8:13:03gross so we for us to know
- 8:13:08price I got brand the item one is
- 8:13:11falling in this category so I'm getting
- 8:13:13this now not only filter I can give this
- 8:13:15single value I can also make do a little
- 8:13:18bit more complex stuff so the filter
- 8:13:21expression could be really complex I can
- 8:13:22have multiple conditions I can use in or
- 8:13:25all those stuff I can do
- 8:13:27we that we'll learn when we are doing
- 8:13:29calculate but one thing I would like to
- 8:13:30tell you before we move ahead with the
- 8:13:33more complex functions is that I can
- 8:13:36here I can say let's say sales
- 8:13:40qy quantity sales
- 8:13:43quantity greater than let me call it as
- 8:13:45gross sales so now it's going to sum
- 8:13:48everything which is greater than two you
- 8:13:50remember we have done some kind of
- 8:13:52visual level filter for that now there's
- 8:13:53no need of visual filter I have actually
- 8:13:56made it part of the EXP function so this
- 8:13:58is very basic start of the expression
- 8:14:00function do and as we progress further
- 8:14:03we will learn more complex which we can
- 8:14:07do so let's Now understand the
- 8:14:10difference between filtering a data in
- 8:14:13calculate with and without filter
- 8:14:15function so let's say we want to give a
- 8:14:17filter expression in the calculate
- 8:14:21without using a filter function how
- 8:14:23would we give let's say calculate net
- 8:14:25item brand equal to Brand one we want to
- 8:14:27use filter function how would we give
- 8:14:29we'll give calculate net filter item
- 8:14:32item brand equal to Brand one now when
- 8:14:35the visual will contain brand into the
- 8:14:38visualization you will see a difference
- 8:14:40you might not see difference when when
- 8:14:42item brand is not in the visual context
- 8:14:45so you may not be able to see that
- 8:14:47difference if we are having the visual
- 8:14:50on category because at that time the
- 8:14:52visual filter context is not filtering
- 8:14:55brand it is filter ing category so you
- 8:14:58might not see the difference so what's
- 8:15:00the basic difference when we do this so
- 8:15:02the calculate function without a filter
- 8:15:05function you directly apply the filter
- 8:15:07to specific column with the calculation
- 8:15:10this modifies the filter context and
- 8:15:13effect how the expression is evaluated
- 8:15:15the calculate without a filter
- 8:15:17expression applies filter directly to
- 8:15:20the column altering the filter context
- 8:15:23and impacting the calculation so it's
- 8:15:25alter the filter context and later on
- 8:15:27you will understand that it is basically
- 8:15:29what it is doing it it is removing the
- 8:15:32item Brands filter context in the visual
- 8:15:35so is basically it is saying like all
- 8:15:37item brand and then brand equal to Brand
- 8:15:40one so your row of the visual which is
- 8:15:44actually showing you brand 1 2 3 4 that
- 8:15:48filter context of visual is not getting
- 8:15:51honored and you are still getting the
- 8:15:54data of brand one but it is going to
- 8:15:56display played against all the brands
- 8:15:59this is what is happening so I'll
- 8:16:01explain you when we go to the power VI
- 8:16:04that in such scenarios what this first
- 8:16:07statement is equivalent of Now using
- 8:16:10filter function with calculators allows
- 8:16:12you to create a filtered table based on
- 8:16:15specific condition so basically the data
- 8:16:17is getting filtered this offers a more
- 8:16:20flexible approach of defining the filter
- 8:16:23context and customizing the calculation
- 8:16:26in interacts with the data calculate
- 8:16:29with a filter expression construct a
- 8:16:31custom filter context by creating a
- 8:16:34filter table based on specific criteria
- 8:16:37and Returns value based on that so
- 8:16:39basically your data itself is getting
- 8:16:41reduced so basically what happens when
- 8:16:44you use this filter function and let say
- 8:16:46you use with the brand because the data
- 8:16:48is already getting filtered you only
- 8:16:50have the brands one data you're going to
- 8:16:51see only brand once row so these are the
- 8:16:54main differences and we have to
- 8:16:57understand that with the example now we
- 8:16:59will understand this calculate functions
- 8:17:01little bit more in detail then we don't
- 8:17:05use filter and simply try to filter the
- 8:17:07data what happens then so we will bring
- 8:17:10in our calculate page from here and in
- 8:17:14this one had major bring this visual
- 8:17:17copy paste now in this one I'm I only
- 8:17:21right now bothered about how do we
- 8:17:24calculated this brand one net that's
- 8:17:27understand brand one net was so brand
- 8:17:30one net was
- 8:17:31calculate net we use a filter so when we
- 8:17:35are simply using the filter function it
- 8:17:37is filtering the brand one's data and
- 8:17:39that is what you are able to see here
- 8:17:41that you're only seeing the row which
- 8:17:43contains the brand word data so the data
- 8:17:45has been filtered to give us only data
- 8:17:48for brand one in this case let's try a
- 8:17:52different
- 8:17:54way actually
- 8:17:56we can also do we don't need a
- 8:18:00filter without using the filter fun item
- 8:18:03brand one it's call it
- 8:18:06BR in the first case what was happening
- 8:18:09when you use the filter the data was
- 8:18:12like second
- 8:18:15case and if I would have removed this
- 8:18:17one and this one it's
- 8:18:19actually only going to give me brand one
- 8:18:22in this case if I bring in it's first is
- 8:18:25going to bring all the brand so here
- 8:18:27brand columns is filtering brand one
- 8:18:30which means the filter is applied to all
- 8:18:32the rows and there is no filter to the
- 8:18:34table filter retains and interacts with
- 8:18:37the initial filter context while filter
- 8:18:39expression directly in calculate ignores
- 8:18:42it it means that filter contexts on the
- 8:18:44brand one overrides the other filters
- 8:18:47which are inside the visual specific
- 8:18:49especially visual rle as well as outside
- 8:18:51the visual let me do one more variation
- 8:18:54of this
- 8:18:57I
- 8:18:58go and put here category instead of
- 8:19:02brand then there's no difference only
- 8:19:05when I view it by brand when it is brand
- 8:19:09uses a
- 8:19:10filter without filter function it's
- 8:19:13giving me the brand one value everywhere
- 8:19:16this is something really useful when you
- 8:19:17want want to use only brand one's value
- 8:19:20or whatever you filter that value you
- 8:19:21want to use across the values understand
- 8:19:23this thing the filter of brand one has
- 8:19:25been applied on the row every row is
- 8:19:28only giving you brand one so what's
- 8:19:30happening in this case is basically the
- 8:19:32brand one is getting filtered and that
- 8:19:34particular value is available now for
- 8:19:37all the rows of the brands so whether it
- 8:19:39is brand 2 brand three Brand 4 all the
- 8:19:41brands are going to show you only brand
- 8:19:44one's value so we have the brand one
- 8:19:46value displayed against all the brands
- 8:19:49because the column has been filtered for
- 8:19:52the brand one now how can we achieve
- 8:19:55otherwise in what it is equivalent of
- 8:19:58can we understand it better to
- 8:20:00understand it better let me tell
- 8:20:03you equalent of which which will help
- 8:20:06you to understand let's go back to this
- 8:20:10one calculate
- 8:20:12again what it is equivalent now we
- 8:20:15already understood the all you
- 8:20:18understand if I use all item brand here
- 8:20:21what would
- 8:20:22happen it would remove the context so
- 8:20:26when when we are using this all item
- 8:20:28brand what it is going to do it's going
- 8:20:29to remove the filter context of item
- 8:20:32brand means if you filter the data for
- 8:20:34brand it will not apply neither it will
- 8:20:37apply the Brand's context in the visual
- 8:20:40so in the visual row if you have a brand
- 8:20:41three brand four brand five that is not
- 8:20:43going to be applied so this has been
- 8:20:45entirely removed so what should I have
- 8:20:47given if I simply say all item brand
- 8:20:49grand total but now what I'm saying
- 8:20:50after that is now let's put the filter
- 8:20:52of item brand equal to Brand one what is
- 8:20:54happening now you have all the item
- 8:20:56Brands out of which you are only
- 8:20:58bringing in brand one now what we going
- 8:21:00to do here is we'll bring this
- 8:21:06in let's bring it inside the
- 8:21:09visual it's same as this one so what's
- 8:21:12happening now that in the visualization
- 8:21:14when you going to see the each row which
- 8:21:16is talking about a brand it is not
- 8:21:18filtering the brand because of all item
- 8:21:20brand but it is getting the value of
- 8:21:23brand one because what we have said all
- 8:21:24item brand then filter the item brand
- 8:21:27equal to Brand one so it is only getting
- 8:21:28the value of brand one for each rows so
- 8:21:31the filter context has been removed and
- 8:21:34especially when it is displayed in the
- 8:21:36visual so especially when the brand
- 8:21:38itself is appearing in the visual the
- 8:21:40visuals filter context of the row is
- 8:21:42also getting removed and based on the
- 8:21:44value which we have filtered here in our
- 8:21:46measure based on that only we are
- 8:21:48getting the value displayed so sometime
- 8:21:51what would happen if you think that I'll
- 8:21:53just simply say item brand equal to
- 8:21:54Brand one or item brand equal to brand
- 8:21:56one brand two brand three or I use the
- 8:21:58or statement it's going to be same as
- 8:22:00what I use in filter that's not it's not
- 8:22:02same so calculate with Filter function
- 8:22:05and without filter function are not same
- 8:22:07remember this when you are doing your
- 8:22:09calculation now we would discuss the
- 8:22:12differences between all and all selected
- 8:22:14let's look at the very simple syntax of
- 8:22:17all and all selected so now this is net
- 8:22:20all means net calculate net and all and
- 8:22:23in all I can specify a column here and
- 8:22:25table here this is without specifying
- 8:22:27anything similarly net all using
- 8:22:29calculate net all selected now what is
- 8:22:31the difference in between these two so
- 8:22:33basically what happens as we have
- 8:22:34learned in the past we have something
- 8:22:36known as filter context now filter
- 8:22:38context may come because of slicers
- 8:22:40filters or maybe because of the visual
- 8:22:42visual row is Alo going to put a filter
- 8:22:44context on the data now all is going to
- 8:22:47remove everything we'll learn this with
- 8:22:49an example all disregards the filter on
- 8:22:51a specific column or a table to retrieve
- 8:22:53unfiltered data for the calculation for
- 8:22:55the every value it's going to that on
- 8:22:57particular column or a table whatever we
- 8:22:59have used there now all selected
- 8:23:01preserve the user selection of filter so
- 8:23:03user selection of filter that you have
- 8:23:05done that filter context would be
- 8:23:07preserved in the specified column while
- 8:23:09removing the filter from the other
- 8:23:11column allowing The Selective adjustment
- 8:23:13so this is going to happen in the all
- 8:23:14selected so what is in short we can say
- 8:23:16that all ignores the filter context
- 8:23:19including the filter and the the visual
- 8:23:21filter row context means the visual row
- 8:23:23which is going to put a filter context
- 8:23:24that is also going to be removed but on
- 8:23:26the other hand all selected is only
- 8:23:28going to ignore the visuals filter
- 8:23:30context which is basically because of
- 8:23:32the row of the visual so let's
- 8:23:34understand with an example let me come
- 8:23:36up with brand net
- 8:23:40visual make it as a table visual
- 8:23:43duplicate
- 8:23:44this create a little smaller visual with
- 8:23:47category I'm adjusting the sizes in the
- 8:23:51second visual I'm clicking on the brand
- 8:23:53arrow and then I'll make it cut I need
- 8:23:56like sers also and I'm going to use
- 8:23:57Simple slicer here I'll use brand
- 8:24:01slicer copy paste let me change this
- 8:24:05with category
- 8:24:07slicer copy paste and state
- 8:24:11slicer I added three slices in this one
- 8:24:14I'll use
- 8:24:16State I have three slices let me convert
- 8:24:19this one into drop
- 8:24:22down instead of net I've taken margin
- 8:24:25here so let me correct that
- 8:24:28clearly here
- 8:24:30net net is the measure we are going to
- 8:24:32use predominantly in all of calculation
- 8:24:34but let me sort it descending here now
- 8:24:36what I want here is I want a grand do I
- 8:24:39get a grand total we'll take help of
- 8:24:41calculator let's create a new major for
- 8:24:43the grand total click can click on any
- 8:24:45of the major and get a Major
- 8:24:48Tool and here we will go ahead and say
- 8:24:53total net brand so we'll say calculate
- 8:24:58this calculate we can use the Expression
- 8:25:00also but we'll start with net now there
- 8:25:02is function all which can help us what
- 8:25:05does all can take all can take all can
- 8:25:07take table or a column name what is
- 8:25:09there in this column is let's why don't
- 8:25:11we start with the column name that we
- 8:25:14use item
- 8:25:16brand I drag it here and here you can
- 8:25:19see I'm seeing grand total let me put it
- 8:25:21to other visual in other visual where
- 8:25:24there is a category I am not seeing that
- 8:25:27grand total on each row why it is
- 8:25:29happening because here in the case of
- 8:25:32brand I am saying all item brand and it
- 8:25:35should remove the filter context of all
- 8:25:38item brand so the filter context of item
- 8:25:41brand has been removed and that is why
- 8:25:45each row of the brand is giving me the
- 8:25:48grand total but we have not told that to
- 8:25:51remove the filter context of category
- 8:25:53and that is why what You observe that
- 8:25:55the filter cont context of the category
- 8:25:57is not getting removed in the visual
- 8:25:59rows so visual rows are still applying
- 8:26:03the filter context of categories but the
- 8:26:07grand total is not getting that filter
- 8:26:09because in the grand total now again we
- 8:26:11are able to ignore the filter context
- 8:26:14now when I select brand 3 now what is
- 8:26:17happening here is you are only able to
- 8:26:18see brand 3's value when you see brand
- 8:26:213's value you will observe that in case
- 8:26:23of the brand visual we are able to see
- 8:26:26the grand total value external filter or
- 8:26:28the filter which is coming is going to
- 8:26:30reduce the visual to only brand three
- 8:26:33but the context of the filter has been
- 8:26:37removed from the visual Row the context
- 8:26:40of the visual and the context of the
- 8:26:42slicer filter has been removed and we
- 8:26:45are getting ground total both in the row
- 8:26:48where I'm getting brand three as well as
- 8:26:50grand total while in case of the
- 8:26:52category visual we are getting two
- 8:26:54categories now we are getting two
- 8:26:56categories because of the brand 3 again
- 8:26:57because brand 3 contain two categories
- 8:26:59but for those category the category
- 8:27:01filter is still applying so because of
- 8:27:05that category filter I'm getting the
- 8:27:08data for those rows based on the
- 8:27:11category but the grand total again I'm
- 8:27:13able to ignore item brand I'm getting
- 8:27:15the total one now if I add brand two and
- 8:27:17brand three as you can see in the brand
- 8:27:20visual I am getting both the rows I'm
- 8:27:23getting the grand total which is is
- 8:27:26ignoring the visual as well as the
- 8:27:29slicer filter context and as you can see
- 8:27:31in the category visual as expected it is
- 8:27:34able to use the category filter context
- 8:27:38in the visual but the grand total again
- 8:27:40it is ignoring all the filter contexts
- 8:27:43because in the grand total anyway
- 8:27:44category is not available and I am able
- 8:27:46to get grand total so we got total
- 8:27:49Network what happen need both case of
- 8:27:51category and item intr category and item
- 8:27:53belongs to same table is it what I can
- 8:27:55do here is I can go ahead and create
- 8:27:58this majure again and this time instead
- 8:28:01of item brand I simply use item what
- 8:28:04happens I'll call it total net
- 8:28:07item I'll bring in into the first visual
- 8:28:10I'll bring it second visual now in this
- 8:28:11case what you are observing that both
- 8:28:14the visuals are showing the grand total
- 8:28:17even the categories uh filter context
- 8:28:20and the bran filter context from the
- 8:28:22visual has been removed the reason for
- 8:28:25that is basically basically that we are
- 8:28:27using the item table so any which we are
- 8:28:30using from the item table in the visual
- 8:28:32will not be able to force a context
- 8:28:34similarly the slices will not be able to
- 8:28:36force a context and the visuals will not
- 8:28:38be able to force the contact even if I
- 8:28:40remove those brand two and brand three
- 8:28:43now you will see all the values and in
- 8:28:45case of all the values again we are
- 8:28:46going to get the total for all the rows
- 8:28:49because the the filter context of all
- 8:28:52the brand and category has been removed
- 8:28:54from each row and we are getting grand
- 8:28:56total in the each of the visual but what
- 8:28:58happens when I put the state filter
- 8:29:00let's say I put the state filter on
- 8:29:02Alaska now you are seeing that the
- 8:29:04filter context is applied but the visual
- 8:29:07Rose filter is not getting applied we
- 8:29:09are getting the Alaska gr R why it is
- 8:29:11because again the filter was on item for
- 8:29:13the specifically for the second column
- 8:29:15so it is ignoring the items uh filter
- 8:29:18context but it can't ignore the states
- 8:29:19filter context because we have not
- 8:29:21talked about the state into our formula
- 8:29:24so because we have not talked about the
- 8:29:26State into our formula it cannot ignore
- 8:29:29the filter context or the filter of
- 8:29:31State in the visualization so
- 8:29:33visualization will get filtered for the
- 8:29:35state but it will remove the context of
- 8:29:39brand and category because we have said
- 8:29:42all item what can I do here here comes
- 8:29:45my third all
- 8:29:47formula and the third all formula is
- 8:29:50when where we going to remove everything
- 8:29:52now all can have multiple columns if you
- 8:29:55want I can say sales or I don't say
- 8:29:57anything one of the two things I can do
- 8:29:59I'll have this two formulas in one go so
- 8:30:03I'll say total net Els one major I can
- 8:30:07have one more version of this one
- 8:30:10without this one now because all the
- 8:30:12dimensions are getting applied at the S
- 8:30:14so most of the time these may end up
- 8:30:16giving us the same result I'll bring in
- 8:30:18net and let's not add it to the second
- 8:30:21one there's no need of that now as you
- 8:30:23can see when we have bought this total
- 8:30:26net and total net sales where we have
- 8:30:28used the sales table it is also start
- 8:30:31ignoring the states context why it has
- 8:30:34been started ignoring the states filter
- 8:30:36context because the all has been applied
- 8:30:38on the sales table so anything passing
- 8:30:39to the sales table is getting ignored if
- 8:30:42you apply the filters now if you apply
- 8:30:43let's say brand filter your values will
- 8:30:45reduce because this is going to reduce
- 8:30:49the values in the filter but the rows
- 8:30:51which are still remaining for that the
- 8:30:55filter context the way all is removing
- 8:30:58will still apply same way if you filter
- 8:31:01category again you will get the data of
- 8:31:04brand and category based on your
- 8:31:06filter only that much categories or that
- 8:31:09much brand but yes in the for the
- 8:31:11individual row of the visual the filter
- 8:31:14context would be removed complete filter
- 8:31:16context would be removed but what does
- 8:31:19it gives us it gives us the gr to this
- 8:31:21is all for us let's learn about all
- 8:31:24select for that what I'm going to do is
- 8:31:26I'm going to duplicate it want to keep
- 8:31:28everything as is removing the
- 8:31:30filter and let me do one thing I'll keep
- 8:31:33only this one because rest of the
- 8:31:35behavior in case of all selected is
- 8:31:38going to be same what's the major
- 8:31:39difference between all and all let's
- 8:31:42start now let me create this measure
- 8:31:45with the all selected so what's the
- 8:31:46difference between this all and all
- 8:31:48selected so in case of all selected what
- 8:31:50would happen here is basically all
- 8:31:53selected is going to honor the filters
- 8:31:55which we apply
- 8:31:56but it is not going to honor the visuals
- 8:31:59rows which are putting the visual filter
- 8:32:01the visuals rows filter contexts would
- 8:32:03be ignored but the filters filter cannot
- 8:32:06be ignored so let's say if I put filter
- 8:32:08on brand 12 you can see that the all
- 8:32:12selected is showing me only the brand
- 8:32:1312's value it is not showing me overall
- 8:32:16value why because it is going to honor
- 8:32:19the external filters or the slicer which
- 8:32:21has been applied in within that boundary
- 8:32:23it will show me the total so if I select
- 8:32:25let's say brand 12 13 and 2 now it is
- 8:32:29showing me total of these three for all
- 8:32:32selected one so it is ignoring the
- 8:32:35visual row filter context now let me
- 8:32:38modify the other visual the same job
- 8:32:40what I'm going to do is I'm to change
- 8:32:42this instead of category I'll bring in
- 8:32:45state here from the geography
- 8:32:48Dimension let me go ahead and remove
- 8:32:51these two and bring in
- 8:32:54total a little bit more WID for this
- 8:32:56what do you see so what you are doing
- 8:32:58here is you are saying the ignore the
- 8:33:00filter context of item not of state and
- 8:33:04because you are not ignoring the filter
- 8:33:07context of State the state values are
- 8:33:10still filtering your visual rows and you
- 8:33:13are getting the state level data I do do
- 8:33:15this we go and ignore the context of
- 8:33:17Sals table itself Sal item n it's all
- 8:33:21selected I'm saying ignore all the
- 8:33:23context which is coming to this this
- 8:33:25I'll add this the first table I'll add
- 8:33:26this table and we require a lot of
- 8:33:30overlap now when I use the sales now
- 8:33:32what happened the all selected applies
- 8:33:35on these sales all selected now is going
- 8:33:38to ignore anything which is coming to
- 8:33:40the sales table and because of that now
- 8:33:42you are going to get the total which is
- 8:33:45of my selected values and it will be
- 8:33:48displayed for each rows now in case you
- 8:33:50apply a state filter it will honor that
- 8:33:52also now so whatever filters you apply
- 8:33:54that will be honored
- 8:33:57irrespective of what dimension they are
- 8:33:59coming so your grand total will depend
- 8:34:01on the filter selection in case of all
- 8:34:03selected and based on that particular
- 8:34:06set of filters it is going to give you
- 8:34:08the grand total you can have an all
- 8:34:10selected without the sales table this
- 8:34:13case we to give almost similar kind of
- 8:34:15results because the sales table is the
- 8:34:18base table where we applied or the base
- 8:34:20back table where we applied so now you
- 8:34:22have understood the difference between
- 8:34:24all and all selected so there would be
- 8:34:27times when we are going to use these
- 8:34:29especially in time intelligence let's
- 8:34:31say I want to create a PRI previous
- 8:34:33period you might not select a previous
- 8:34:35period because previous period might not
- 8:34:37be in my filter criteria so let's say I
- 8:34:40selected current one now when I selected
- 8:34:41current month I need previous month I
- 8:34:43need to ignore date tables filter
- 8:34:46context completely and then bring in the
- 8:34:49previous month's value so in that case
- 8:34:50I'm going to use all but if the values
- 8:34:52are available within my filter context
- 8:34:55and I want to play around then in that
- 8:34:56case what I can use I can use all
- 8:34:58selected so let's say I want percentage
- 8:35:00of total irrespective of my selection
- 8:35:03then I'll use all or I need percentage
- 8:35:05of total based on my selection I'll use
- 8:35:07all selected I use I want my rank rank
- 8:35:10based on the original values without
- 8:35:13considering any filter I'll use all I
- 8:35:15want rank based on my selection I'll use
- 8:35:18all selected so these are the some
- 8:35:19places where you will use all or all
- 8:35:22selected depending on what exactly you
- 8:35:25wanted to a a let's learn about remove
- 8:35:28filters let me bring in state and city
- 8:35:31here create it as a table Visual and add
- 8:35:34a net Also let's have a filter MD space
- 8:35:38click on filter we'll get it here
- 8:35:40control C control V second dimension
- 8:35:43take one from geography Dimension that
- 8:35:45is State take one from item Dimension
- 8:35:47that is brand we got our visual we have
- 8:35:49certain values and let's make it as a
- 8:35:51matrix in The Matrix visual build visual
- 8:35:55we have the to now create a major net
- 8:35:59all what would happen calculate net
- 8:36:04all geography City
- 8:36:08it we bring it here what we seeing that
- 8:36:12look at this the state filter is not
- 8:36:14getting ignored only the city filter is
- 8:36:16getting if you apply some filter that
- 8:36:20filter is
- 8:36:21obeyed and if you're applying some
- 8:36:23filter which is on state that is getting
- 8:36:26obeyed because we said all of City not
- 8:36:28of state or not of
- 8:36:29geography take this and now we use
- 8:36:33remove
- 8:36:34fi this is something which we are also
- 8:36:36trying which is also known as
- 8:36:39exclude exclude level of details so we
- 8:36:43are trying here is excluding the level
- 8:36:45of details so the city is present but we
- 8:36:47are trying to ignore that but we got the
- 8:36:50remove filters now what is the syntax of
- 8:36:52remove filters remove filters table or
- 8:36:54column name so in this case we want to
- 8:36:56use column names you can have more than
- 8:36:58one column names we can have geography
- 8:37:00City here to ignore this one
- 8:37:05remove so same results we are getting
- 8:37:07it's almost same I filter brand one the
- 8:37:09results are same the brand one is going
- 8:37:11to pass the remove cities here again the
- 8:37:14state filter is going to pass to check
- 8:37:16the cities filter what happens when we
- 8:37:18apply cities it's almost behaving like
- 8:37:21your all filter removing the contract
- 8:37:24it's easy to remember that okay I'm
- 8:37:25removing something now let's bring in
- 8:37:28city as a
- 8:37:29filter drag City here create it as a
- 8:37:33slicer as you can see this is net number
- 8:37:36is smaller and the all number and remove
- 8:37:39filter number is bigger basically the
- 8:37:41filter context of C
- 8:37:59and we can have multiple columns as per
- 8:38:01requirement so we can in the remove
- 8:38:02filters we can use multiple columns if I
- 8:38:05want to add State here I can add State
- 8:38:06they are all from same table this is
- 8:38:10what we call exclude level of detail
- 8:38:13which can be achieved using remove
- 8:38:15filters let's learn about all except all
- 8:38:18except is something like you know means
- 8:38:20ignore everything other
- 8:38:23than all except so I copied a visual
- 8:38:27from the other one and let me remove few
- 8:38:30of things
- 8:38:33here let me bring in
- 8:38:37net so let's say I want to remove all
- 8:38:40the filter other than it let's bring in
- 8:38:43the filters
- 8:38:50also I name the pages I want to create a
- 8:38:54major which should IGN know everything
- 8:38:56other than geography St we create a
- 8:39:00major net
- 8:39:03eight let say calculate calculate can
- 8:39:06take various things now you might have
- 8:39:08learned till now all except what does
- 8:39:12all accept does it takes a table and the
- 8:39:15column name table and the set of column
- 8:39:17names so table name could be the table
- 8:39:19for which you are going to give the
- 8:39:21column and the beauty of this function
- 8:39:23is it can take a fact table and related
- 8:39:25Dimension the one side tables can also
- 8:39:27be but we will start with geography
- 8:39:30table is compulsory here and then we'll
- 8:39:33see geography 8 what we are seeing you
- 8:39:37only obey geography 8 no other filter
- 8:39:40now we bring in here and as you can see
- 8:39:44that it ignored the city filter in the
- 8:39:48visualization okay very good it ignored
- 8:39:51the CD
- 8:39:52filter but what happens if I put a
- 8:39:55filter of
- 8:39:56brand filter of the brand coming from
- 8:39:59other dimension is not getting ignored
- 8:40:02what happens if I selectricity
- 8:40:05here this filter is applied but the
- 8:40:09state is getting filtered because of
- 8:40:11this city the Texas is the only data
- 8:40:14which I'm getting at the row level and
- 8:40:16there it's ignoring the city filters but
- 8:40:20overall it is Texas only and we know
- 8:40:22anytime we apply a filter but in the
- 8:40:25ground totally ignoring everything so
- 8:40:27whenever we apply a filter or what we
- 8:40:29can call external filter or slicer it is
- 8:40:32going to reduce the value in the
- 8:40:34visualization means your categories your
- 8:40:37cities your city state category brand
- 8:40:40subcategory are going to reduce on based
- 8:40:42on what you have selected but now within
- 8:40:45that selection further we can ignore the
- 8:40:48filters even the filter which we have
- 8:40:50applied externally its value can be
- 8:40:53ignored while showing the value like I
- 8:40:55will still be able to show grand total
- 8:40:56or a total of a state or a total of a
- 8:40:58city ignoring that filter but I can't go
- 8:41:01beyond the set of values which is
- 8:41:04defined by my slicer or filter you to
- 8:41:06remember
- 8:41:08that that's also fine so what does it
- 8:41:11means that the filter from the other
- 8:41:13dimension continue to pour in further
- 8:41:16let's duplicate
- 8:41:18this and here in this visual now me open
- 8:41:22the build instead of C I want to bring
- 8:41:24in I
- 8:41:26category I want let's say use
- 8:41:29category what do we see here there is no
- 8:41:33total all except state it is still
- 8:41:36considering the category it's not
- 8:41:38removing that it's not removing category
- 8:41:40so it's not the state total it State
- 8:41:43total is only coming at the state level
- 8:41:46in this visual but in this visual if you
- 8:41:49would have the state total was coming in
- 8:41:53why is it so because what we have said
- 8:41:55here is that in the geography table you
- 8:41:58only obey a filter now that's what it
- 8:42:01was doing it worked for geography
- 8:42:04Dimension state and city but it is not
- 8:42:06working for the item Dimensions category
- 8:42:08because our formula was only talking
- 8:42:11about geography Dimension and geography
- 8:42:13Dimension State there was no mention of
- 8:42:15item category Dimension and and that is
- 8:42:17why when the major we have used there
- 8:42:19with the category is not able to ignore
- 8:42:22the category filter in our visual ual
- 8:42:25and is still giving the category level
- 8:42:27data filtered based on the
- 8:42:30categories proc is not how do I do that
- 8:42:33and that is something which is famously
- 8:42:35also known as fixed level of detail I
- 8:42:38want fix it I only want that one how do
- 8:42:42I achieve fixed level of detail in this
- 8:42:46major let's go ahead and try that out
- 8:42:49copy this and new
- 8:42:52major and can all accept give me me a
- 8:42:55fixed level of details I use sales here
- 8:42:59sales and after that geography State and
- 8:43:02that's what I told you also that all
- 8:43:04except function you can give the central
- 8:43:06fact table and then you can use one side
- 8:43:08of the table in the
- 8:43:10relationship you'll call it all
- 8:43:13accept net all
- 8:43:17accept let me bring in
- 8:43:20this no
- 8:43:23differences but when when I put the
- 8:43:25brand filter you notice one thing that
- 8:43:29my state totals are now ignoring the
- 8:43:32brand filter filters are no more
- 8:43:35considered look at this
- 8:43:38total when I put the filter the
- 8:43:43same let me go to the second
- 8:43:47page let me put this here net all
- 8:43:52Exel and now you see that this
- 8:43:58portal is same and it ignored the
- 8:44:01category
- 8:44:03also it is like fixed level of details
- 8:44:07so level of detail has been fixed at the
- 8:44:10state level it's giving me the state
- 8:44:13value and definitely state is in the
- 8:44:15context that's really
- 8:44:17important so in this manner all except
- 8:44:20can help us ignoring filter now now you
- 8:44:24can have multiple of them like in this
- 8:44:26case if I simply would have wanted
- 8:44:29category and it I could have done
- 8:44:32that because it uses a central table
- 8:44:37it's not like all or all selected where
- 8:44:39you can't have from the related table
- 8:44:43here you can
- 8:44:44have item
- 8:44:52category and you can get the result same
- 8:44:54as this
- 8:44:55one
- 8:44:58why because it's going to obey the two
- 8:45:01filters it's going to obey State and
- 8:45:03category now it's obing the two filters
- 8:45:05State and
- 8:45:06category this is going to remain same
- 8:45:09now let me filter the
- 8:45:11brand now when you look at here this
- 8:45:15total is different from this
- 8:45:19one this is 90 these all are 90 these
- 8:45:24are the my category 1 and category 4
- 8:45:27total so remember 24,000 and
- 8:45:2916,000 let me go back and remove the
- 8:45:33filter of brand one you are having this
- 8:45:35is category 1
- 8:45:3724,000 category 16,000 these values
- 8:45:42remain intact when I any filter now if I
- 8:45:46add one more child
- 8:45:49here this visual I'll go ahead and add
- 8:45:52let's
- 8:45:53say it
- 8:45:56and explore that the next
- 8:46:00level what you will see here is look at
- 8:46:04this this category a total is still
- 8:46:08intact because of all except category
- 8:46:12state
- 8:46:13level is it at the state
- 8:46:15level city is getting ignore this is how
- 8:46:20you use all accept so let's Now
- 8:46:23understand the difference between
- 8:46:25filtering a data in calculate with and
- 8:46:28without filter function so let's say we
- 8:46:31want to give a filter expression in the
- 8:46:34calculate without using a filter
- 8:46:36function how would we give let's say
- 8:46:38calculate net item brand equal to Brand
- 8:46:40one when we want to use filter function
- 8:46:42how would we give we give calculate net
- 8:46:45filter item item brand equal to Brand
- 8:46:48one now when the visual will contain
- 8:46:50brand into the visualization you will
- 8:46:53see a difference you might not see
- 8:46:55difference when when item brand is not
- 8:46:57in the visual context so you may not be
- 8:47:01able to see that difference if we are
- 8:47:03having the visual on category because at
- 8:47:06that time the visual filter context is
- 8:47:09not filtering brand it is filtering
- 8:47:11category so you might not see the
- 8:47:13difference so what is the basic
- 8:47:15difference when we do this so the
- 8:47:16calculate function without a filter
- 8:47:19function you directly apply the filter
- 8:47:21to specific column with the calculation
- 8:47:24this this modifies the filter context
- 8:47:26and effect how the expression is
- 8:47:29evaluated the calculate without a filter
- 8:47:32expression applies filter directly to
- 8:47:34the column altering the filter context
- 8:47:37and impacting the calculation so it's
- 8:47:39alter the filter context and later on
- 8:47:41you will understand that it is basically
- 8:47:43what it is doing it it is removing the
- 8:47:46item brand filter context in the visual
- 8:47:49so basically it is saying like all item
- 8:47:52brand and then brand equal to brand so
- 8:47:55your row of the visual which is actually
- 8:47:59showing you brand 1 2 3 4 that filter
- 8:48:02context of visual is not getting honored
- 8:48:06and you are still getting the data of
- 8:48:08brand one but it is going displayed
- 8:48:11against all the brands this is what is
- 8:48:14happening so I'll explain you when we go
- 8:48:17to the power VI that in such scenarios
- 8:48:20what this first statement is equivalent
- 8:48:23of Now using filter function with
- 8:48:25calculators allows you to create a
- 8:48:27filtered table based on specific
- 8:48:30condition so basically the data is
- 8:48:31getting filtered this offers a more
- 8:48:34flexible approach of defining the filter
- 8:48:37context and
- 8:49:13now we will understand this calculate
- 8:49:16functions little bit more in detail then
- 8:49:19we don't use filter and simply try to
- 8:49:22filter the data what happens then so
- 8:49:24we'll bring in our calculate page from
- 8:49:28here and in this one add measure bring
- 8:49:31this visual copy paste now in this one I
- 8:49:36only right now bother about how do we
- 8:49:39calculated this one one net let's
- 8:49:42understood brand one net was brand one
- 8:49:45net was
- 8:49:46calculate n we use a filter so when we
- 8:49:50are simply using the filter function it
- 8:49:52is filtering the brand bu data and that
- 8:49:55is what you are able to see here that
- 8:49:56you're only seeing the row which
- 8:49:58contains the brand word data so the data
- 8:50:01has been filtered to give us only data
- 8:50:04for brand one in this case let's try a
- 8:50:07different
- 8:50:09way
- 8:50:11actually we can also do we don't need a
- 8:50:15filter without using the filter fun item
- 8:50:18brand one let's call it
- 8:50:22brand in the first case what was
- 8:50:24happening when you use the filter the
- 8:50:26data
- 8:50:27was second
- 8:50:30case and if I would have removed this
- 8:50:32one and this one
- 8:50:34actually only going to give me brand one
- 8:50:38in this case if I bring in it's first is
- 8:50:40going to bring all the brands so here
- 8:50:43brand columns is filtering brand one
- 8:50:45which means the filter is applied to all
- 8:50:47the rows and there is no filter to the
- 8:50:49table filter retains and interacts with
- 8:50:52the initial filter context while filter
- 8:50:54expression directly in calculate ignores
- 8:50:57it it means that filter context on the
- 8:50:59brand one overwrites the other filters
- 8:51:02which are inside the visual specific
- 8:51:04especially visual rule as well as
- 8:51:06outside the visual let me do one more
- 8:51:09variation of
- 8:51:11this I
- 8:51:13go and put here category instead of
- 8:51:17brand then there's no difference only
- 8:51:20when I view it by brand when it is brand
- 8:51:24uses the
- 8:51:26filter without filter function it's
- 8:51:28giving me the brand one value everywhere
- 8:51:31this is something really useful when you
- 8:51:32want to want to use only brand one's
- 8:51:35value whatever you filtered that value
- 8:51:36you want to use across the values
- 8:51:38understand this thing the filter of
- 8:51:40brand one has been applied on the row
- 8:51:43every row is only giving you brand one
- 8:51:45so what's happening in this case is
- 8:51:46basically the brand one is getting
- 8:51:48filtered and that particular value is
- 8:51:51available now for all the rows of the
- 8:51:53brands whether it is brand two brand
- 8:51:55three brand four all the brands are
- 8:51:57going to show you only brand one's value
- 8:51:59so we have the brand one value displayed
- 8:52:02against all the brands because the
- 8:52:05column has been filtered for the brand
- 8:52:07one now how can we achieve otherwise and
- 8:52:11what it is equivalent of and we
- 8:52:14understand it better to understand it
- 8:52:16better let me tell
- 8:52:18you equivalent of which which will help
- 8:52:21you to understand let's go back to this
- 8:52:24one
- 8:52:26calculate
- 8:52:27again what it is equalent now we already
- 8:52:30understood the all you understand if I
- 8:52:33use all item brand here what would
- 8:52:37happen it will remove the context so
- 8:52:41when we are using this all item brand
- 8:52:43what it is going to do it's going to
- 8:52:45remove the filter context of item brand
- 8:52:47means if you filter the data for a brand
- 8:52:50it will not apply neither it will apply
- 8:52:52the Brand's context in the visual so in
- 8:52:55the visual row if you have a brand three
- 8:52:57brand four brand five that is not going
- 8:52:58to be applied so this has been entirely
- 8:53:00removed so what should I have given if I
- 8:53:02simply say all item brand grand total
- 8:53:04but now what I'm seeing after that is
- 8:53:06now let's put the filter of item brand
- 8:53:08equal to Brand one what is happening now
- 8:53:10you have all the item Brands out of
- 8:53:12which you are only bringing in brand one
- 8:53:14now what you're going to do here is
- 8:53:16you'll bring this
- 8:53:21in let's bring it inside the vi
- 8:53:25it's same as this one so what's
- 8:53:27happening now that in the visualization
- 8:53:29when you going to see the each row which
- 8:53:31is talking about a brand it is not
- 8:53:33filtering the brand because of all item
- 8:53:36brand but it is getting the value of
- 8:53:38brand one because but said all item
- 8:53:40brand then filter the item brand equal
- 8:53:42to Brand one so it is only getting the
- 8:53:44value of brand one for each row so the
- 8:53:47filter context has been removed and
- 8:53:50especially when it is displayed in the
- 8:53:51visual so especially when the brand self
- 8:53:53is appearing in the visual the visual
- 8:53:56filter context of the row is also
- 8:53:58getting removed and based on the value
- 8:54:00which we have filtered here in our
- 8:54:01measure based on that only we are
- 8:54:03getting the value displayed so sometime
- 8:54:06what would happen if you think that I'll
- 8:54:08just simply say item brand equal to
- 8:54:09Brand one or item brand equal to Brand
- 8:54:11one brand two brand three or I use the
- 8:54:13or statement it's going to be same as
- 8:54:15what I use in filter that's not it's not
- 8:54:17same so calculate with Filter function
- 8:54:20and without filter function are not same
- 8:54:22remember this when you are the
- 8:54:25calculation now let's learn earlier
- 8:54:27function this function will allows us to
- 8:54:31get the current row value so as you have
- 8:54:33learned when we create a calculated
- 8:54:34column and we do let's say sum of that
- 8:54:36column it gives us the total of that
- 8:54:38column but we always don't need it so
- 8:54:40definitely we require filters now while
- 8:54:43doing that filter we need the current
- 8:54:45row value let's say I want to get the
- 8:54:47customer first sales days or purchase
- 8:54:50date for the same customer I wanted to
- 8:54:52find out in the entire table what is my
- 8:54:54first purchase dat so there earlier can
- 8:54:56help us to check that out what we I'm
- 8:54:57going to do is I'm going to go to table
- 8:54:59View and inside table view I'll go to
- 8:55:01the sales table by clicking on that now
- 8:55:03I able to see my sales table now in the
- 8:55:05past I have shown you when I done sux
- 8:55:07sales gross amount it has given me the
- 8:55:09total amount what I would like to do is
- 8:55:11I would like to create a new column now
- 8:55:13which I can do by clicking on column
- 8:55:14tool because I already clicked on a
- 8:55:16column so column tool is visible and
- 8:55:18inside column tool I have a new
- 8:55:20column let me make F little bit larger
- 8:55:23control and middle Mouse button scroll
- 8:55:25now the column which I want to create is
- 8:55:27the first sales date basically what does
- 8:55:30need I have a sales date in this row and
- 8:55:32I have a customer ID but for that
- 8:55:34particular customer ID this might not be
- 8:55:35the first sales date I want to find out
- 8:55:37what is my first sales date for that
- 8:55:39customer ID there are couple of options
- 8:55:41I can use but I would like to use Minx I
- 8:55:43want to find out the minimum date filter
- 8:55:45I want to filter the table how do I want
- 8:55:47to filter this table sales table I want
- 8:55:49to filter now complete sales table is
- 8:55:51available as you know the this is a
- 8:55:53column at the moment I say sales table
- 8:55:54complete sales table available what I
- 8:55:56want is I I want to look say sales
- 8:55:58customer ID equals to what customer ID
- 8:56:01so one way is I take the customer ID
- 8:56:04value in a variable if I don't want to
- 8:56:05do that then there I can use function
- 8:56:08earlier if I use earlier I can again
- 8:56:10give sales customer ID this means
- 8:56:14current row customer ID the customer see
- 8:56:18understand in the filter when I say
- 8:56:19sales table the complete sales table is
- 8:56:21available when I say sales table
- 8:56:23customer ID complete tables customer ID
- 8:56:25is available now I'm saying current rows
- 8:56:28customer ID so I got the current rows
- 8:56:30customer ID now the table only contains
- 8:56:32the current Rose customer ID and from
- 8:56:34that I want the sales tables sales date
- 8:56:37minimum sales date so for this
- 8:56:39particular customer the table is getting
- 8:56:41only that portion of the table which is
- 8:56:43equivalent of the current customer you
- 8:56:44can see that particular partition of the
- 8:56:46table I'm getting now and then I'll get
- 8:56:49my minimum sales date from that
- 8:56:51particular partition so let's do one
- 8:56:53thing let's see is this date equal to
- 8:56:56the current date because if this date is
- 8:56:58equal then this might be the first
- 8:56:59record we are in search where this is
- 8:57:01not equal so this is not equal so we can
- 8:57:03filter on this customer so the customer
- 8:57:05ID 2954 we can filter on 2954 so number
- 8:57:10filter equals
- 8:57:132954 and there are so many records and
- 8:57:16if I now go ahead and sort a sending
- 8:57:19I've done a sort ascending here or this
- 8:57:21particular customer ID now let's look is
- 8:57:23this date available for all these yes
- 8:57:26the 1119 date is available for all the
- 8:57:29rows that's the first now with earlier
- 8:57:32you can have little more complex
- 8:57:35calculations also it's not that you can
- 8:57:37have the simpler calculation like this
- 8:57:38let me clear out and take one more
- 8:57:40example let's say you want to find out
- 8:57:42what is my last sales date you know for
- 8:57:44this customer this is my first sales
- 8:57:46date but I may like to know what is my
- 8:57:48last sales date isn't it what is my last
- 8:57:51sales date now the last sales date
- 8:57:53becomes a little bit more more tricky
- 8:57:54and we need to add more conditions how
- 8:57:56so let's add a new column and try to
- 8:57:57understand what is my last Sal date now
- 8:57:59look at this column first so in this
- 8:58:01case what is happening when I'm
- 8:58:02comparing customer to customer and I'm
- 8:58:04taking minimum then I'll get the first
- 8:58:05date next thing what I need to do I also
- 8:58:08need to consider the sales date I want
- 8:58:09to know that sales date which is before
- 8:58:11current row sales date means sales date
- 8:58:13is strictly less than the earlier sales
- 8:58:15date and then I need maximum out of it
- 8:58:18so customer is equal to the customer Sal
- 8:58:20state is less than the sales state in
- 8:58:22the current row and what ever data you
- 8:58:24are getting from that data get the max
- 8:58:26dat so let's copy this formula so we'll
- 8:58:28get last sales or last purchase not the
- 8:58:31overall last last is date and here let's
- 8:58:35start writing down again so explain you
- 8:58:37once more Maxx remember this thumb rule
- 8:58:40when you go into the future typically
- 8:58:42you will require the minimum so somebody
- 8:58:44says what is my next sales date the
- 8:58:46typical formula would have been Minx
- 8:58:48greater than this
- 8:58:50date I need Max but less than current in
- 8:58:54that case it would be I need the last
- 8:58:56date the last date is less than the
- 8:58:58current row date but it is Max out of
- 8:59:00all those so filter sales sales customer
- 8:59:04ID equals to earlier customer ID means
- 8:59:07current rows customer ID and sales
- 8:59:11date is strictly less than earlier sales
- 8:59:16Sal date now I got a partition where all
- 8:59:19the dates are less than the current date
- 8:59:21for the same customer now let's get the
- 8:59:23max out out of those sales date so now
- 8:59:26we got our formula for the current
- 8:59:29customer the sales date Which is less
- 8:59:31than the sales date at the max out of
- 8:59:34that enter you can press enter or click
- 8:59:37click on this button commit button you
- 8:59:39will get this answer for few of the rows
- 8:59:41you might not get it but for few rows
- 8:59:42you'll get it so let's filter 2954 once
- 8:59:45more equals
- 8:59:492954 now sort ascending on the date
- 8:59:52already sort ascending now row was 19 so
- 8:59:55we are getting 19 here and let me do one
- 8:59:57thing we make it little bit smaller so
- 8:59:59let me compare the dates now well so
- 9:00:021912 to 17 1912 to 17 Trail by one row
- 9:00:07what we have done here basically we got
- 9:00:09the data which is trailed by one row
- 9:00:12here this is basically previous date or
- 9:00:14the last in this manner you can use
- 9:00:15earlier now there's one alternative
- 9:00:18which I should also tell you that in
- 9:00:20case sometime what would happen I'll
- 9:00:22tell you when you want to use earlier
- 9:00:24function you cannot use any calculation
- 9:00:26here like I want last month or something
- 9:00:28we need a EO mon function so on earlier
- 9:00:31function doesn't allow you to do that in
- 9:00:32such scenario I'll give you the
- 9:00:34alternate of this one only by clicking
- 9:00:36on again new column I'll tell you how
- 9:00:39can you achieve this and in that case
- 9:00:41I'm going to create a variable so
- 9:00:42variable uncore cust means customer
- 9:00:45equals to no need of earlier here simply
- 9:00:47give customer ID and then you can give
- 9:00:50underscore C and remember that whenever
- 9:00:53I create a variable I used underscore so
- 9:00:55that I can differentiate then you give
- 9:00:58variable where where means what happens
- 9:00:59in a formula or in a measure when we use
- 9:01:02variable so this is the syntax let me
- 9:01:04explain you so you used variable then
- 9:01:07you use the variable name and then you
- 9:01:08use the column in case of column it
- 9:01:10should be column in case of major it
- 9:01:12should be a major or it can be a filter
- 9:01:14condition we will learn when we do now
- 9:01:16second one is I want date so simply I
- 9:01:18current rows date and then I can use
- 9:01:20that as underscore sales say date now
- 9:01:23when when you use variable you need to
- 9:01:25write down a return statement so how my
- 9:01:27formula is the name equals to variable
- 9:01:31variable name and the variable formula
- 9:01:33written statement and the formula after
- 9:01:35the written statement again I don't need
- 9:01:37earlier here I need underscore date now
- 9:01:40Dex is not case sensitive so whatever
- 9:01:42you small or uppercase combination you
- 9:01:44can mix and match and do it and let me
- 9:01:46press enter uh we have the same name we
- 9:01:49it will not let me rename this as a date
- 9:01:51one press enter or you can press the
- 9:01:53commit button now we got the same
- 9:01:55results that we had previously there is
- 9:01:57no difference in this one you can use
- 9:02:00function earlier so you have learned how
- 9:02:01to achieve the same result with and
- 9:02:03without earlier the advantage of these
- 9:02:04variables is that let's say I want to
- 9:02:06get the date in the last month I could
- 9:02:08have used here F function EO month and
- 9:02:11got the last month end date and I could
- 9:02:12have compared with that with the last
- 9:02:14month end date that is little bit more
- 9:02:16flexibility I will get if I use
- 9:02:18variables depending on the need you can
- 9:02:20use earlier or you can use variable so
- 9:02:22let's start learning the search function
- 9:02:24so let me go to the table View and
- 9:02:26inside the table view I'll open the
- 9:02:28geography table so search function can
- 9:02:31be used both in a column or a major so
- 9:02:34first we will take the example of a new
- 9:02:37column and then I'll also tell you how
- 9:02:39can you use it in a major so let me
- 9:02:42click on a column and I'll get a column
- 9:02:44tool and inside the column tool I can
- 9:02:46press new column create a new column and
- 9:02:49in this column I would like to search
- 9:02:51City I can use function search SE what
- 9:02:54what search function does for us it
- 9:02:56takes a text means the text which I want
- 9:02:58you to search within the text it can be
- 9:03:01another text or it can be a column in
- 9:03:03which I want to search start position if
- 9:03:05I don't want to start from the first
- 9:03:07position I can give the from which
- 9:03:09position I want to start the search and
- 9:03:10not found value if I don't find a value
- 9:03:13what should I return so basically it's
- 9:03:15going to return return the index of the
- 9:03:17first letter so let's say you search for
- 9:03:19new and it find new starting from fifth
- 9:03:22position so it's going to return return
- 9:03:23five so what if it doesn't find you can
- 9:03:26return return a not found value if you
- 9:03:28don't want to return let's say zero or
- 9:03:30something you can return return blank
- 9:03:32but prefer to return return a value what
- 9:03:34I want to search I want to search new
- 9:03:36Now search is not case sensitive and
- 9:03:38because search is not case sensitive
- 9:03:40what I can do is I can write down new as
- 9:03:43NW all cap then I can give a column name
- 9:03:46I could have given a string where I
- 9:03:47wanted to search this but here I'll give
- 9:03:49a column name start position I want to
- 9:03:51start from the starting so I can leave
- 9:03:52it empty if I does doesn't find I want
- 9:03:54to return zero it means I'm going to
- 9:03:56return a position zero if it is not
- 9:03:59found so that I can identify it is not
- 9:04:00found but I can do here is I can go
- 9:04:02ahead and do sort descending here and
- 9:04:05sort descending means it will sort the
- 9:04:07column on higher Value First there are
- 9:04:10only three values which contains new so
- 9:04:12these are the three values which
- 9:04:14contains new and they are coming on top
- 9:04:16now so this is how you use basically the
- 9:04:19search function now what you have to do
- 9:04:21to use it in a measure so simply what I
- 9:04:23can do is I can search this and I can
- 9:04:25use that as a result in my filter so let
- 9:04:28me give you a quick example of a measure
- 9:04:30I'll create a new page and in this new
- 9:04:32page I'll bring in city and I'll force
- 9:04:35this to become a table visual so once
- 9:04:37you click on a visual and then you press
- 9:04:39another visual type powerb automatically
- 9:04:41changes it into that particular visual
- 9:04:43now I need a measure so I need the count
- 9:04:46of the Cities which contain new this is
- 9:04:48my simple very simple requirement I need
- 9:04:50count of the Cities which contains new
- 9:04:53so cck click on a new major available on
- 9:04:55the Home tab and major name is Count new
- 9:04:58cities or cities which contain new but
- 9:05:00to just to keep the measor them little
- 9:05:02bit short I'm doing this calculate so
- 9:05:05I'm saying I want to calculate count
- 9:05:08geography cities I would like to count
- 9:05:10the geography City filter the geography
- 9:05:12table search what I want to search new I
- 9:05:15can give in any case because it is not
- 9:05:18case sensitive in what column geography
- 9:05:21City column
- 9:05:23and let me write down geography City
- 9:05:25because I have City in the customer
- 9:05:27table also so just want to confirm I
- 9:05:29have used filter in the filter I used
- 9:05:31geography is going to take geography
- 9:05:32City but just for the clarity I'm
- 9:05:35putting it here I don't want to give a
- 9:05:37start position zero and I can say
- 9:05:39greater than zero now there could be few
- 9:05:40versions I'll tell you there's a
- 9:05:42function count rows also available with
- 9:05:44us so you can do it like this or I'll
- 9:05:46tell you one more function which you can
- 9:05:48achieve it easily let me create a new
- 9:05:50major and instead of all these I can use
- 9:05:53found rows and inside that I can give a
- 9:05:56filter condition and I can create
- 9:05:58another measure let me rename it as one
- 9:06:00now you might be surprised why I'm
- 9:06:01getting only three rows I'll tell you
- 9:06:03the reason also what happens is any row
- 9:06:06which is getting filtered by the filter
- 9:06:09clause for which we are not getting a
- 9:06:10result means the value for that is blank
- 9:06:14and blank is not zero okay for value for
- 9:06:16which is blank it will not appear in the
- 9:06:18visual both the measures right now in
- 9:06:20the visual is only giving value for
- 9:06:22these three City
- 9:06:24it is always the super set let's say if
- 9:06:26I put net now and net has value for all
- 9:06:28the cities so all the cities will appear
- 9:06:30and we will get blank values for
- 9:07:00so these are the quick example how can
- 9:07:02you use a search in a major or in a new
- 9:07:06column so let's now learn find we will
- 9:07:08go to the table View and inside the
- 9:07:10table view in the geography table we
- 9:07:13will try to use it we have already used
- 9:07:15search here the search and the find have
- 9:07:17the same syntax the difference is the
- 9:07:20find is case sensitive and also you
- 9:07:24cannot use Wild Card characters in The
- 9:07:28say search you can use Wild Card
- 9:07:30characters but in find you cannot use it
- 9:07:33again find is case 10 set so let me copy
- 9:07:38this because I clicked on a column I'll
- 9:07:41have the column tool available with me
- 9:07:42and inside that I have new column which
- 9:07:44I'm going to click and paste this and
- 9:07:46I'm going to change this find and the
- 9:07:49Syntax for the find is same let's
- 9:07:51discuss that find and let me start the
- 9:07:54parenthesis once I start the parenthesis
- 9:07:56I got the synex find text the text which
- 9:07:58I wanted to find within text I can give
- 9:08:01a text or I can give a column name in
- 9:08:04fact I can give a major when I'm
- 9:08:05creating a major start position the
- 9:08:08position from which I should start and
- 9:08:09not found position if I do not found
- 9:08:12what I wanted to return I can also
- 9:08:14return a blank if need I use
- 9:08:17this you can see I'm not able to find
- 9:08:21any cities with new why because any W
- 9:08:24new is capital new inside the city start
- 9:08:29with the default position return zero if
- 9:08:32not found is returning me zero because
- 9:08:34any W is not available in any of them so
- 9:08:37let's try n capital
- 9:08:41ew now we will get the first three
- 9:08:43values as 11 one because we are able to
- 9:08:46find out new on the first position okay
- 9:08:51so this is how we use find we will take
- 9:08:54a quick example of a major also so I'll
- 9:08:56go here on my report view I already
- 9:08:59create page where I use search let me
- 9:09:02call it search and find now and let me
- 9:09:05add a quick major I'll click on the
- 9:09:07major table and I'll get a table tool
- 9:09:10because I clicked on the table this time
- 9:09:12and inside that we have option for new
- 9:09:13major I click on that and I'll quickly
- 9:09:17write down a major find city find new
- 9:09:21city let's say
- 9:09:24and we'll use count
- 9:09:26rows
- 9:09:28filter
- 9:09:30geography geography comma find what I
- 9:09:34want to find new new should be in title
- 9:09:37case where I want to find it in
- 9:09:39geography
- 9:09:40City starting position if not found zero
- 9:09:44greater than zero it should always be
- 9:09:46greater than
- 9:09:47zero same result but if I make it an ew
- 9:09:51capital or I change anything let not
- 9:09:54even this I make n
- 9:09:57small it will return all blank because
- 9:09:59I've used filter and when filter doesn't
- 9:10:03find that value it's going to return a
- 9:10:04blank for that so these are the quick
- 9:10:07examples of a new majure as well as a
- 9:10:09new column now let's learn contains
- 9:10:12string function contains string is
- 9:10:15function which is not case sensitive
- 9:10:17means whatever you want it to search
- 9:10:19that's not going to be case sensitive it
- 9:10:22cannot search for card anyways it's very
- 9:10:25similar to the functionality what search
- 9:10:27and find provides it but actually it
- 9:10:29returns true and false it doesn't return
- 9:10:31a position to you so let me start a new
- 9:10:34column I already clicked on a column so
- 9:10:36in the column tool I have new
- 9:10:38column and let
- 9:10:41me let me search
- 9:10:43contain new I'll use
- 9:10:47contains
- 9:10:48string within text so first we have to
- 9:10:51give which within what text I can give a
- 9:10:53column or I can give a text I'll give
- 9:10:55city as a column and what I want you to
- 9:10:58find out I want you to find out new I'm
- 9:11:00going to give it in all caps to check
- 9:11:01whether it is case sensitive or not it
- 9:11:04is actually not case sensitive as is
- 9:11:06given in the description it's going to
- 9:11:07return true and false whether it finds
- 9:11:09it or
- 9:11:11not it returns me
- 9:11:13true for first three cities where
- 9:11:17previously find and search for giving me
- 9:11:20111 which is position so we can can use
- 9:11:23whenever we need true false results
- 9:11:25let's take an example in the report view
- 9:11:27for major so I'll go ahead and copy this
- 9:11:31major and try to simplify this I'll
- 9:11:34create a new major I'm in Major Tool so
- 9:11:36I can use new major and I'll now say
- 9:11:44contains
- 9:11:46new and here let's change
- 9:11:49it simply let me try to write down
- 9:11:53contains string first is within a string
- 9:11:57so we need to
- 9:11:58give geography
- 9:12:02City
- 9:12:07new so what we have done is basically
- 9:12:09filter table geography and simply
- 9:12:12checked true and false here and this is
- 9:12:15what we need in the filter every
- 9:12:16condition in the filter should return
- 9:12:17return a true and false so this one
- 9:12:20satisfi that condition so I don't need
- 9:12:21to check equal to true or false that I
- 9:12:24don't need it's simply written true and
- 9:12:25false to me in this manner you can
- 9:12:28create quick major and a new column on
- 9:12:32contain string let's check out function
- 9:12:35contains string exact now contain is
- 9:12:37string exact is going to check for case
- 9:12:41sensitivity the syntax is very similar
- 9:12:43to contains string so let me copy this
- 9:12:46contains string column I clicked on a
- 9:12:48column and if it has a formula it will
- 9:12:50start showing it in the formula bar
- 9:12:53as I clicked on a new column I will also
- 9:12:55get a new column option I can simply
- 9:12:57click on that and cop and create a new
- 9:13:00column let me paste this and let me call
- 9:13:02it
- 9:13:03contain exact
- 9:13:06new and let me change this contain
- 9:13:10string exact so I removed G so it's
- 9:13:12starting suggesting me the syntax is
- 9:13:14very similar within string find a string
- 9:13:17returns through the string contains
- 9:13:19another string contains string exact is
- 9:13:22case sensitive it is Cas sensitive so
- 9:13:25when I give new in capital it might not
- 9:13:28return return any
- 9:13:29true Everything Is false because new is
- 9:13:33not present any W new in capital is not
- 9:13:36present title case new is present in
- 9:13:39first three so I'm changing that right
- 9:13:40now in my
- 9:13:43formula making it a little bit bigger
- 9:13:45for you enter and now I'm going to get
- 9:13:50true let me use this in the
- 9:13:53report view by creating a major so I'll
- 9:13:57copy this contains new major and because
- 9:14:00I clicked on a major I do have major
- 9:14:01tools available with me click on a new
- 9:14:03major to get a new major contains
- 9:14:07new contains
- 9:14:09new exact and here instead of contain
- 9:14:13string we'll use contain string exact
- 9:14:16we'll keep it capital as of now all new
- 9:14:18as all
- 9:14:21caps and we'll not get any value so now
- 9:14:24we will change it to title
- 9:14:25Case press enter and we get the values
- 9:14:29as three because there are three cities
- 9:14:33only which contain any W in title case
- 9:14:36in this manner we can create major and
- 9:14:39column for contains thing exact now
- 9:14:43let's have a look at three more Dex
- 9:14:45function which is right mid and left and
- 9:14:47to do that what I'm going to do is I
- 9:14:49will go to this table date Auto I'll
- 9:14:52going to create first a column and what
- 9:14:54column I'm going to create here is
- 9:14:55basically create a date which is in ddmm
- 9:14:59and YY y format so I'll use format
- 9:15:03function format date which is there in
- 9:15:05this table
- 9:15:07comma DD iy mm iy YY y y format now my
- 9:15:14objective here is to extract out date
- 9:15:17from this column and put it into date
- 9:15:19function what I want to do is I want to
- 9:15:22use the date function date function
- 9:15:23require year month and date I want to
- 9:15:26extract this and during the extraction
- 9:15:28of this we will be able to use all three
- 9:15:30functions left right and mid so let's
- 9:15:33start again with a new column I already
- 9:15:35clicked on a column so column tools
- 9:15:37going to enable us or a new column me
- 9:15:39quickly click on new column and in this
- 9:15:42new column I would like to create a new
- 9:15:45date again I'm creating a date just
- 9:15:47giving a name new date I'll start with
- 9:15:48the date function now date function
- 9:15:50requires first what it require year
- 9:15:52where is the year here in this date here
- 9:15:54is last four characters of this and to
- 9:15:56get the last four characters we use
- 9:15:58right right is the function which you're
- 9:16:00going to use what WR going to take is
- 9:16:02going to take a text and number of
- 9:16:04characters Returns the specific number
- 9:16:06of characters from the end of the WR
- 9:16:08returns from the end how many characters
- 9:16:09I need from the end I need from the end
- 9:16:13four characters the four characters
- 9:16:15represent ear now Dex is pretty flexible
- 9:16:19sometime when you return return text and
- 9:16:20it use it as a number unless youate
- 9:16:22creates an error it does do that autoc
- 9:16:25conversion now month where is month
- 9:16:27lying here so here in this string the
- 9:16:29month is lying in the middle let's check
- 9:16:31the number so this is the first position
- 9:16:33second position third position third
- 9:16:35position doesn't have month number
- 9:16:37fourth and fifth position has the month
- 9:16:39number I need four comma 5 okay or I
- 9:16:42need four and two characters let's look
- 9:16:44at the mid function which is going to
- 9:16:45help us out so we need mid function here
- 9:16:49let's look at the syntax of mid function
- 9:16:51it has three arguments is requires first
- 9:16:53argument is text in which we are giving
- 9:16:55a column you can give a text also means
- 9:16:57you could have given a hardcoded date
- 9:16:59here then the start position start
- 9:17:01position in our case is fourth character
- 9:17:03it's not the third character it's not
- 9:17:05starting with zero it's the exact fourth
- 9:17:07character when you count from one 2 3 4
- 9:17:09and then the number of characters how
- 9:17:11many number of characters we need so we
- 9:17:13need two characters so we'll use State
- 9:17:16DD YY from the fourth I need two
- 9:17:19character it should return a month now I
- 9:17:21finally need day and day is present as
- 9:17:24first two characters and first two
- 9:17:26characters there is a function which can
- 9:17:28help us that function is left what is
- 9:17:30the syntax of left left function the
- 9:17:33text we can give a column or a text and
- 9:17:35number of characters we need how many
- 9:17:37number of characters we need from the
- 9:17:39starting of the string we
- 9:18:00mmdd y y y y and there's a Tim stamp
- 9:18:03also I can remove the time stamp I
- 9:18:05clicked on the column I can go to the
- 9:18:07format and I can choose a format I want
- 9:18:10I can choose a short date so in this
- 9:18:12manner you can use these three functions
- 9:18:15right mid and left definitely you can
- 9:18:17use them into a measure also and you
- 9:18:20will be able to create the required
- 9:18:23calculation using these one more thing
- 9:18:25which we can do with this we can use the
- 9:18:28Left Right function along with the sear
- 9:18:30function to create the first name and
- 9:18:33the last name now what we are going to
- 9:18:35do for that is we'll go to our geography
- 9:18:38table so in the geography table there
- 9:18:40are only few cities which contains the
- 9:18:43PO names like New Orleans new Las Vegas
- 9:18:46and JY City for only few cities where we
- 9:18:49have first name last what we'll do ins
- 9:18:51whenever I contain one should only show
- 9:18:53me first name whenever I have two it
- 9:18:56should show me first name and last name
- 9:18:58so last name would be empty in case I
- 9:19:01have one word City so let's take out the
- 9:19:04first name what's the rule for the first
- 9:19:07name so the first name should come till
- 9:19:09the place where we have the B as a
- 9:19:11character so what we can do is we can
- 9:19:14use the left function we use left and on
- 9:19:17the city column and till what place
- 9:19:20first few characters we should go we'll
- 9:19:21say search and in the search we will say
- 9:19:24the find the position uh so the position
- 9:19:27of what position of space the moment we
- 9:19:29get the space then within the text which
- 9:19:31is City start position we are not going
- 9:19:34to mention now I'm not going to mention
- 9:19:36not find Value as zero because what
- 9:19:38would happen if I press not found value
- 9:19:40is zero let's understand this because
- 9:19:42when we don't find the space it's not
- 9:19:43going to give me the first name that's
- 9:19:45what I don't want like in the new ark
- 9:19:48I'm not getting any name but I need the
- 9:19:50name because that's the first name this
- 9:19:52is only name
- 9:19:53what we say in such case is we use one
- 9:19:55more function and we learn now a new
- 9:19:57function which gives me length of the
- 9:19:59text and I'm going to use the length of
- 9:20:01the text so what I'm saying here is in
- 9:20:04case you don't find it actually written
- 9:20:07the length so what would happen you will
- 9:20:09go till the last letter of that thing
- 9:20:14and you are now getting that particular
- 9:20:16City where we only have the first name
- 9:20:18so first name is all sorted now we need
- 9:20:21to work on the
- 9:20:33so I want to use right what is the text
- 9:20:35in the right I want to give I want to
- 9:20:36give the city and I want to give the
- 9:20:39number of characters so now number of
- 9:20:41characters is from the end but when I
- 9:20:43use the search function that's going to
- 9:20:44give me the position from the starting
- 9:20:46isn't it so if I say space comma space
- 9:20:49within text City
- 9:20:52starting position and let's say zero is
- 9:20:55the not found position right now what
- 9:20:57would happen the space is the starting
- 9:21:00position is not going to work for me
- 9:21:03because space is at the fourth position
- 9:21:05is going to give me last four character
- 9:21:06so what I need exactly I need length
- 9:21:12minus the position of the space so what
- 9:21:15happens when I do that now what happens
- 9:21:18because if I'm returning a zero or the
- 9:21:21city is where it has the for the cities
- 9:21:24where it doesn't have the space it's
- 9:21:25going to give me the last name also as
- 9:21:27first name which I don't want so why
- 9:21:29don't we return length there of the
- 9:21:33city what we are saying is we are going
- 9:21:35to return the length of the city in the
- 9:21:37search when we don't find anything so it
- 9:21:39will take us to the last characters so
- 9:21:42length minus the last character is again
- 9:21:44the length is zero so let's see what
- 9:21:45happens in that so the last name goes
- 9:21:48away so see it's almost the similar
- 9:21:50search which we have used there now
- 9:21:53definitely because we want the last
- 9:21:55character so we use length so from here
- 9:21:57we do and other thing what you could
- 9:21:58have done you could have used mid
- 9:22:00starting from the space and use the mid
- 9:22:03and the length is number of characters
- 9:22:05what you need but again that would have
- 9:22:07number of characters again you to find
- 9:22:08out using the length and the search so
- 9:22:10right is the best choice in sear case so
- 9:22:13this is just an implementation of you
- 9:22:15know search and right and left together
- 9:22:19so these kind of combinations will keep
- 9:22:21on coming to you when you do your actual
- 9:22:24project you can do similar kind of
- 9:22:26exercise in Majors also this is combined
- 9:22:29version of two thing functions let's
- 9:22:32understand the function select columns
- 9:22:35select columns function can be used to
- 9:22:37create a calculated table with the
- 9:22:40column renames and it can also be used
- 9:22:43as a table expression inside a major
- 9:22:46calculation I clicked on a table and
- 9:22:49inside the table tool I have this new
- 9:22:51table op option which I'm going to
- 9:22:54click and I'll use select columns select
- 9:22:57columns now the most important thing
- 9:23:01which this select column does is it can
- 9:23:03select a set of columns me you can t
- 9:23:06filter the table vertically you can
- 9:23:08reduce the number of columns which you
- 9:23:09want so let's understand the syntax of
- 9:23:12Select column select column takes a
- 9:23:15table and then it takes the pair of name
- 9:23:18expression name expression name
- 9:23:20expression and it finally returns you to
- 9:23:22a table so this name expression pair
- 9:23:26means one is you can rename the column
- 9:23:29so basically you can have a name of a
- 9:23:31column and then you can give a column
- 9:23:33you can give the same column multiple
- 9:23:35time the name expression also means that
- 9:23:37you can give formulas for a column so
- 9:23:39let's say you want to say A+ B A multip
- 9:23:43by B Cas which is statement or something
- 9:23:46that also you can do means you will be
- 9:23:48able to perform low level calculation
- 9:23:51while you are writing down the
- 9:23:53expression in select column and select
- 9:23:55column is not going to group by or
- 9:23:58filter it is just going to give you a
- 9:24:00table with the set of expression renamed
- 9:24:04as per your requirement now inside the
- 9:24:07table expression you can use filter if
- 9:24:09you want or after the select column
- 9:24:12again you can use filter or summarize
- 9:24:15whatever you want in this manner you can
- 9:24:17use select column for various purpose so
- 9:24:20let's say I want to bring in table now I
- 9:24:23want to call brand with some some other
- 9:24:25name let's say I want to call brand
- 9:24:28name again let's say I want brand with
- 9:24:31some other name brand two let's say
- 9:24:35brand only I can do that then I want
- 9:24:38Item ID I can give a new name item
- 9:24:42identifier and I can use item id now I
- 9:24:45selected three columns let's assume that
- 9:24:48I only need these three columns so now I
- 9:24:51got the item table my item table used to
- 9:24:53have 55 rows I again got the 55 rows see
- 9:24:56it's not summarizing or it's not
- 9:24:59filtering here select column is not
- 9:25:01filtering you can use filter inside the
- 9:25:03table expression instead of item you can
- 9:25:06use filter something there you can use
- 9:25:08calculate table if needed but whatever
- 9:25:10columns I'm getting I'm able to rename
- 9:25:13that so what I would like to do now is I
- 9:25:15would like to add some expression here
- 9:25:18I'm making it a little bit large so that
- 9:25:20you can see the table expression clearly
- 9:25:23you would have remembered that some time
- 9:25:24back we added some calculated column in
- 9:25:27our item table so I clicked on the item
- 9:25:29table and if you look at this group two
- 9:25:32this is something which I wanted to add
- 9:25:34there is a switch statement which is
- 9:25:36categorizing the category into various
- 9:25:38groups and let me go back to the select
- 9:25:41column table calculated Table and there
- 9:25:44what I would like to do is now I would
- 9:25:46like to add another column which I would
- 9:25:48like to call as group so I have given a
- 9:25:51name and and now let me give the
- 9:25:53expression the same expression which I
- 9:25:55have given there now after giving that
- 9:25:57expression let me come out and press
- 9:25:59enter am I able to get that so as you
- 9:26:02can see every role the calculation has
- 9:26:05been done and I able to get group one
- 9:26:07group two group three so you can see
- 9:26:09that the category one is lying in the
- 9:26:11group one but we don't have a category
- 9:26:13but it is still calculated because it
- 9:26:15was part of the original table so let's
- 9:26:17add the category to understand that so
- 9:26:20just before that now I am adding C
- 9:26:22category and the category column from
- 9:26:24item table while I have given a table
- 9:26:26name in the table expression so I might
- 9:26:29not require the table but it is always
- 9:26:32better to use table and the column name
- 9:26:34the fully qualified name and now you
- 9:26:36will be able to see the category column
- 9:26:38so you can see the category column and
- 9:26:40you can see that the category 2 is part
- 9:26:43of the group one Category 5 is part of
- 9:26:45the group three now can I do some
- 9:26:48calculation like multiplication or
- 9:26:50something let's say I want to add let's
- 9:26:52say item by brand I want to do very
- 9:26:56simple stuff here is I want to multiply
- 9:26:58the item ID by brand ID for our
- 9:27:01reference purpose let's do that and let
- 9:27:04me enter now again or I can press this
- 9:27:07commit button and now you can see that
- 9:27:09the item ID and the brand IDs are
- 9:27:12getting multiplied actually the item
- 9:27:14identifier is one in this row and the
- 9:27:16brand ID would be 10 for the brand 10 so
- 9:27:19I'm getting a value 1 * by 10 is 10 so
- 9:27:23in this manner you can see that we are
- 9:27:25able to rename a set of columns and we
- 9:27:28are also able to write down name
- 9:27:31expression name expression and enhance
- 9:27:34our calculated table at the same row
- 9:27:37level where the original table was and
- 9:27:39able to get the data so still have the
- 9:27:4255 rows but we have the additional
- 9:27:44column in a new table using select
- 9:27:47columns now sometime this helps there
- 9:27:49are operation where you may be using in
- 9:27:52the same table or maybe we need to
- 9:27:54rename the column before we use it and
- 9:27:58in such cases select column is pretty
- 9:28:01useful especially when you do cross join
- 9:28:04or you use generate function and the two
- 9:28:06tables have the same column then you can
- 9:28:08use select column to rename such columns
- 9:28:12so in this manner you can use select
- 9:28:14column to create a table which is cut
- 9:28:17vertically it can be combined with
- 9:28:19calculate table and filter to get a
- 9:28:22horizontally filtered table or the table
- 9:28:26which where the rows are also filtered
- 9:28:28here columns are filtered let's learn
- 9:28:30the next function which is summarize the
- 9:28:32summarize function can be used to create
- 9:28:35a new calculated table where we can get
- 9:28:38the aggregated data it is heavily used
- 9:28:40in measures to you know handle the
- 9:28:42grouped data sometime to correct the
- 9:28:44grand totals creating intermediate table
- 9:28:47which can be further used for analysis
- 9:28:50so let's learn first of all how can we
- 9:28:52use summarize in a new calculated table
- 9:28:55so let's understand what that function
- 9:28:56is so first I'll go to table tool new
- 9:28:59table I want to create an aggregated
- 9:29:01what I want in my aggregated table is I
- 9:29:03want the sum of items net sales item
- 9:29:06wise brand wise category wise or let's
- 9:29:09say City wise take two different
- 9:29:11dimensions so we would like to create
- 9:29:13brand wise net sales and gross Sal how
- 9:29:15do we do that so summarize it we have a
- 9:29:17function summarized what does summarize
- 9:29:19function does first it takes an table
- 9:29:21then it takes the group Group by
- 9:29:22expression the group by expression
- 9:29:23doesn't require a rename you cannot do a
- 9:29:25rename and then name and the expression
- 9:29:27means expression means the some the
- 9:29:29column where we are going to use some
- 9:29:31kind of aggregation for that you can use
- 9:29:32an rename again in the table expression
- 9:29:35you can use add columns select columns
- 9:29:37calculated table filter whatever you
- 9:29:39want you can do that so here what I want
- 9:29:41is I want to summarize the sales data
- 9:29:43what I'm going to use I'm going to use a
- 9:29:45center table sales table because if I
- 9:29:47use the dimension table I might not get
- 9:29:49an access to the many side of the table
- 9:29:51I'm trying to use a table which is fact
- 9:29:53which is a central container and it is
- 9:29:56related with tables like item and
- 9:29:58customer and as you can see it is
- 9:29:59started showing that so from geography I
- 9:30:01would like to bring in state so I would
- 9:30:04like to summarize my data on state item
- 9:30:06brand State and brand and then I want to
- 9:30:08calculate net net is already a measure
- 9:30:10let me call it as and I can rename I
- 9:30:13usually what I do whenever I create some
- 9:30:15columns by myself I usually rename that
- 9:30:17underscore to differentiate and I can
- 9:30:19use a net major now I'm using net major
- 9:30:22it doesn't mean that it's going to
- 9:30:23filter with my slices value it's not
- 9:30:24going to change it's going to be the
- 9:30:26static value and if there is some
- 9:30:39row and let's use the major gross then
- 9:30:43can I on the Fly do a sum of quantity or
- 9:30:46something so let's try underscore QT y
- 9:30:49comma sum of sales quantity I want to do
- 9:30:53on the Fly sum and now I want to create
- 9:30:54this table so I'm getting 442 rows and
- 9:30:57I'm getting these values so for New York
- 9:30:59I have net quantity as 24,000
- 9:31:02approximately gross 29,000 and quantity
- 9:31:05as 84 it has no impact of filters and
- 9:31:07slicer and this is true with all the
- 9:31:09tables so let me go here in the filter
- 9:31:11region here let me use something on all
- 9:31:14pages isn't it so let's go to a name and
- 9:31:16basic filtering customer one it's going
- 9:31:18to filter on all the page customer one
- 9:31:20but if I go to the table view there's no
- 9:31:22change still you can see the value is
- 9:31:24same 24,000 29,000 and 84 there is no
- 9:31:29difference calulated column has no
- 9:31:33difference when a filter or a slicer get
- 9:31:36applied on the page it has no
- 9:31:39relationship it is precalculated even
- 9:31:42the measures if you are using in such
- 9:31:44tables get calculated and evaluated at
- 9:31:49the load time so they are static in
- 9:31:52nature calculated table and columns are
- 9:31:56static in nature so don't expect their
- 9:31:59data to change using filters and slicer
- 9:32:03as of now that is not possible so we
- 9:32:06have used summarize here in a calculated
- 9:32:08table there could be n number of things
- 9:32:10you can do with using this you can have
- 9:32:12some permutation combination with other
- 9:32:14calculated table functions like
- 9:32:16calculate table filter Etc and it could
- 9:32:19be used in major and major we can can
- 9:32:22drive few things so we will go ahead and
- 9:32:24take a major case little bit later let
- 9:32:27us learn a set function which is Union
- 9:32:30and for that what I wanted to do is I
- 9:32:32want you to bring in a new file from the
- 9:32:35GitHub and that is the file which we are
- 9:32:37going to use for few more operations set
- 9:32:40operations
- 9:32:43so the file name is upend and summarize
- 9:32:47Group by and we are going to use in few
- 9:32:49more operation as I said earlier we're
- 9:32:52going to use this in few more operations
- 9:32:54I'll right click on the raw copy link
- 9:32:57and as we have done in the past we will
- 9:32:59go ahead and use that inside our powerbi
- 9:33:02get data
- 9:33:04web and inside the web you going to give
- 9:33:06this URL click on okay it should suggest
- 9:33:09us two table data one and data
- 9:33:13two data 1 and data two two Excel sheets
- 9:33:15are there I'm taking both of them and
- 9:33:18right now I don't want to do any kind of
- 9:33:20transformation of data so I'll directly
- 9:33:22load these
- 9:33:27tables the tables are loaded
- 9:33:30now I want to create a union of these
- 9:33:32two tables whatever data they have so
- 9:33:34data one has three rows item one item
- 9:33:36two item three and data two has item one
- 9:33:39item two and item four okay and they
- 9:33:41have different quantities so because
- 9:33:43they have different data I want a union
- 9:33:44all usually the Dex function Union does
- 9:33:46a union all so how would we do that we
- 9:33:48want a new table again Union function
- 9:33:51can be used to create a new calculated
- 9:33:53table as well as it can be used in
- 9:33:55measures as per requirement and in the
- 9:33:58new table let me go ahead and
- 9:34:01do rename as Union
- 9:34:05table and we'll call Union table one
- 9:34:08which is data 1 comma data
- 9:34:112 so we got a union where all the values
- 9:34:14have been just added up so this is how
- 9:34:16you can use Union function and we will
- 9:34:19see more use case of this little bit
- 9:34:21later let us now learn set function
- 9:34:24intersect it can be used to calculate
- 9:34:27calculated table and it can also be used
- 9:34:29in Majors I'll go to the table view I
- 9:34:32have two table data one which is having
- 9:34:34item one two and three with some values
- 9:34:37and table two which is again having item
- 9:34:39one and two and also a new item item
- 9:34:41four which is having a value eight and
- 9:34:44these values are not matching items are
- 9:34:46matching but the values are not I'm
- 9:34:48doing intersect operation which gives me
- 9:34:49common values is it going to give me
- 9:34:51anything
- 9:34:52let's go ahead and check it out so I'll
- 9:34:54click on any of the table and go ahead
- 9:34:56and do intersect operation under the
- 9:34:58home table I can see new table I'll
- 9:35:01click on the new table and I'm creating
- 9:35:03a new table here but this can also be
- 9:35:06used inside the major I'm creating a new
- 9:35:09datable data 4 why not data 3 why data 4
- 9:35:13I'll let you know intersect left table
- 9:35:15and right table only two arguments it
- 9:35:17can
- 9:35:18take so let's give a table which is data
- 9:35:22one and the second table right table
- 9:35:24data two let's see what these two tables
- 9:35:26have
- 9:35:28common there's nothing common zero rows
- 9:35:30are returning how do I check whether
- 9:35:32it's going to work or not so let me do
- 9:35:34one thing very one quick thing right
- 9:35:36click on this table data one and copy
- 9:35:39the
- 9:35:40table then go to enter data under the
- 9:35:42Home tab once it opens up paste it you
- 9:35:46will get the same table it just got
- 9:35:47duplicated I'm going to change the value
- 9:35:49for item three and I'm going to call it
- 9:35:51data 3 now you got your data 3 and press
- 9:35:55enter or I can press load button now I
- 9:35:58got a table data 3 which is having
- 9:36:01something in common with data 1 the
- 9:36:03first two rows of the data one is common
- 9:36:07with the first two rows of data three
- 9:36:10data 1 and data 3 has two rows common
- 9:36:13now I'll go to data 4 and instead of
- 9:36:16data 2 I'll use data 3 and press
- 9:36:18enter and as you can see I got a table
- 9:36:22item one as one item two as two these
- 9:36:25are the exact common set of values
- 9:36:29please remember the complete row set
- 9:36:31need to match we also have functions
- 9:36:33like distinct values and summarize which
- 9:36:37can help us to get distinct values for a
- 9:36:39single column or summarize for multiple
- 9:36:42columns and that can also be used in
- 9:36:45such cases to create a combination of a
- 9:36:47column set before we use intersect so as
- 9:36:50per your need you can can use it in a
- 9:36:52table or in a measure let us learn the
- 9:36:54set function minus don't have a minus
- 9:36:58here we have accept and what the accept
- 9:37:00does is something which is present in a
- 9:37:02table and not present in the second
- 9:37:04table so something which is present in a
- 9:37:06not present in B I need that kind of
- 9:37:09data now to do that what we are going to
- 9:37:11choose here is data one which contains
- 9:37:14one item one 2 and three with three item
- 9:37:17three having value three data table
- 9:37:19three where item three has a little bit
- 9:37:21different value now let's start by
- 9:37:23creating a new table as of now we can
- 9:37:25see new table option under the Home tab
- 9:37:29let's click on
- 9:37:30that this table can be named as except
- 9:37:33let's use the function except except
- 9:37:36requir two tables left table and the
- 9:37:39right table and it's going to give the
- 9:37:41data which is present in left table
- 9:37:43which is not present in the right table
- 9:37:45Returns the row of the left hand side
- 9:37:47which is not present in the right hand
- 9:37:49side table this can be used for
- 9:37:50calculated table table or measures take
- 9:37:52an example later how to use this in a
- 9:37:54measure so let's use the data one as a
- 9:37:57left table and data three as the right
- 9:38:00table we should get the item three row
- 9:38:03with the value three because that is the
- 9:38:05one which was there in data 1 table
- 9:38:08which was not present in data 3 table
- 9:38:11what happens when I change the position
- 9:38:13now I should get the item three but with
- 9:38:15the value six because that is the row
- 9:38:17which is present in data 3 but not
- 9:38:20present in data one one in this manner
- 9:38:22you can use accept function this can
- 9:38:25also be used to find out sometime when
- 9:38:27you come across the cases when you need
- 9:38:28a major something which is present in
- 9:38:31particular situation and not present in
- 9:38:33particular situations in such cases you
- 9:38:35can use that accept function will help
- 9:38:37in measures Also let's learn distinct
- 9:38:39function and values function there are
- 9:38:41two functions let's learn how they
- 9:38:43behave what they give us so I'll go to
- 9:38:45the table View and inside the table view
- 9:38:47I have this item table and in this item
- 9:38:49table I have branch and the branch are
- 9:38:50only 13 but they're repeating in all
- 9:38:52rows 55 rows similarly categories are
- 9:38:54only five repeating in all I want to
- 9:38:56know what are the distinct values I have
- 9:38:57for the brand and item and I may want to
- 9:39:00repeat that so let's go ahead and try
- 9:39:02that out so I'll go ahead and create a
- 9:39:04new
- 9:39:05table and let me give it as a name as
- 9:39:07Brands which is nothing but distinct
- 9:39:09item brand it's give me distinct item
- 9:39:11Brands can it give me distinct of a
- 9:39:13table also yes it can give but for that
- 9:39:15we need a table with repeating values
- 9:39:17we'll take that example but before that
- 9:39:19let's look at one more function which is
- 9:39:20values again from the Home tab we'll go
- 9:39:22to the new table function and create
- 9:39:25categories category table and we'll use
- 9:39:28values item category it can take a table
- 9:39:31or a column name that's one of the two
- 9:39:33things it can take when a column name is
- 9:39:35given it return returns a single column
- 9:39:37table with unique values when a table
- 9:39:39name is given it Returns the table name
- 9:39:41with the same column we have functions
- 9:39:43can give us distinct values you use the
- 9:39:45column example can I do with a table I
- 9:39:47have two tables data one which is having
- 9:39:49two rows which is common with the table
- 9:39:51data three what I want to do here is I
- 9:39:53want to see can I combine them Union I
- 9:39:56have was able to do a union of those and
- 9:39:58can I get a distinct so let's try to
- 9:39:59have a union distinct table which is
- 9:40:02actually the SQL Union can I have the
- 9:40:04SQL Union let's go to a new table again
- 9:40:07from the Home tab this time and we want
- 9:40:09the union the SQL Union which is not
- 9:40:11Union all usually the Dex Union is Union
- 9:40:13all so we'll say Union of data one and
- 9:40:18data three what is giving us it's giving
- 9:40:21us the data which the duplicate rows
- 9:40:23let's see can we use the function
- 9:40:25distinct and the moment we give distinct
- 9:40:28what does distinct function con take
- 9:40:29distinct function so distinct can take
- 9:40:31column name or table expression return
- 9:40:33one column table that contains the
- 9:40:35distinct values in a column for a column
- 9:40:38argument or multiple column with
- 9:40:40distinct unit combination of values for
- 9:40:42a table expression argument table
- 9:40:44expression argument we want to give
- 9:40:45Union data 1 and data 3 let's see what
- 9:40:47happens so now we have item one and item
- 9:40:50two repetition on item three is having
- 9:40:52one value as three and one value as six
- 9:40:54and that is why both of them are coming
- 9:40:56so with the distinct we are able to do
- 9:40:58it can we also do it using values let's
- 9:41:00do one thing let me tell you one quick
- 9:41:02thing I can make it this one as a
- 9:41:04comment copy so we remember both and use
- 9:41:07values here now okay values function
- 9:41:09except a column reference expression or
- 9:41:12a table expression as argument one okay
- 9:41:15it's not taking this one can it take
- 9:41:17already existing table let's do one
- 9:41:19thing so we have Union equal and let me
- 9:41:22make it as only Union the union SQL
- 9:41:24table we have still have the duplicates
- 9:41:26now let's create one more new table we
- 9:41:28have one physical table and now we are
- 9:41:30going to use that another physical table
- 9:41:32is distinct SQL as values Union equal
- 9:41:37table so understand this thing when we
- 9:41:40use the table expression it doesn't give
- 9:41:42us the unique values so first you are
- 9:41:45not able to use values with a variable
- 9:41:46table and second it's not going to give
- 9:41:48you distinct values for a table so for a
- 9:41:50table distinct values we have to use
- 9:41:52distinct but for a single column we can
- 9:41:55still use values function for a table
- 9:41:56it's not going to do it it has a
- 9:41:57different purpose so in this manner you
- 9:41:59can use values and distinct function as
- 9:42:02per your requirement and you have
- 9:42:03learned some of the differences we have
- 9:42:05another function which can group the
- 9:42:07values and that is known as Group by we
- 9:42:08will learn a use case where Group by is
- 9:42:11going to behave better than summarized
- 9:42:13but to do this use case let me tell you
- 9:42:14what use case I want so in this use case
- 9:42:16what I want to do is I want to create a
- 9:42:18new table using data 1 and data 2 and
- 9:42:20without creating a third variable using
- 9:42:22that inside a variable I want to
- 9:42:24summarize the data I want to sum the
- 9:42:26values so as you can see they have some
- 9:42:27common rows with items is item one item
- 9:42:30two are common in those so I want to
- 9:42:31summarize that value I don't want that
- 9:42:33to repeat Union function will repeat it
- 9:42:35it's not going to aggregate that let me
- 9:42:37click and create a new table and the
- 9:42:39first time I'm going to attempt it with
- 9:42:41suiz summarize Group by so let me create
- 9:42:43a variable where underscore Tab and this
- 9:42:45is a very simple table which I'm going
- 9:42:47to create using Union data van first
- 9:42:49argument it can take multiple tables so
- 9:42:51data one and data two only two arguments
- 9:42:53I want to give as you can see in the
- 9:42:55syntax I can give multiple tables but
- 9:42:56I'm only giving two tables here I have
- 9:42:58two tables then shift enter return what
- 9:43:00I want in return is summarize how many
- 9:43:02columns I have two two columns isn't it
- 9:43:04so what is my variable table and from
- 9:43:06that table one column is Group by which
- 9:43:08is item so I can use item comma I want
- 9:43:10the sum so underscore sum of what sum of
- 9:43:13underscore I can't use sum so I need to
- 9:43:15use sumx underscore Tab and comma values
- 9:43:18column and let me I got a sum column I I
- 9:43:21got a group by column and let me press
- 9:43:22enter what are you observing here it is
- 9:43:24actually 22 it is actually the sum of
- 9:43:27the complete column this table in the
- 9:43:30sumx is not taking the row context it's
- 9:43:33taking it as a complete column the
- 9:43:35current row context is not available
- 9:43:38while I'm doing the summarizes some same
- 9:43:39as creating a calculated column it takes
- 9:43:42the complete value of the column but
- 9:43:44that's what I don't want what should I
- 9:43:45do in such case so let's copy this code
- 9:43:48and create one more table again under
- 9:43:49the Home tab new table is appearing I'll
- 9:43:51click on that and let me paste this so
- 9:43:54this is Group by Group by so again the
- 9:43:56table with Union but let's start with a
- 9:43:58different function in the return and the
- 9:44:00function which we are going to use is
- 9:44:01Group by what does Group by takes it
- 9:44:03takes a table expression Group by column
- 9:44:05names name and expression for expression
- 9:44:08so whatever number of Expressions you
- 9:44:10have you need to use a name for all such
- 9:44:12expression you need to rename the
- 9:44:13expression where you going to have the
- 9:44:15aggregate data same is true for
- 9:44:17summarize also what is our table name
- 9:44:18underscore tab gr by the column name is
- 9:44:22item want Group by item comma I want to
- 9:44:24do sum underscore sum comma sumx the
- 9:44:27function I want to use and here instead
- 9:44:29of table name I'll use current group
- 9:44:31function and then I'll use the value
- 9:44:33column and let me close this and try out
- 9:44:35and now you can see the item data is
- 9:44:38grouped properly because of this current
- 9:44:41group functionality available with the
- 9:44:44group by function which allows us to
- 9:44:46group the data which is applicable for
- 9:44:49the current Group by in the context so
- 9:44:51in this manner you have observed there
- 9:44:53is a difference between summarize
- 9:44:55function and the group by function let's
- 9:44:58now learn a function which is known as
- 9:45:00generate series generate series function
- 9:45:02can generate a table with a sequence of
- 9:45:05numbers so let me click on any of the
- 9:45:07table and from the table tool I'll click
- 9:45:10on new
- 9:45:12table I would like to generate the
- 9:45:14numbers sequences from let's say 1 to
- 9:45:18100 the function is generate series
- 9:45:21what is start value start value is one I
- 9:45:24can give I can give zero also end value
- 9:45:26is 100 and increment by
- 9:45:29one so in this manner I'm able to get a
- 9:45:32table which is generating sequences for
- 9:45:35me and it is giving me 1 to 100 now in
- 9:45:40case you want to generate odd number
- 9:45:42series you can just give it two here
- 9:45:45because it's starting from one it will
- 9:45:47generate a OD number series
- 9:45:51it will have 50 values only because till
- 9:45:53100 we have 50 only now if I want a even
- 9:45:56number I can either start from zero or
- 9:45:58two so that will create a even number
- 9:46:01series now let me tell you I can create
- 9:46:04a date table also along let me use
- 9:46:06generate series the first argument start
- 9:46:08value the second argument let me
- 9:46:10generate it for 365 days and the third
- 9:46:13argument as one again it's going to
- 9:46:15create for 365 days I'll go and use now
- 9:46:18add columns now add columns is is only
- 9:46:21getting what the values column with 365
- 9:46:23values comma name I'm create going to
- 9:46:26create a column which is known as date
- 9:46:28and what I'm going to date there is a
- 9:46:30beauty about the date Dex date there's a
- 9:46:32beautiful thing which we have learned
- 9:46:34about Dex date that we can simply add
- 9:46:35the numbers by using the plus sign and
- 9:46:37it will keep on giving us the dates
- 9:46:39added by that number so let me start
- 9:46:41with 2018 comma 01 comma
- 9:46:4401 and let me add plus now the generate
- 9:46:49series is returning me the value column
- 9:46:51which now I can use in this add column
- 9:46:54expression after the
- 9:46:56name and let me press enter and as you
- 9:47:00can see we getting the dates generated
- 9:47:02but there's a problem we are not getting
- 9:47:04the first gener because it's going to
- 9:47:05add the one also from zero to
- 9:47:08364 days now we got all the dates what
- 9:47:11we need in this manner you can use
- 9:47:14generate series function you can use it
- 9:47:16in table you can also use it in measure
- 9:47:19there could be use cases where you you
- 9:47:20need to generate a sequence inside a
- 9:47:23measure and that is where you can use
- 9:47:25the generate series function to generate
- 9:47:28sequence of numbers and that can be
- 9:47:30further used through some complex
- 9:47:32calculations let's learn two more Dex
- 9:47:34function generate and cross joint both
- 9:47:36the functions can generate a table which
- 9:47:39can be used in a calculated table or a
- 9:47:41measure which basically do the cartisian
- 9:47:43product is going to create the complete
- 9:47:46combination of the values to take this
- 9:47:48first example for Generate cion what I'm
- 9:47:51going to do is let me show you item
- 9:47:53table now item table has 13 Brands and
- 9:47:57five categories so total combination is
- 9:47:5965 but we are getting 55 rows here it
- 9:48:02means there are some combinations which
- 9:48:03are missing so first of all I want to
- 9:48:05generate all those combination and the
- 9:48:07second thing could be that what is the
- 9:48:09combination that is missing out of these
- 9:48:10are the things which we can do so let's
- 9:48:12go ahead and find that out for that what
- 9:48:14I'm going to do is I'm going to create a
- 9:48:15new table and for that I'll go to table
- 9:48:17tools and new
- 9:48:19table and how do I create that distinct
- 9:48:21combination of values so for that I need
- 9:48:24to use the distinct function also so let
- 9:48:27me use
- 9:48:29generate function first of all what does
- 9:48:31generate function do generate function
- 9:48:32takes table one and table
- 9:48:34two the second table expression will be
- 9:48:37evaluated for the each row of the first
- 9:48:40table returning the cross joint of the
- 9:48:42first table with these results now this
- 9:48:45evaluated for each row as a real big
- 9:48:47important for that we have to take a
- 9:48:48separate use case but we will take
- 9:48:50distinct item brand as the first table
- 9:48:54and I could have taken a bigger table
- 9:48:56but because I want to create that
- 9:48:58combination I'm taking a single column
- 9:48:59table but definitely you can have a
- 9:49:01table which is having more than one
- 9:49:02column can also work out and then we
- 9:49:04will use item
- 9:49:08category we will use distinct item
- 9:49:10category as second
- 9:49:12table
- 9:49:14so so now we have got 65 rows as you can
- 9:49:18see it means these are the possible
- 9:49:20combination now how do we find out what
- 9:49:22is missing combination we have learned
- 9:49:25one function
- 9:49:28accept now except function gives us
- 9:49:31something which is present in a not in B
- 9:49:33so how do I get the distinct values I
- 9:49:35can select all the values or I can do
- 9:49:37very simple thing I can go and use the
- 9:49:40summarized function what does summarize
- 9:49:41function take it takes a table as an
- 9:49:43argument first of all and then we can
- 9:49:46give all the group by columns and then
- 9:49:48the name and the expression for the
- 9:49:50aggregated column but here we only need
- 9:49:52the group by column that is item
- 9:49:55brand and item category so these are the
- 9:49:59distinct combination which is present
- 9:50:01with us so now you can see there are 29
- 9:50:04such combinations are missing so
- 9:50:06basically it is not that 55 rows has all
- 9:50:08distinct combination there are 29 such
- 9:50:11combinations which were missing in this
- 9:50:14case and let's sort it on particular
- 9:50:16category sort ascending so for category
- 9:50:19one it is saying there is no brand 12
- 9:50:20and 2 so let's go to the item table and
- 9:50:23validate that so we go to the item table
- 9:50:25we select category
- 9:50:281 and you can see there is no brand 2
- 9:50:31and 12 here it means we are getting the
- 9:50:33correct
- 9:50:34results we have done this using generate
- 9:50:37so we see what generate does and what it
- 9:50:39can do the same operation can also be
- 9:50:41done using cross joint so we'll again
- 9:50:44create a new table table tool is visible
- 9:50:45so let's utilize the new table under
- 9:50:47that and this new table would be cross
- 9:50:50joint
- 9:50:51again we can use this into our Majors
- 9:50:54also by generating some tables so cross
- 9:50:57join what cross joint required return
- 9:50:59returns a table that is in cross joint
- 9:51:02with the specified tables here you can
- 9:51:04have multiple set of table the returns
- 9:51:06the table that is in cross joint with
- 9:51:08the specified tables now it is not
- 9:51:10talking about the row that's very
- 9:51:11important okay so we will use
- 9:51:14distinct
- 9:51:16item brand comma distinct
- 9:51:22item
- 9:51:25categories and we have got the distinct
- 9:51:2865 combination
- 9:51:29again again I can use that accept code
- 9:51:32to find out what is the combination
- 9:51:35which is missing so this is a cartisian
- 9:51:37product which has happened 13 distinct
- 9:51:39value five distinct value cartisian
- 9:51:40product has been done by cross joint now
- 9:51:43we'll complete that step and then
- 9:51:45discuss what is the
- 9:51:47difference
- 9:51:48except and what I've done is I copied a
- 9:51:51part of it let me use that again
- 9:51:54summarize item item brand and category
- 9:51:56is going to give me distinct combination
- 9:51:59which I have done just a minute back I'm
- 9:52:01bringing in that and I should get 29
- 9:52:03rows same 29 rows I'm expecting here so
- 9:52:07it means we are able to do cross joint
- 9:52:09we are able to do summarize to get the
- 9:52:11distinct value of more than one column
- 9:52:13and then we are able to find out what is
- 9:52:16missing in a particular combination the
- 9:52:18same could have been done in a major now
- 9:52:21what's the difference between two when
- 9:52:22should I use cross joint and when should
- 9:52:24I use generate whenever you need a
- 9:52:27filtering mechanism you should prefer
- 9:52:29generate and the reason for that is that
- 9:52:32generate can work on the row Value Cross
- 9:52:34join is not so let's take a new file and
- 9:52:37I have loaded a new file for this
- 9:52:40purpose so let me go ahead and bring in
- 9:52:42one file so we'll use this file cross
- 9:52:44joint versus generate it is employee
- 9:52:46data you could have used the employee
- 9:52:48file but I created a smaller version of
- 9:52:50that so that we can easily use it and
- 9:52:53understand that so let me click on that
- 9:52:55we'll right click on the raw copy link
- 9:52:58go back to the powerbi and in powerbi
- 9:53:01we'll go to the Home tab get data
- 9:53:06web paste the URL click on okay one
- 9:53:10Excel
- 9:53:11sheet with the name employee I'll press
- 9:53:14the load
- 9:53:18button employee table has has been
- 9:53:20loaded
- 9:53:22here so what I basically want is
- 9:53:24basically I have a start date and end
- 9:53:27date and I want to generate all the
- 9:53:29dates between these so 1st to 15
- 9:53:31February 1st January to 31st January 1st
- 9:53:34January to 31st January 15 January to
- 9:53:3631st January these are the dates I want
- 9:53:39to generate all the dates between that
- 9:53:41so let me try out this thing first using
- 9:53:44generate Home tab new table visible
- 9:53:48click on that what we need to do here is
- 9:53:51basically
- 9:53:53employee days dates one employee dates
- 9:53:57one what we
- 9:54:00generate generate function what is the
- 9:54:02first table very simple employee
- 9:54:05table what the second table the second
- 9:54:07table is I need a calendar I need to
- 9:54:10generate the dates between the start
- 9:54:12date and end date can I get the start
- 9:54:15date of employee table seems like I'm
- 9:54:17getting end date of the employee table
- 9:54:21T seems like I'm getting that and let me
- 9:54:25after doing this let me
- 9:54:28try let me press
- 9:54:31enter and as you can see the data here
- 9:54:34for the employee one we getting all the
- 9:54:36dates in
- 9:54:38January also we are getting dates till
- 9:54:4015th of
- 9:54:42February but for employee 2 the data is
- 9:54:45ending on January for employee 3 it is
- 9:54:49just 15 days of
- 9:54:51data only those dates are getting
- 9:54:54generated now how to do the same thing
- 9:54:56in the cross join okay let's try again
- 9:54:59click on the new table under the Home
- 9:55:01tab is still
- 9:55:03visible let's call this table as
- 9:55:07imploy date
- 9:55:10to cross
- 9:55:13join employee table comma
- 9:55:18calendar I try to get start date I I'm
- 9:55:21not getting any suggestion so maybe I'll
- 9:55:24forcefully write down so I copied that
- 9:55:25code at that time it is showing me error
- 9:55:28so seems like it's not going to give me
- 9:55:30and yes I don't have a row context
- 9:55:32available so I'm not able to use so what
- 9:55:33I'm going to do here is I'll use Min
- 9:55:36of employee start date and I'm taking
- 9:55:39the complete table column now okay and
- 9:55:42Max of employee end date what ex it is
- 9:55:45doing is basically is giving me the
- 9:55:48minimum of the start date and the
- 9:55:49maximum of the end and
- 9:55:51date and because of that let me sort it
- 9:55:53on the
- 9:55:54employees What's Happening Here is look
- 9:55:56at the employee
- 9:55:59second you will see the employee second
- 9:56:02has the data in February
- 9:56:04also employee 3 is having the January
- 9:56:07data from 1
- 9:56:09January and having the data in the
- 9:56:11February
- 9:56:12also which is not correct in such cases
- 9:56:16what we need to do once we get this and
- 9:56:18assuming you don't have common column
- 9:56:19name otherwise you have to use the
- 9:56:21select columns you have to use filter
- 9:56:24here now the date column calendar
- 9:56:26generate a date column so we have a date
- 9:56:27column is greater than and equal to the
- 9:56:30start date and date is less than and
- 9:56:34equal to and date the dates which is
- 9:56:37available in this table you're going to
- 9:56:39use a filter function and the rows has
- 9:56:41reduced from 130 plus 294 and in this
- 9:56:46case you will see that the employ two is
- 9:56:50no
- 9:56:51more getting data in February same is
- 9:56:54true for employe 3 very limited data so
- 9:56:57youve seen that cross joint is going to
- 9:57:00create a much larger data set in such
- 9:57:02case and think about you have a very
- 9:57:04large date range it can explore the data
- 9:57:06and then we filter it which is really
- 9:57:08not effective and think about that we
- 9:57:10may have to do this as a major and in
- 9:57:13case of major what happens is uh we
- 9:57:15typically use a disjoint table and using
- 9:57:17the disjoint table join also we can
- 9:57:20actually for such filter we may or may
- 9:57:22not always use generate and cross join
- 9:57:26used there but yes as per requirement
- 9:57:29and use them so what I've done that when
- 9:57:31I was doing all those table operations I
- 9:57:34actually saved the file as N2 and 3 and
- 9:57:36I have kept that file aside now and I
- 9:57:39came back to N2 and 4 for rest of our
- 9:57:43operations which are typically related
- 9:57:45to measures and now what we wanted to do
- 9:57:48we want to learn few more me measures
- 9:57:50and for that we need the help of some of
- 9:57:53these table calculations and that's why
- 9:57:56we learned so now what we are going to
- 9:57:57learn is some of the use cases where we
- 9:57:59need to use summarize and values they
- 9:58:01can help us to change the level of
- 9:58:04detail calculation like some of averages
- 9:58:06or average of sum so basically what
- 9:58:08happens you do a operation till a
- 9:58:10particular level and after that you
- 9:58:11change the aggregation so it was doing
- 9:58:13sum and then I do the average same way
- 9:58:15sometime what happens is we are using a
- 9:58:17filter context of visual row and I'll
- 9:58:19give you an example of what we mean by
- 9:58:21use context we reuse a filter context in
- 9:58:24the calculation and the grand total is
- 9:58:26not going to be correct in such case on
- 9:58:28also in such cases we can use summarize
- 9:58:31and value sometime the way I'm telling
- 9:58:34you may not work in such cases what you
- 9:58:36have to do is you have to basically go
- 9:58:38ahead and create a mejor first and then
- 9:58:41create another mejor on top of that to
- 9:58:43make it work so let's jump onto the
- 9:58:45first use case where we are going to do
- 9:58:47it I want to create average of so let me
- 9:58:50create a matrix Visual and in this
- 9:58:53Matrix visual I'm going to bring in from
- 9:58:55geography table state and city I'm also
- 9:58:59going to bring in a net measure as a
- 9:59:02value let me expand it very simple you
- 9:59:05have certain cities for which the values
- 9:59:07is getting aggregated and that the same
- 9:59:09sum is shown here but I don't want sum
- 9:59:12at the state level I want an average how
- 9:59:14I'm going to do that so let me start
- 9:59:16with a new major and this new major is
- 9:59:19going to be aage average of city net
- 9:59:22this city I want to do some post that I
- 9:59:24want to do average what I have to do
- 9:59:26here is basically average X I can use
- 9:59:29values or summarize let me use values as
- 9:59:31of now to begin with values then let's
- 9:59:35use geography City till this level you
- 9:59:37have to do whatever aggregation I'm
- 9:59:39going to do in the expression net and
- 9:59:42then I'll complete this code and let me
- 9:59:45bring in this new major as you can
- 9:59:48observe here value is no more a sum it
- 9:59:52is an average I would like to take one
- 9:59:55more example here now we have a major
- 9:59:58known as gross amount isn't it so let me
- 10:00:01do one thing let me first create a major
- 10:00:04with the help of values only and let me
- 10:00:07call it as gross so average gross same
- 10:00:09calculation what I've done for net and
- 10:00:12you can see the average is happening I
- 10:00:14would like to do the same calculation
- 10:00:16now but with the help of a column where
- 10:00:18I want to aggregate it into the
- 10:00:20expression part of the average X
- 10:00:22function so let me create a new major
- 10:00:23again I'm going to take help from Major
- 10:00:25Tool which is visible right now let me
- 10:00:28paste this gross calculation and make it
- 10:00:30gross fun and here instead of gross I'll
- 10:00:33use sum of sales gross amount very
- 10:00:36simple instead of measure I am going to
- 10:00:38use the sum of gross amount expecting
- 10:00:41the same result pay attention the result
- 10:00:44is not same not same as this one and let
- 10:00:46me bring in Gross for your reference
- 10:00:50and this is the behavior of expression
- 10:00:52function which I want you to note down
- 10:00:54and to correct this behavior let's use
- 10:00:57calculate inside this
- 10:00:59calculation in the expression if you
- 10:01:02need to do an aggregation if you are
- 10:01:04giving a table expression table
- 10:01:07expression and you are using aggregation
- 10:01:09on the column then you have to use
- 10:01:11calculate in the expression you cannot
- 10:01:14do it without that let me do it right
- 10:01:16now and now you can see the values are
- 10:01:19are
- 10:01:20matching that's great can we do the
- 10:01:23similar kind of calculation with
- 10:01:24summarize because values will allow us
- 10:01:26only one summarize can allow us multiple
- 10:01:28so let's say I want after two the
- 10:01:31average should happen or after three
- 10:01:33average should happen or the calculation
- 10:01:35which are done which need a grand total
- 10:01:37sub total correction might require
- 10:01:39multiple columns then what should I do
- 10:01:41so now let's try the same thing can we
- 10:01:43do it using the summarized function we
- 10:01:45have already used the value function let
- 10:01:47me do one go ahead and copy one of the
- 10:01:49calculat I'll copy this gross
- 10:01:51calculation and I'll modify this so just
- 10:01:53for my reference I'm copying it and two
- 10:01:56and let's put this into the commands and
- 10:01:59try to replicate the same the first one
- 10:02:01we are going to do is aage X summarize
- 10:02:05taes this is the center table geography
- 10:02:08City till City I need the sum and then I
- 10:02:11simply use the gross measure and let me
- 10:02:14check the calculation out and as you can
- 10:02:17see and let me move the gross
- 10:02:20maybe at the start along with the net
- 10:02:23now you can see this calculation is same
- 10:02:25as this one so mean summarize can also
- 10:02:28help us and summarize can take multiple
- 10:02:30columns you give the center table the
- 10:02:31reason I given the center table is that
- 10:02:33if you are working across two tables
- 10:02:35like item and geography then still you
- 10:02:38will be able to do such calculation
- 10:02:39let's say you need it after two columns
- 10:02:41so there is a level of detail which you
- 10:02:44have you know used it and post that you
- 10:02:46have done it and it is not that if even
- 10:02:48if I go let's say one step ahead and
- 10:02:50let's look at this let me go up one
- 10:02:52level now in this case right now there
- 10:02:54is no City present in the calculation
- 10:02:57the level of detail has been included to
- 10:02:59take the average so if some of you
- 10:03:01wanted to have a level of detail include
- 10:03:04this is something how you do level of
- 10:03:06detail include you have learned remove
- 10:03:08filters that is exclude now this is
- 10:03:10include now let's play around further
- 10:03:12with this so what I'm going to do here
- 10:03:14is can I do a sum of gross amount here
- 10:03:16and is it going to be a little bit
- 10:03:17different so we say sum of sales gross
- 10:03:20so just like values do I need to use the
- 10:03:22calculate function or summarize can do a
- 10:03:24better job for me no I need to use
- 10:03:27calculate so let me use calculate here
- 10:03:30and I'm not creating multiple Majors
- 10:03:31here you for your reference you can go
- 10:03:33ahead and create it this is one but yes
- 10:03:36I'm going to do one more version of this
- 10:03:37one let me copy this and let me create a
- 10:03:40new measure of another version which I
- 10:03:43can create with summarizes actually
- 10:03:45summarize can also include a calculation
- 10:03:47inside the table so we have the Group by
- 10:03:50columns and after that the expression
- 10:03:52says that you can have name and
- 10:03:53expression here what does that mean for
- 10:03:56us you can have underscore one or I can
- 10:03:59give underscore gross for your reference
- 10:04:01and name and here I'm not using
- 10:04:03calculate let me use sum and here uh
- 10:04:07this is sum is ending this is uh
- 10:04:10summarize ending comma underscore gross
- 10:04:13and I knowingly give these whenever I
- 10:04:15use such variables or such calculated
- 10:04:18column which is inside the table
- 10:04:20expression or as a variable or a where I
- 10:04:23usually give them underscore so that you
- 10:04:25are able to differentiate that I'm doing
- 10:04:27something different and let me do this
- 10:04:29is two is already available let me
- 10:04:31rename it and press enter let me add it
- 10:04:34to the visualization and our calculation
- 10:04:37remains same what we wanted in this
- 10:04:40manner you can use summarize also to get
- 10:04:43these average of sum you can do same
- 10:04:45thing with sum of averages or when you
- 10:04:48want to use include level of details
- 10:04:51this is what you can do so another
- 10:04:52example which I wanted to do here is
- 10:04:54basically where we use the filter
- 10:04:57context of visual Road and our grand
- 10:04:59totals are not correct and we wanted to
- 10:05:00correct again values and summaries
- 10:05:02depending on the requirement can be used
- 10:05:04sometime they can be used like just like
- 10:05:06what example I've given here and
- 10:05:08sometime you may have to use the measure
- 10:05:10inside another measure where you use
- 10:05:12values and summarize so you begin let me
- 10:05:14rename this as average of sum and let's
- 10:05:17begin a new tab and this time what I'm
- 10:05:19I'm going to do here is let me bring in
- 10:05:21brand from item and let me create
- 10:05:24something which uses the filter context
- 10:05:26of visual row I'll bring in that create
- 10:05:29a table visual so if you created a
- 10:05:31visual and you want to change it just
- 10:05:33click on that Visual and click on the
- 10:05:35another visual type inside the insert or
- 10:05:38inside the visualization Pane and you
- 10:05:39will get that kind of visual now I want
- 10:05:41to create a visual which use context and
- 10:05:43how do you use context this is how you
- 10:05:45use the context because after some time
- 10:05:47we will have some time intelligence
- 10:05:49measure which is also going to use that
- 10:05:50so I want sum of brand one and I'm not
- 10:05:54going to use filter here I will use if
- 10:05:56Max of item brand now this Max of item
- 10:06:00brand what's Max is going to take in a
- 10:06:02row see in the row brand 8 itself is
- 10:06:05available let's say there is a brand8
- 10:06:07available and I'm using category so row
- 10:06:09only contain brand8 and then I'm using
- 10:06:11category then it can bring the within
- 10:06:12brand8 whatever is maximum category is
- 10:06:14going to bring in that but here brand
- 10:06:16eight itself is present the max of brand
- 10:06:18eight what it is actually it is brand 8
- 10:06:20in the first row so in this row it is
- 10:06:22going to be brand 8 the brand 13 that's
- 10:06:25the only value available yeah if I use
- 10:06:27category definitely there are more
- 10:06:28values available then it can take a Max
- 10:06:30and I'll call it as it is equal to Brand
- 10:06:32one comma what value I want to return
- 10:06:34net otherwise I don't want to return
- 10:06:35return a value let me try this out I got
- 10:06:38a major tons of major now we have you
- 10:06:40see the value for the brand one is
- 10:06:42correct but there's no grand total here
- 10:06:44and this is what we call the
- 10:06:46calculations error because of filter
- 10:06:48context context have you used now this
- 10:06:50is one example you may have many other
- 10:06:52such calculations where context is
- 10:06:54causing your grand total either not to
- 10:06:57appear or to appear wrong because
- 10:06:59remember the grand totals are calculated
- 10:07:01again when you calculated the grand
- 10:07:03total again there was no item brand
- 10:07:05available and when the item brand is not
- 10:07:07available you blank value how do we
- 10:07:09correct that so let's try with sux
- 10:07:12values item
- 10:07:14brand comma if
- 10:07:17calculation did not work out did not
- 10:07:20work out let's use
- 10:07:22calculate so the moment we added the
- 10:07:25calculate the results have started
- 10:07:28coming out so as you aware that when you
- 10:07:30use calculate is going to appear and let
- 10:07:32me remove the calculator and showcase
- 10:07:33you again whenever you are doing some
- 10:07:35kind of a calculation inside the
- 10:07:37Aggregates make sure the calculate is
- 10:07:40used and once you use the calculate you
- 10:07:42will get your calculation and you know
- 10:07:44the alternative is summarized and which
- 10:07:46you can also use to correct such
- 10:07:48calculations so we have learned how can
- 10:07:50we use summarize and values to get
- 10:07:52include level of details and how can we
- 10:07:55use it to correct our grand totals let
- 10:07:57me just copy paste for your reference
- 10:08:00and add summarize here so that you have
- 10:08:02an example to refer when I share these
- 10:08:05files with you we'll use a
- 10:08:08summarize sales comma item
- 10:08:10brand and this is sum of brand one
- 10:08:13though I'm calling it brand two so we
- 10:08:15have both the measures available with
- 10:08:17help from values and summarize we
- 10:08:19continue with one more use case where we
- 10:08:21can use suiz and values and the place
- 10:08:24where we need is basically when we need
- 10:08:26to count the distinct values B so how do
- 10:08:29we get the distinct count of anything so
- 10:08:32in the sales table items are basically
- 10:08:34made not going to be more than so how
- 10:08:36many distinct items I have in my item
- 10:08:39basically what I can do here is I can
- 10:08:40bring in item here and I can use a build
- 10:08:45a visual Pane and change its aggregation
- 10:08:48I will get a 55 is the count I'm getting
- 10:08:50there's a function distinct count I can
- 10:08:51use so let me try to create a major
- 10:08:54first major
- 10:08:56is this
- 10:08:59count and we use the function distinct
- 10:09:01count sales item
- 10:09:06id let me bring it here this is 55 on a
- 10:09:11larger data the distin count might not
- 10:09:13give you the desired performance I'll
- 10:09:14tell you couple of ways which could give
- 10:09:17you a little bit better
- 10:09:19distinct count we are going to use
- 10:09:23again in this distinct count I'm not
- 10:09:26going to use function distinct what I'm
- 10:09:27going to use I'll use count
- 10:09:32rows values now single column I can use
- 10:09:34values we have learned that in the past
- 10:09:37get the distinct values you can use
- 10:09:40values let me bring in here get it okay
- 10:09:46so you're getting the same values now
- 10:09:47let's learn one more way which which you
- 10:09:49can actually use on multiple column
- 10:09:51somebody ask you what is the distinct
- 10:09:53combination of city and item you have in
- 10:09:55the how do you do that and in fact
- 10:09:57somebody can ask that brand and state
- 10:09:59combination how do we do that what we
- 10:10:02are going to do here is we are going to
- 10:10:03use
- 10:10:04summarize so first let me give you this
- 10:10:07one listing count of item only and then
- 10:10:10we will create a little complex case so
- 10:10:13here we got this now we would like to
- 10:10:15know the brand and the state combination
- 10:10:17now state is also not at the role level
- 10:10:20and brand is also not at the role level
- 10:10:22what is that distinct combination
- 10:10:23present with us for that now let's go
- 10:10:26ahead and try that out and this time let
- 10:10:28me explain you I quickly changed in the
- 10:10:30case of summarize we have done few more
- 10:10:32examples already now this time what I'm
- 10:10:35going to do is let me explain you the
- 10:10:36complete calculation count rows let me
- 10:10:39use count rows this can also be used
- 10:10:41when you have a visualization with few
- 10:10:43group buys and few Majors you can take
- 10:10:45the complete combination of those majors
- 10:10:47and group Buys in the summarize and can
- 10:10:49count it so count rows summarize what
- 10:10:52summarize needs table so Central table
- 10:10:55I'm going to give geography state I'm
- 10:10:57going to take and from item I'm going to
- 10:11:00take brand remember the combination is
- 10:11:03not available in the say table it is
- 10:11:05available in the related table and I'm
- 10:11:07bringing in the count for those distinct
- 10:11:10count is not going to work the alone
- 10:11:13values cannot help me out so summarize
- 10:11:15can help in such cases so you can get
- 10:11:18distinct count counts using summarize
- 10:11:20function and count rows let us now learn
- 10:11:23how can we get percentage of total we
- 10:11:25start a new visual let me create a
- 10:11:28matrix visual first of all and in this
- 10:11:30Matrix visual I would like to bring in
- 10:11:32state and city from geography table so
- 10:11:34state city and my favorite major bring
- 10:11:37city under the state now when you do
- 10:11:39that when you go to this major and right
- 10:11:41click you see an option percentage of
- 10:11:44Grant total percentage of row total
- 10:11:46percentage of column total let's look
- 10:11:48what is percentage of GR total let's
- 10:11:50look at the other option right
- 10:11:52click show value as percentage of column
- 10:11:55total no difference again it is 100% no
- 10:11:58value is percentage of there's no row
- 10:11:59total right now there is a no row so
- 10:12:01100% so basically they are just giving
- 10:12:02me percentage of Grant total so now let
- 10:12:05me go ahead and show show values but
- 10:12:08what happens sometime I might require
- 10:12:09certain calculation where I actually
- 10:12:11need percentage how do I do that we have
- 10:12:13learned few function in the past and
- 10:12:14they are going to help us out calculate
- 10:12:16percent of DT net grand total of net I
- 10:12:20want to use the divide function because
- 10:12:22I want to divide the current calculation
- 10:12:24by the total grand total I'll tell you
- 10:12:26how to get the grand total so divide
- 10:12:28functions make sure that divide by 0 is
- 10:12:30handle okay if to divide by 0 so net
- 10:12:32what is available in the current now I
- 10:12:34need a grand total the grand total
- 10:12:36should violate or should not have any
- 10:12:38filter consideration and to do that we
- 10:12:41have something first of all I'll use
- 10:12:43calculate net now I can use all or all
- 10:12:45selected now if you want to honor the
- 10:12:47filters use all select you should don't
- 10:12:49even want to the filter context use all
- 10:12:51I want to use all selected let me not
- 10:12:54give any table name or it independent of
- 10:12:56the tables so typically it will apply on
- 10:12:58your C you will say it was showing 5%
- 10:13:01something because when you use
- 10:13:03percentage basically right now A Rao and
- 10:13:05to convert to the percentage you click
- 10:13:07on this you will get the percentage and
- 10:13:10now you are saying I need sub toal how
- 10:13:12do I get for sub total Alaska it would
- 10:13:14be like 100% because Alaska only have
- 10:13:16one Arizona has more a couple of ways
- 10:13:19let start with first way so the first
- 10:13:20way which I'm going to use here in I'm
- 10:13:22going to use divide and I'll call it St
- 10:13:26sub tootal one and there are few ways so
- 10:13:28first way is in the second calculator
- 10:13:30which is the sub total which I want I
- 10:13:32can use remove filters of city now there
- 10:13:35are only two levels so I can say remove
- 10:13:36filter of City geography City what
- 10:13:39happens when I remove the filter of
- 10:13:40geography City or when I use all
- 10:13:42geography City th will be removed from
- 10:13:44the context so this is exclude level of
- 10:13:48details I mean excluding a level of
- 10:13:50detail again I need to make it as a
- 10:13:51percentage and as you can see now this
- 10:13:55is 100% this is 100% only one city and
- 10:13:57this combination is 100% and definitely
- 10:13:59at a state level we are going to have
- 10:14:00100% so this is one way so we have
- 10:14:03excluded the de there is one more way
- 10:14:04which we can use for that we'll go
- 10:14:07little bit more changes here again the
- 10:14:10half of the formula will remain same so
- 10:14:12the first part the role remains same the
- 10:14:14calculate remains same here what I'm
- 10:14:16going to do is filter all all selected
- 10:14:20geography I'm going to bring in
- 10:14:21geography table and then I'll say
- 10:14:24geography state I'm trying to bring in
- 10:14:26the filter context of visual row
- 10:14:28geography State equals to the max of
- 10:14:33geography state I'm trying to bring in
- 10:14:36the filter context of visual row here
- 10:14:38whatever state is in the context that
- 10:14:41only should be considered as a filter
- 10:14:43you take the complete geography table
- 10:14:44ignore everything on the geography table
- 10:14:47but state is equal to Max space so
- 10:14:48whatever state is there in the row that
- 10:14:50is the only thing you to consider I
- 10:14:52calculated another subtotal and let me
- 10:14:54go ahead and make it as a percentage
- 10:14:56column and you will see similar results
- 10:14:58a little bit different approach but what
- 10:14:59we have there done here is filtering the
- 10:15:02complete geography table for the row so
- 10:15:05I considered the complete geography
- 10:15:06table for every row filter is applied
- 10:15:08filter context of visual row been
- 10:15:10ignored because of that on the context
- 10:15:11has been ignored but we are saying the
- 10:15:12geography state in this complete table
- 10:15:15should be equal to the max of geography
- 10:15:16State and what is this Max of geography
- 10:15:18State the state which is available in
- 10:15:19this particular Row in this row though
- 10:15:21I'm seeing City but I'm Arizona is the
- 10:15:23state present here in the row context so
- 10:15:25geography State complete table I'm
- 10:15:28filtering for the current date and
- 10:15:30that's how it is getting calculated and
- 10:15:31we got the percentage of sub total in
- 10:15:34this manner you can calculate percentage
- 10:15:35of up total let's discuss how can we
- 10:15:39create a rank now rank we might need as
- 10:15:41a major we might need as a column now we
- 10:15:44have few functions to do rank we have
- 10:15:47rank X only Rank and rank rank. EQ there
- 10:15:50is function for that all now the
- 10:15:52function which we are going to discuss
- 10:15:53right now is rank X and we are going to
- 10:15:55discuss the rank function later when we
- 10:15:57will discuss the functions which are
- 10:16:00very similar to SQL window fun they are
- 10:16:02not same as SQL window function but in
- 10:16:04few aspect they are very similar to that
- 10:16:06so when we are going to discuss that's
- 10:16:08where we are going to discuss the ram
- 10:16:09function first of all let me go ahead to
- 10:16:12my table View and in the date table I
- 10:16:14would like to create a rank this rank
- 10:16:16would be used later when we will do the
- 10:16:18time intelligence what I want to do here
- 10:16:20is I have this column Week start date I
- 10:16:23want to create a rank on week start date
- 10:16:26and the reason for that is typically
- 10:16:28whenever you want to do time
- 10:16:30intelligence if we don't have the
- 10:16:32extended time intelligence function we
- 10:16:34actually use the rank function start of
- 10:16:36the week is one column on which I want
- 10:16:38to create a rank I want to create a new
- 10:16:40rank column let me click on new column
- 10:16:42column tools is visible because I
- 10:16:44already clicked on a column and let me
- 10:16:46use this week start date column and
- 10:16:48create a rank so I'll use I'll give the
- 10:16:50name as Peak rank make it a little bit
- 10:16:53bigger so that you can see it Rank and
- 10:16:55you can see rank. EQ rank X and rank
- 10:16:57three functions are there I'm going to
- 10:16:59use rank X now the rank X function have
- 10:17:01few arguments which are required the
- 10:17:03first argument is table in case of
- 10:17:05column it's going to be a table or you
- 10:17:07can use filter function to return return
- 10:17:09a table which can restrict it when we
- 10:17:11create like rank subcategory rank if you
- 10:17:13want to create you can have use the
- 10:17:14filter function expression this is going
- 10:17:16to be our column third we are going to
- 10:17:18leave fourth is order by default it is
- 10:17:20descending rank x is by default
- 10:17:22descending and ties is Skip and dens by
- 10:17:25default is Skip I'll explain you the
- 10:17:27meaning of skip and dense in a moment so
- 10:17:29we're going to use dense and Skip here
- 10:17:31one by one and I'll explain the meaning
- 10:17:32so let me showcase you so I'll start
- 10:17:34with rankx table name is date table and
- 10:17:37I'm creating it as in a column not
- 10:17:39adding to the script we can add it to
- 10:17:41the script later and then the column I'm
- 10:17:43going to use is Week start date and I'll
- 10:17:46leave it as only two arguments I'm
- 10:17:47supplying right and let me do one thing
- 10:17:49let me sort the dates on ascending order
- 10:17:52we understand the meaning of ascending
- 10:17:54and let me close date we have a pretty
- 10:17:56big date skpt let me close that now
- 10:17:58let's look at it so what's happening
- 10:18:00here definitely we are why we are
- 10:18:02getting the highest rank first of all
- 10:18:03because it's a descending Rank by
- 10:18:05default we actually wanted as sending
- 10:18:07rank so whenever we create a rank for
- 10:18:09the date column we actually need as
- 10:18:10sending rank second I opened all the
- 10:18:13distinct values and you can see the rank
- 10:18:15has jumped this is because it is a skip
- 10:18:17rank what happens in case of skip rank
- 10:18:19let's understand this let me sort it
- 10:18:21ascending here so for 7 days I have this
- 10:18:24rank so the next rank is not two it's
- 10:18:26eight so it's a skip the ranks which are
- 10:18:29actually they repeating if it is one one
- 10:18:32then next is three it's a skip if it is
- 10:18:35one one and next is two then it is 10 so
- 10:18:37two things I need to change here is
- 10:18:39first I need the rank as ascending rank
- 10:18:41so I need to give an argument by default
- 10:18:43it is descending and ties We Know by
- 10:18:45default it is Skip so I need to create a
- 10:18:47dance Rank and let me press now you can
- 10:18:49see on my calendar the minimum date is
- 10:18:52having rank one and in spite of rank
- 10:18:55repeating twice I don't have the rank as
- 10:18:57three I still have it as two so dance
- 10:19:00rank is a continuous rank the rank
- 10:19:02numbers will be one to three in spite of
- 10:19:06repetition that is what we call dance
- 10:19:08rank so we have created a dance rank
- 10:19:11here and we have created ascending so
- 10:19:13rank X function is something we have
- 10:19:15used to create a new column now let's go
- 10:19:18ahead and create a rank magic so I'll
- 10:19:20add a new page for that so let me create
- 10:19:22a visual brand the table visual I'm
- 10:19:24bringing in brand and net converting it
- 10:19:27to table I want to create rank already
- 10:19:29it is sort in descending I want to
- 10:19:30create a rank on the same order what I
- 10:19:32can do here is basically new major I'll
- 10:19:35click on new major and I'll call it rank
- 10:19:38net I'm going to use rank X all selected
- 10:19:42now what is the difference between all
- 10:19:43and all selected I'll showcase you in in
- 10:19:45a short file all selected item bran and
- 10:19:49net now I can give the other argument so
- 10:19:51I can have in the table I need to have
- 10:19:53all selected all all except something I
- 10:19:56need here expression here need to be
- 10:19:57major values we are going to leave order
- 10:20:00I'm going to use descending because
- 10:20:02mostly we all to create descending Rank
- 10:20:04and ties I'm going to use Den here so I
- 10:20:07can leave any argument after this one
- 10:20:09descending by default it is descending
- 10:20:11so I can could have skipped that and den
- 10:20:14so it's giving you r 1 2 3 4 5 what's
- 10:20:16the difference between all and all
- 10:20:18selected for that let me do one thing
- 10:20:19let me also bring in a slicer on brand
- 10:20:22and let me build it as a multi- select
- 10:20:25and show so I'll do select all as you
- 10:20:28can see that the moment I am removing
- 10:20:30something the rank is getting adjusted
- 10:20:32if you see now the rank is still one 2 3
- 10:20:344 5 6 7 8 9 10 this is because all
- 10:20:37selected it is considering only the data
- 10:20:39on which the rank is getting created but
- 10:20:42if you don't want that you say no no
- 10:20:44even though I remove the data from my
- 10:20:46context I still want my rank to honor
- 10:20:49the initial data then I can use all now
- 10:20:51you can see that the rank is having
- 10:20:54jumps so we have number six this is
- 10:20:57missing because we have unselected that
- 10:20:59we have number nine which is missing
- 10:21:00okay we have number three which is also
- 10:21:02missing so this is how all work now
- 10:21:04let's come to a really interesting
- 10:21:06feature of the rank and let me explain
- 10:21:08you for that first of all I'm going to
- 10:21:10bring from the brand table the brand ID
- 10:21:12into the
- 10:21:13visualization and let me enable the
- 10:21:15build a visual for that I right on the
- 10:21:18right hand side there was an option I
- 10:21:19enabled that and I'm going to bring the
- 10:21:21brand ID why did all the rank became
- 10:21:28one for reason for that is and to
- 10:21:31understand that reason let's change it
- 10:21:32little bit let me remove brand ID and
- 10:21:34let me bring in actually category and
- 10:21:36then you will be able to understand
- 10:21:38better let me sort first on category
- 10:21:40shift and sort on rank now you can see
- 10:21:43inside the category all the ranks are
- 10:21:46for the brand so the category is is
- 10:21:48acting as a partition and inside that we
- 10:21:51are getting the rank so the rank get
- 10:21:54redistributed or partition on the column
- 10:21:57which is not present in the rank measure
- 10:22:01when I created my measure whatever
- 10:22:03columns are not present if they are used
- 10:22:05in the visualization the rank will
- 10:22:07redistribute inside that you know
- 10:22:09partition itself into that and because
- 10:22:12of the same reason because brand ID and
- 10:22:14brand are at the same level now category
- 10:22:16has different different brand but where
- 10:22:18bring in now again the brand ID each
- 10:22:21brand ID has only having one brand and
- 10:22:24that is why the rank is coming as one
- 10:22:25one one one then how do we handle such
- 10:22:28scenario one of the easiest ways and
- 10:22:30because they're belonging from one table
- 10:22:32you can simply bring in brand ID also
- 10:22:35inside this one now in this case I
- 10:22:37cannot use item table typically I take
- 10:22:40an example of City ID and City there I
- 10:22:42am able to use the geography table
- 10:22:44because they are at the lowest level
- 10:22:46brand is not at the lowest level so I
- 10:22:48have to specifically call Brand ID item
- 10:22:50brand now you can see the rank is again
- 10:22:53correct both are participa but what
- 10:22:55happens when you read rank on multiple
- 10:22:58columns which are not part of the same
- 10:23:00table so let me bring in brand again
- 10:23:02into a new table and let me also bring
- 10:23:04in state I'm bringing the state column
- 10:23:06so let me do one thing let me first
- 10:23:08bring in state here I'm doing a little
- 10:23:11bit change and then brand and net now
- 10:23:13what happens when I put that rank column
- 10:23:15let me again make it as a table visual
- 10:23:19again you can see the brand getting
- 10:23:21distributed the brand ID is not present
- 10:23:23brand is present it's getting
- 10:23:24redistributed inside I can sort on the
- 10:23:27state and then I can shift and sort on
- 10:23:29the net and you will see the rank
- 10:23:31getting adjusted but I need a continuous
- 10:23:33rank so anytime I create a state rank it
- 10:23:35will get distributed into brand rank if
- 10:23:37I create a brand rank it will get
- 10:23:39redistributed or partition on state I
- 10:23:41need a combined rank they are from two
- 10:23:43different tables so then how do I do
- 10:23:45that so let's again create a major and
- 10:23:47in this major which is rank net St and
- 10:23:51brand eight and brand I'll use rank X
- 10:23:54all selected now you know the difference
- 10:23:56between those I can't use all selected
- 10:23:57the reason are all because the moment I
- 10:24:00do that I use geography State comma item
- 10:24:03brand and you need to be careful because
- 10:24:05I have state available in geography and
- 10:24:07customer if I don't use the correct one
- 10:24:09uh it's going to not work again
- 10:24:11redistribution will happen inside that
- 10:24:13and I'll try this out and this this is
- 10:24:16giving an error because you can't use
- 10:24:17this different TBL so to overcome that
- 10:24:20what I'm going to use is I'll use
- 10:24:21summarize function summarize all
- 10:24:23selected on sales table sales so the
- 10:24:27table which I'm giving in the summarize
- 10:24:28is sales and as I'm giving a central
- 10:24:30table then I can take the dimensions
- 10:24:32table geography and item into that
- 10:24:35summarize so here it is summarize and
- 10:24:37all selected is compulsory here and then
- 10:24:39net and then I can use the other two
- 10:24:41parameter this sending and dense now let
- 10:24:43me add this to the visualization now
- 10:24:46here you will see the rank is again
- 10:24:48distributed why because we have taken
- 10:24:50customer that's what I was telling
- 10:24:52because I'm taking the geography State
- 10:24:53and I'm use this then it will create a
- 10:24:55problem so let me go ahead and change
- 10:24:57this State field from customer to
- 10:25:00geography and now you can see the rank
- 10:25:02is continuous okay in this manner you
- 10:25:05will get a continuous rank across
- 10:25:07multiple table column in sometime we
- 10:25:10will discuss rank function rank function
- 10:25:11is also better equipped than rank X
- 10:25:14function for handling the ties now there
- 10:25:16is a ways to handle ties in rank X but
- 10:25:19that's really challenging so we will
- 10:25:21keep that for rank function let's
- 10:25:24discuss top end function now when we
- 10:25:25want to get the top end there are a
- 10:25:27couple of options we have one is
- 10:25:29definitely we have a top end function
- 10:25:30which won't give us and the second
- 10:25:32option is basically at the visual level
- 10:25:34itself let me bring in brand and net
- 10:25:38into a visualization now as converting
- 10:25:41to table visual assume you want top five
- 10:25:43Brands by net what you will do simply go
- 10:25:45to the brand into the visual level
- 10:25:47filter and this happens in the visual
- 10:25:49level filter you can go here and use top
- 10:25:51and I need top five base is what I have
- 10:25:54net in the visual but I can get in based
- 10:25:56on margin percentage anything which I
- 10:25:58want but right now I definitely want
- 10:25:59base on the net so you drag the value
- 10:26:02here and you use apply please drag a
- 10:26:04measure and you get the top five values
- 10:26:06very easy so whenever we need it we can
- 10:26:08use that but we do have a function which
- 10:26:10is known as top end and let me explain
- 10:26:12you that function step by step I'm going
- 10:26:14to use the new major for that so let me
- 10:26:17click on the new major in the table tool
- 10:26:19and the major I'm going to create is top
- 10:26:2110 net and the function is top n Now
- 10:26:23what is my n value n value is 10 so I
- 10:26:26need n value I need table expression and
- 10:26:28here table expression will be all or all
- 10:26:30selected order by expression order
- 10:26:33ascending or descending and this kind of
- 10:26:35information is so let's start with I
- 10:26:36need top here we already have so big so
- 10:26:3913 values but I need only 10 values out
- 10:26:41of that all selected item brand comma
- 10:26:45order by expression order on net and
- 10:26:47what I want descending and right now
- 10:26:49I'll keep it only this one what happens
- 10:26:51here is basically the top end function
- 10:26:53actually returns a table the moment I
- 10:26:55put it here it start giving me error H
- 10:26:58you get an error calculation error
- 10:27:00measure custom table of multiple value
- 10:27:02it's basically table so what I can do is
- 10:27:05I can use this as a filter in the
- 10:27:07calculate so I'll use calculate net
- 10:27:10first argument and then we will have
- 10:27:12this top nend and press enter this seems
- 10:27:15to be some challenge isn't it the value
- 10:27:17top n and Branch seems like very similar
- 10:27:20to the grand total isn't it it doesn't
- 10:27:22seems to be filtering top end values
- 10:27:25either okay let me do one thing in this
- 10:27:27visual let me remove that's the first
- 10:27:29reason after I remove the F filter now
- 10:27:31again there is some challenge here this
- 10:27:33value is not same as grand total I can
- 10:27:35understand there a top maybe some of the
- 10:27:37top 10 values and different now because
- 10:27:39previously the top five filter was there
- 10:27:41this is a sum of top 10 not the top 10
- 10:27:43and nor it is filtering it for that what
- 10:27:45I'm going to do I can keep values inside
- 10:27:48this one or key filters so let me show
- 10:27:50you both of them one by one let me use
- 10:27:52values item brand first way reduce it to
- 10:27:56top 10 and if I remove the net it will
- 10:27:58actually keep it top 10 only and that's
- 10:28:00the total for that if you don't want to
- 10:28:01use values you have an option which is
- 10:28:04if filters can take this filter argument
- 10:28:07and basically keep the filter and apply
- 10:28:09the values automatically in this case
- 10:28:11and this will to give me the same result
- 10:28:13so in a scenario when you have the
- 10:28:15filter and you want to have the values
- 10:28:16impact also you can use keep filters
- 10:28:18keep filters can work for you I got now
- 10:28:20top 10 net by using a major I can use
- 10:28:23top end and I can get whatever top I
- 10:28:25want but what happens in case I need
- 10:28:27this as a dynamic is that if I choose
- 10:28:30one give me one if I choose two give me
- 10:28:32two if I choose three give me three how
- 10:28:34can I create Dynamic top n for that what
- 10:28:38we have to do is we have to take help
- 10:28:40from the modeling Tab and in modeling
- 10:28:42tab we have new parameter now we have
- 10:28:44two kind of new parameters one of them
- 10:28:46is a numeric range and another one is
- 10:28:48field parameter now field parameter is
- 10:28:50we're going to discuss after some time
- 10:28:52numeric parameter was previously also
- 10:28:54known as what if parameter so numeric
- 10:28:56range I'm going to create it's going to
- 10:28:57create a new table for me using the
- 10:28:59generate series it's going to give me
- 10:29:01the number so I can create a series of
- 10:29:03numeric or field I can give it a name so
- 10:29:06name is top and number I want it to give
- 10:29:08minimum 0 Max 20 increment by one
- 10:29:12default is five I keep this as checked I
- 10:29:15want to add a slicer I don't want it to
- 10:29:17leave for later and the advantage of
- 10:29:19this one is basically is give me a
- 10:29:21slicer where I can enter one single
- 10:29:24select box so let me go ahead and create
- 10:29:26that now what is going to do is actually
- 10:29:28it's going to create a table for me
- 10:29:29using the generate Series has created a
- 10:29:32table using generate series and it gives
- 10:29:34me this parameters basically coming from
- 10:29:36them this is the column which is coming
- 10:29:38from that it also create by default a
- 10:29:40major for you which you can use in your
- 10:29:43calculations and this table is a
- 10:29:45disconnected table so whatever values we
- 10:29:47are have going to have we need to use
- 10:29:49that in our measure then only they going
- 10:29:51to have you can use that various places
- 10:29:53but what I'm going to do is without
- 10:29:54disturbing this slicer right now I'm
- 10:29:56going to place this value inside our
- 10:29:59measure in the top and in place of this
- 10:30:0110 now I'll use that top and major which
- 10:30:04is already been created for me the
- 10:30:06moment I do it you will see I only have
- 10:30:08the five values because the default
- 10:30:10value was five how did it get it so
- 10:30:12there is something known as whenever you
- 10:30:14wanted to get a value which is selected
- 10:30:16you use the functions selected value and
- 10:30:19the selected value is going to give you
- 10:30:20the selected value it doesn't get you
- 10:30:22can default it so selected value
- 10:30:24function have being used here which is
- 10:30:26returning us this value and definitely
- 10:30:28whenever we need we can use this
- 10:30:30function Al selected value functions
- 10:30:32give us the selected value in the slicer
- 10:30:34but it only gives one value if you have
- 10:30:35more than one value then we need a
- 10:30:38different operation usually we use
- 10:30:40values or something we can handle in
- 10:30:42multiple ways basically whatever is
- 10:30:43selected is only available whatever is
- 10:30:45not selected if you need you need to PR
- 10:30:47fix to get that data so now I will go
- 10:30:50ahead and change it to top let's say one
- 10:30:52I only got the top one value what I can
- 10:30:54do is basically I can remove net from my
- 10:30:56visualization I click here I'll bring in
- 10:30:59the build a visual and you take out net
- 10:31:02from here now I only got one value three
- 10:31:04top three top five top 10 in this manner
- 10:31:08my visual will now respond to the top
- 10:31:10end values Now understand one thing that
- 10:31:13there is one more thing which you should
- 10:31:14do now what happens like when we use the
- 10:31:16top end here it's do you filter and if
- 10:31:19you there are multiple measures all
- 10:31:20those measure will get filtered based on
- 10:31:22the top end of one particular C now
- 10:31:24let's say you need top end of gross but
- 10:31:27based on net or top end of margin
- 10:31:29percentage still based on net in that
- 10:31:32case you're not going to change the
- 10:31:33second part of it and the reason I'm
- 10:31:35telling you sometime what happens is I
- 10:31:37have the top I have the top 10 items of
- 10:31:39this year I want value of the prior ear
- 10:31:42based on that so there's a prior measor
- 10:31:44I have and I need the value for that so
- 10:31:47see my top top n is still calculating
- 10:31:49based on that but based on that top end
- 10:31:51I am bringing in margin percentage now
- 10:31:54margin percentage may or may not be the
- 10:31:56top 10 in this case let me rename this
- 10:31:59major margin percentage and bring this
- 10:32:02into my
- 10:32:03visualization and I would also like to
- 10:32:06bring in margin percent and I change the
- 10:32:09formatting percentage for margin top 10
- 10:32:12margin percentage now I would like to
- 10:32:14sort this visual on margin percentage
- 10:32:17this is not not the top 10 margin
- 10:32:19percentage the top 10 based on net
- 10:32:22whatever I'm going to use here is what
- 10:32:25going to decide my top it is not the
- 10:32:28major which is going to decide so in
- 10:32:29this manner I can get a major which is
- 10:32:32basically top and off some other major
- 10:32:34so this is topend function and dynamic
- 10:32:37top end for you so let's look at is
- 10:32:40filtered and has one value understand
- 10:32:42that let's create a new page and in this
- 10:32:44new page I would like to bring in brand
- 10:32:47and category and in both the visuals we
- 10:32:49will add few new majors and those Majors
- 10:32:51I'm going to create I'm not adding any
- 10:32:52other major because we want to
- 10:32:54understand those two new major how to
- 10:32:56understand that measure we also need a
- 10:32:57slicer and that slicer I'm going to
- 10:32:59create on brand I dragged the brand and
- 10:33:01I clicked on slicer which is coming from
- 10:33:03build my visual at this moment I can
- 10:33:05also take it from the insert of the Home
- 10:33:07tab do a little bit more adjustment here
- 10:33:10now let's first discuss is filtered so
- 10:33:12I'll create a new mejor using is
- 10:33:14filtered is filter me basically is it
- 10:33:15filtered or not in what condition is
- 10:33:17filtered work is filtered so is filtered
- 10:33:21item brand is item brand is filtered you
- 10:33:24simply wanted to check this condition is
- 10:33:26item brand filtered we got this measure
- 10:33:28is filtered let me bring it here it's
- 10:33:30giving true true true on all the rows
- 10:33:33and it's going to give false false false
- 10:33:35on all the rows of category so here it
- 10:33:36is giving all true right now there is no
- 10:33:39value coming from slicer it is still
- 10:33:41coming from for True when the brand is
- 10:33:43in the context is giving false when
- 10:33:45brand is not in the context so basic
- 10:33:47basically the filter is filtered is true
- 10:33:51when the brand is in the context or the
- 10:33:54brand is in the filter it is in the
- 10:33:55context that it is true but look the
- 10:33:57total is false it means it is not coming
- 10:34:00from Filter total will be dependent on
- 10:34:01filter so let me filter one brand the
- 10:34:03moment I filter a brand this is coming
- 10:34:05true this is coming because of context
- 10:34:08and this is because of filter all the
- 10:34:09values are coming here is coming true
- 10:34:11because of the filter context but
- 10:34:13sometime what would happen is if I don't
- 10:34:15have filter I don't want this filter I
- 10:34:16want to take a decision whether the
- 10:34:18brand has been filtered or not I want to
- 10:34:19display a value based on whether it is
- 10:34:21filtered or not and that filter is not
- 10:34:23the row filtering that filtering is the
- 10:34:25filtering which is happening on the
- 10:34:26filter so how do I ensure that I'm only
- 10:34:29considering is filtered is filter from
- 10:34:31the filter contexts of visual row is
- 10:34:33filter is filter from the filter not
- 10:34:36filter context of visual Row for that
- 10:34:38I'm going to tell you one solution what
- 10:34:39you have to do is you have to create a
- 10:34:41new measure and we going to call it it's
- 10:34:43filtered one and you can use calculate
- 10:34:46all selected don't use all about
- 10:34:47selected values and let's bring in this
- 10:34:50mejor is filtered one now you can see is
- 10:34:53filtered is false for row and it is not
- 10:34:55obing the context let's bring in another
- 10:34:57visual expected is false now let's
- 10:34:59filter any value it is filtering and now
- 10:35:01it is giving true and that is expected
- 10:35:03if even if I select multiple values it's
- 10:35:05going to be true so is filtered is able
- 10:35:07to tell us yes it is only coming true
- 10:35:10when something is getting filtered so
- 10:35:12the second function which we wanted to
- 10:35:13discuss is has one value right now what
- 10:35:15happened if you remember when I clicked
- 10:35:17more than one I'm getting through still
- 10:35:18but I don't want I only want let's say
- 10:35:20currency we only want to select one
- 10:35:22currency if one currency is selected or
- 10:35:24one country is selected then I will show
- 10:35:26the data in that particular currency so
- 10:35:28if let's say we are showing data of USA
- 10:35:31India together I have to show in one of
- 10:35:33the currency Global Currency so one of
- 10:35:35the currency I'll call Global Currency
- 10:35:36and when both India and USA are selected
- 10:35:38I'll show it in the Global Currency but
- 10:35:40when India is selected I'll want to show
- 10:35:41the local currency which is rupee when
- 10:35:43only USA is selected I want to show in
- 10:35:45USD let's say Global Currency we have
- 10:35:47decided Euro so when both are selected
- 10:35:49we are going to show them in Euro so in
- 10:35:50that case I also wanted to know that one
- 10:35:53value is selected so I want to know has
- 10:35:55one value so let me create a new major
- 10:35:58and check has one value so has one value
- 10:36:01first of all has one value item brand
- 10:36:05does item brand has one value first of
- 10:36:07all we wanted to check so it's running
- 10:36:10true so it means context is playing a
- 10:36:12role and the filter is also playing a
- 10:36:15role so the filter context because of
- 10:36:16that is coming false here it's true here
- 10:36:18now let me filter a brand and because of
- 10:36:21the interaction it's going to filter all
- 10:36:22the values are still true the grand
- 10:36:24total is false and most of these
- 10:36:26categories have more than one brand let
- 10:36:29me select one brand here everything here
- 10:36:30is true because one brand is
- 10:36:33selected let me select one more brand
- 10:36:36now look at the data here this is still
- 10:36:39coming true because the row only has one
- 10:36:42brand this is false now here category
- 10:36:44one has two brand so it's coming fine
- 10:36:46both brand belongs to this this is
- 10:36:47coming coming true because only one of
- 10:36:48the brand appears this is coming false
- 10:36:50because more than one brand are
- 10:36:51applicable here this is coming true
- 10:36:53because only one brand is applicable
- 10:36:55here what's happening depending on this
- 10:36:57number of values availability this is
- 10:36:59also behaving so one value or more than
- 10:37:01one value so now we will bring in the
- 10:37:03measure just like we have done in the
- 10:37:05case of is filtered using the has one
- 10:37:08value all selected so okay fine we'll
- 10:37:10take a decision based on has one value
- 10:37:13one and we'll use calculate comma all
- 10:37:16selected we'll say we only want the
- 10:37:19filter to be honored we don't want R to
- 10:37:21be honored and let's bring in this new
- 10:37:23measure
- 10:37:24also now what's happening here because
- 10:37:26two values are selected it's giving
- 10:37:28false
- 10:37:30everywhere so now as one value is
- 10:37:33behaving based on the total selection so
- 10:37:35total is one then it is true nothing
- 10:37:38false and more than one also false
- 10:37:40everywhere it is false so in this manner
- 10:37:43you will be able to take decisions based
- 10:37:45on is filtered and has one value what to
- 10:37:47use what not to use but remember one
- 10:37:50thing that use has one value and is
- 10:37:52filtered only if it is most necessary
- 10:37:55I've seen sometime people unnecessary
- 10:37:56check is filtered and has one value we
- 10:37:58don't have to add a condition when it is
- 10:38:00not needed it is going to unnecessary
- 10:38:02add a calculation to it so like in the
- 10:38:05row we know the things are in context we
- 10:38:06don't need to check is has one value I
- 10:38:09know the row is going to have a value so
- 10:38:10you don't need to check we only need to
- 10:38:12check when we want to change our
- 10:38:13calculation in case of grand total let's
- 10:38:15say the grand total we can use is filter
- 10:38:17sometime we can also use is in scope
- 10:38:19which we learn sometime later so is
- 10:38:21filtered has on value find out is it
- 10:38:24selected is it in the context in powerbi
- 10:38:26you will find us always talking about a
- 10:38:28date table and a calendar table why date
- 10:38:31table or a calendar table a table with A
- 10:38:33continuous dates is so important it is
- 10:38:35because all the powerbi time
- 10:38:37intelligence functions require
- 10:38:39continuous dates these functions include
- 10:38:41date add dates MTD dates qtd total MTD
- 10:38:44total YTD and many other functions which
- 10:38:47require continuous States and a calendar
- 10:38:50table or a day table can ensure
- 10:38:52continuous States we have also need to
- 10:38:54make sure that we mark them as a date
- 10:38:56table that will ensure that we have
- 10:38:59continuous dates to generate a calendar
- 10:39:02we are primarily going to use calendar
- 10:39:04Auto or calendar function as we move
- 10:39:06forward we will discuss the differences
- 10:39:08between the two to start creating the
- 10:39:10calendar let's first start with calendar
- 10:39:12Auto calendar Auto is a very versatile
- 10:39:14function it can automatically generate a
- 10:39:17calendar based on the dates available in
- 10:39:20your powerbi schema it also provides you
- 10:39:23a parameter using which you can set your
- 10:39:27financial calendar so let's understand
- 10:39:29calendar Auto in more details and to do
- 10:39:32that I'm going to use the table View and
- 10:39:35I'll click on the table View and go
- 10:39:36inside the table View and here what I'm
- 10:39:38going to do is I'll click on any of the
- 10:39:40tabl so that I have the table tool
- 10:39:42visible to me and inside the table tool
- 10:39:44I have option for new table calendar
- 10:39:46Auto is a DEX function which can give us
- 10:39:48a table now what I'm going to do is I'm
- 10:39:50going to click on the new table I'm
- 10:39:51going to give this name to this table is
- 10:39:53date
- 10:39:55Auto and I'll use calendar Auto for
- 10:39:58calendar Auto will take this one
- 10:39:59argument this calendar is going to
- 10:40:01return us so calendar Auto is going to
- 10:40:03return as a table table of continuous
- 10:40:06States so it was automatically taken the
- 10:40:07start date automatically taken the end
- 10:40:09date based on the your financial year or
- 10:40:11your calendar year and it's going to
- 10:40:13return the continuous dates and
- 10:40:15continuous dates are really important
- 10:40:16for
- 10:40:17for doing time intelligence because most
- 10:40:19of the time intelligence functions in
- 10:40:21powerbi requires continuous States and
- 10:40:23we will learn when we add the columns
- 10:40:25also like some of the function like
- 10:40:27start of year end of year which we will
- 10:40:29be used to create start date and end
- 10:40:30date would also require continuous date
- 10:40:32calendar aut of function you only needs
- 10:40:35one argument which is basically the
- 10:40:37physical month and date in case you want
- 10:40:40to give a physical month and date in my
- 10:40:42case I don't want to give because I want
- 10:40:43to create a standard calendar month so
- 10:40:45it's going to do that so and what also
- 10:40:48calendar Auto does it based on all the
- 10:40:50dates available in the model is going to
- 10:40:52find out the minimum date and take the
- 10:40:54start of the year now if you want
- 10:40:56Financial year let's say Financial year
- 10:40:58end is third month then it will start
- 10:40:59the calendar from April it is 12 month
- 10:41:02it will start January from January so
- 10:41:04based on that minimum date less than or
- 10:41:06equal to that date is going to find out
- 10:41:07the year start date similarly go to the
- 10:41:09max date and maximum across all the
- 10:41:11dates and goe find out using that date
- 10:41:14we'll find out either a date which is
- 10:41:16greater than or equal to that particular
- 10:41:19end date is the year end date now if
- 10:41:21it's is a physical year let's say you
- 10:41:22shoot March then 31st March is going to
- 10:41:25find out and first aprile is the start
- 10:41:27date based on which is going to be
- 10:41:29calculated now here we don't want to so
- 10:41:31we can simply say
- 10:41:32calendar so calendar Auto will give you
- 10:41:35all the dates and you can create a
- 10:41:37calendar using calendar AO now this is
- 10:41:38the first way let me sort a sending and
- 10:41:40show you what date I'm getting here this
- 10:41:42is the first date as you know my data is
- 10:41:44it from the October 2018 and I'm getting
- 10:41:47a calendar which is from 1st January
- 10:41:482018 my data lasts till 2020 so if I do
- 10:41:52sort descending you will see that it is
- 10:41:54going till 31st December 2020 let me do
- 10:41:56one thing because my data is starting in
- 10:41:57October let's say and ending in October
- 10:42:00again let's say if I want to start my
- 10:42:02calendar with October Financial year
- 10:42:05what what is my financial year and month
- 10:42:08which is nine so what happens when I
- 10:42:09start with nine you press enter
- 10:42:11definitely because my data has started
- 10:42:13after the October 2018 it's still
- 10:42:15starting from 10th 2018 but
- 10:42:18interestingly where does it is ending
- 10:42:20it's ending in 2021 because remember I
- 10:42:22do have data in October
- 10:42:252020 so when I have data in October 2020
- 10:42:28so that complete Financial year has to
- 10:42:29be taken so and that's why it has
- 10:42:31claimed till the end of this now post
- 10:42:33that if you want to create additional
- 10:42:35column you can create here or you can
- 10:42:37use a function which is known as add
- 10:42:39columns now we will create a date table
- 10:42:41or a calendar table using the calendar
- 10:42:43function now for that I will go to table
- 10:42:46View
- 10:42:47uh previously we created using calendar
- 10:42:49Auto unlike calendar Auto where you only
- 10:42:51need um the month and and it
- 10:42:53automatically identify date the calendar
- 10:42:56function cannot do it you have to supply
- 10:42:58the dates let me click on any of the
- 10:43:01table and I'll get a table tool and
- 10:43:03inside the table tool let me click on
- 10:43:06the new
- 10:43:09table I click on the new table I'll give
- 10:43:12this table name as a date
- 10:43:14table and then I can write down the
- 10:43:17function which is calendar now the
- 10:43:18calendar function requires two argument
- 10:43:20the first argument is a date and the
- 10:43:22second argument is also date start date
- 10:43:24to end date now it means we can start
- 10:43:25with any date we can end with any date
- 10:43:27it will not force us to go to the start
- 10:43:29of the year it will not force us to go
- 10:43:30to the end of the year but usually when
- 10:43:32we start when we create we'll take care
- 10:43:34of these things now sometime what
- 10:43:36happens is we can find out with the set
- 10:43:38of dates let's say there are few dates
- 10:43:40only which are available then with that
- 10:43:42set of dates we can also start so I'll
- 10:43:45give you example of that so calendar
- 10:43:46function takes these two argument but
- 10:43:48what does calendar function gives so
- 10:43:50calendar functions return returns as a
- 10:43:52table and that table is a sequence of
- 10:43:54dates and these dates are continuous
- 10:43:57dates the remember that we require
- 10:44:00continuous dates for most of the time
- 10:44:01intelligence function and that is why
- 10:44:03having a date and calendar table is also
- 10:44:05really important which provides us all
- 10:44:07the possible date between the set of
- 10:44:10dates or the continuous set of date
- 10:44:13which is comprising of all the dates
- 10:44:16from the minimum minimum date and the
- 10:44:17maximum date which is needed for our
- 10:44:20data it is really necessary to have
- 10:44:23include all the dates and have the
- 10:44:25continuous States now in the calendar
- 10:44:28table we don't include the time so in
- 10:44:30case you require time also sometime we
- 10:44:32create a separate
- 10:44:34timetable so calendar function taking
- 10:44:38two arguments and returning a table of
- 10:44:41continuous states which we would be
- 10:44:45needing to create create our date table
- 10:44:48having the continuous dates so let's
- 10:44:50start with the first date now to give a
- 10:44:54date I can use a date function now date
- 10:44:55function requires three argument first
- 10:44:57is year second is month and third is day
- 10:45:01three arguments which is required so I
- 10:45:02want to start from 2018 my data is
- 10:45:04starting from October but I'll start
- 10:45:06from 01 first month
- 10:45:1001 then this is my start date again I
- 10:45:13need another date for the end date so
- 10:45:15end date I can give again year month so
- 10:45:18my data is still 2020 October so I'll
- 10:45:20use 2020 12 and
- 10:45:231 so I did not edit one parenthesis at
- 10:45:28the end but Dex do take care if you are
- 10:45:30missing at the end it do end I can click
- 10:45:33on the submit or press enter now you can
- 10:45:36see I got a calendar I can use sort as
- 10:45:38sending to see what all dates I have and
- 10:45:40sort dat sending to see what end date I
- 10:45:42have start date and end date we are able
- 10:45:44to know now this the first very simple
- 10:45:48way when you can create sometime what
- 10:45:50happens you say no no I want to add end
- 10:45:52it where you want to end it let's say I
- 10:45:54want to add it today my calendar should
- 10:45:57go till today so we can use the function
- 10:45:59today so every time we refresh the today
- 10:46:01will change and it can end on today's
- 10:46:04date when I'm recording this is 1st
- 10:46:06January 2024 so it will end on 1st
- 10:46:09January 2024 it can end on any other
- 10:46:11date sometime you might want to end it
- 10:46:13on last date you can use this this one
- 10:46:18or last month's end date let's say this
- 10:46:19is this is something different then I
- 10:46:21want to add last month end date for that
- 10:46:24to get the end date of a month we have a
- 10:46:26very good function which is known as EO
- 10:46:27month EO month function doesn't require
- 10:46:30continuous date remember uh other
- 10:46:32function there is a end of month
- 10:46:33function which require continuous date
- 10:46:35but EO month function doesn't require it
- 10:46:36just require which months and date you
- 10:46:38need so today is the today's date and I
- 10:46:41need today is month end then I can use
- 10:46:42zero let me show you
- 10:46:44that so this is the current month ended
- 10:46:47but minus one gives me last month ended
- 10:46:49plus one gives me next month's ended so
- 10:46:52I can use these kind of stuff I may also
- 10:46:55like that you know like to start from
- 10:46:57the start month of the minimum
- 10:47:00date and assume right now for Simplicity
- 10:47:02I have only two dates which is the sales
- 10:47:06date in the sales table so I have one
- 10:47:07sales date where I can find out the
- 10:47:10minimum
- 10:47:11sales date I have delivery date maybe
- 10:47:15ideally speaking delivery date can
- 10:47:16cannot be less than the sales date but
- 10:47:18assume it could be then how do I take
- 10:47:19minimum of two so for that what you can
- 10:47:21do is minimum of minimum sales date and
- 10:47:25comma
- 10:47:26minimum delivery
- 10:47:32date okay so double minimum so minimum
- 10:47:37of sales first minimum of delivery and
- 10:47:39for both we can take minimum so minimum
- 10:47:41function this is another behavior of
- 10:47:43minimum function where it can take two
- 10:47:44arguments so typical Behavior was
- 10:47:47minimum function will take only one
- 10:47:49argument one column but here it can take
- 10:47:51Min of Min okay this will start from the
- 10:47:53minimum date probably from the middle of
- 10:47:55some month let's go ahead and check it
- 10:47:58out from here now what I can do this is
- 10:48:00two heavy formula so let me go go
- 10:48:02outside this one and see if I can create
- 10:48:05a variable go here I'll create a
- 10:48:09variable Vore minimum so this will give
- 10:48:12me minimum date which is 13th October
- 10:48:14and I can create another variable or
- 10:48:17I can come here and write down EO
- 10:48:20month now you will say for the start of
- 10:48:22month why you're using EO month I'll
- 10:48:23tell you EO there's no function like s
- 10:48:25so month or St month EO month is a
- 10:48:28function which which I have with me so
- 10:48:30if I give minimum and minus one is means
- 10:48:33it is going to give me last month's end
- 10:48:35date but the beautiful thing with the
- 10:48:37Dex date is if you do plus one simply
- 10:48:40you do the plus one it adds the days so
- 10:48:43plus any number is number of days you
- 10:48:45want to add so I got last months 10 a
- 10:48:47and I do plus one which is going to
- 10:48:48start from the current month you will
- 10:48:51see start from the 1st October 2018 in
- 10:48:53this manner so these are the various
- 10:48:55combinations basically which you can use
- 10:48:57to get this now I'll tell you one very
- 10:48:59quick combination now this is going to
- 10:49:02give you start of the year so minus one
- 10:49:05St month of the
- 10:49:09date so you
- 10:49:11subtract the month in the negative
- 10:49:15number so multiply your month for the
- 10:49:17date by minus one and do plus one you
- 10:49:20will always restart of the
- 10:49:22calendar basically what happens in the
- 10:49:2410th month if you do minus 10 so Min -
- 10:49:26one is 9 and Min - 10 would be last year
- 10:49:29December and then you had plus one means
- 10:49:31you this year January in this manner
- 10:49:34depending on the requirements we can
- 10:49:36create different different dates okay
- 10:49:40now we need to go ahead and add new
- 10:49:43columns to this calendar or date table
- 10:49:47and then we also need to join it with
- 10:49:49our T table so what I'm going to do
- 10:49:51first is we are going to add the
- 10:49:53calendar months date and then we are
- 10:49:55going to add some Financial months so
- 10:49:57first we are going to add calendar
- 10:49:59months like uh start of year end of year
- 10:50:01start of month end of month start of
- 10:50:03quarter end of quarter all those and
- 10:50:06then we will go and do the same thing
- 10:50:08for financial Financial we limit ourself
- 10:50:11to financial year and financial quarter
- 10:50:14ET we would like to announce our
- 10:50:16calendar table or the date table and the
- 10:50:20first set of columns which we want to
- 10:50:23add is basically the month name the
- 10:50:26quarter number the year these are the
- 10:50:29columns which want
- 10:50:30to now to start with that I would like
- 10:50:33to add the columns so one of the ways to
- 10:50:36add a column is that what we have
- 10:50:37learned so far is click on the table or
- 10:50:40the
- 10:50:41column and then you use this new column
- 10:50:45from the column tools of the table tools
- 10:50:48but that's not extendable because deck
- 10:50:50scripts are not the script which you can
- 10:50:53you know find out and take if you create
- 10:50:55columns if I need to take this table to
- 10:50:57the another file I actually need to
- 10:51:00create those columns again or to
- 10:51:02overcome this we can use something known
- 10:51:04as add columns function now first of all
- 10:51:07all we need to understand what this add
- 10:51:09column function is ADD column functions
- 10:51:12allows you to add the column to existing
- 10:51:14table which takes the first argument as
- 10:51:16a table then you can give name and the
- 10:51:19expression expression is the expression
- 10:51:22which you want to generate your column
- 10:51:24it could be a calculation it could be a
- 10:51:25static value whatever you want it could
- 10:51:28table and the name and the expression
- 10:51:31another thing which you should remember
- 10:51:32this expression if it is using some
- 10:51:35column it is limited by the table which
- 10:51:38you have provided in this case in the
- 10:51:41add columns I'm going to provide the
- 10:51:42calendar and calendar is returning me
- 10:51:45only one column date
- 10:51:47it means all my calculations would be
- 10:51:50dependent on date any column which I'm
- 10:51:53adding new column which I'm adding to
- 10:51:55this table let's say I say column let's
- 10:51:58say month year I added a month year
- 10:52:00column that column cannot participate in
- 10:52:03the next column calculation only the
- 10:52:05tables column it means I created column
- 10:52:07one and now in the column two column one
- 10:52:10can participate that cannot happen when
- 10:52:12we are writing down add column script so
- 10:52:15let's begin this Journey so add columns
- 10:52:17the first argument of add column is a
- 10:52:19table and then we are giving a table and
- 10:52:22then we going to add new columns and
- 10:52:24this is also finally going to return as
- 10:52:27a table add columns return as a enhanced
- 10:52:30table which will contain more
- 10:52:33columns so and to get additional rows
- 10:52:36I'll press shift
- 10:52:38enter or Alt Enter now I may have to
- 10:52:42make it little bit smaller here so that
- 10:52:44I can show you more columns or we will
- 10:52:46use scrolling so one pixel
- 10:52:49smaller now First Column which I would
- 10:52:51like to add here is ear which ear I
- 10:52:54belongs to very simple I have a year
- 10:52:57function which can give me year of the
- 10:52:58date and basically because I'm talking
- 10:53:02about calendar here so it's easy for me
- 10:53:04only column which I have here is date I
- 10:53:06cannot give a table name here I need to
- 10:53:09use date so I got my year then I want a
- 10:53:14next column so then I need to give a
- 10:53:15comma at the the end of this or what we
- 10:53:18can do is here is sometime this is
- 10:53:20little bit better let me remove this
- 10:53:22colum comma also we give the comma at
- 10:53:25the start of the line easy to comment
- 10:53:27such
- 10:53:28lines month number how do I get the
- 10:53:30month
- 10:53:32number so we have a
- 10:53:34function month which will give us we
- 10:53:39take only one argument date so I got
- 10:53:42year I got month quarter I need quarter
- 10:53:46quarter number basically this you
- 10:53:48instead of month you can call it as a
- 10:53:49month
- 10:53:50number maybe we want to use month is Mon
- 10:53:53and quarter
- 10:53:55number so how do I get quarter number we
- 10:53:57have function quarter and we'll give a
- 10:53:59date only one argument it is requires
- 10:54:02only one argument date it gives us
- 10:54:05quarter
- 10:54:06number and before we go forward let's
- 10:54:10close this add columns by giving a
- 10:54:13parenthesis at the end so
- 10:54:18able
- 10:54:20name
- 10:54:21expression name expression
- 10:54:26name expression finally close
- 10:54:31parenthesis this is going to give us a
- 10:54:33new table with the inas
- 10:54:35number we got year number month number
- 10:54:38quarter number here we simply calling it
- 10:54:42C I need let's say month name and month
- 10:54:46here we create that so I pr press my
- 10:54:51cursor shift enter shift enter shift
- 10:54:54enter now only challenge with this is
- 10:54:56that this will keep on moving down so we
- 10:54:58will have lesser things to see but we'll
- 10:55:01do so First Column double quotes I want
- 10:55:04to give the name name is
- 10:55:07month and here I want it in the one like
- 10:55:11Jan Fab March for that first time I'm
- 10:55:14using a function which is known as
- 10:55:15format
- 10:55:17a format functions take can take three
- 10:55:20argument value the value could be number
- 10:55:23value could be date format which we can
- 10:55:25give in Double C the format There are
- 10:55:27rules for giving this format what means
- 10:55:30what in case of number in case of date
- 10:55:33that you can find out on the
- 10:55:34documentation local name sometime we use
- 10:55:37like uh is
- 10:55:38it us or it is Great Britain English or
- 10:55:42something like that that can also decide
- 10:55:44what format you want especially useful
- 10:55:46in case of date now we go to format and
- 10:55:50first argument is the value and here my
- 10:55:52first argument is
- 10:55:54date now you can go ahead and now this
- 10:55:59give the format and the format which I
- 10:56:00want to give is M mm 3 m means month
- 10:56:04name like Jan Fab March and 4 m means
- 10:56:07complete January February March close
- 10:56:10press enter and you get here January
- 10:56:13February March you can see below
- 10:56:20now if I give 4 M we will give January
- 10:56:23February
- 10:56:25March now this is a text column and
- 10:56:28power ba we have a problem the text
- 10:56:30column cannot sort by its name by I can
- 10:56:34simply call it some month column will
- 10:56:36sort automatically we will discuss the
- 10:56:38solution for that problem little bit
- 10:56:40later but before I solve that problem I
- 10:56:43want to come to the next one double I'll
- 10:56:46give double quotes double
- 10:56:48quotes and here I'll give month
- 10:56:54here now month year I want the column
- 10:56:57month
- 10:56:59year what is the calculation I again
- 10:57:01want to use format
- 10:57:03function and
- 10:57:07date I would like to give here the
- 10:57:09format as M mm hyph y y y y 4 y
- 10:57:17month Jan Fab March April May three
- 10:57:20digit and 4 y means year four year and I
- 10:57:24press enter Because my last parentheses
- 10:57:27already there now it gives me January
- 10:57:29February March I got my month month year
- 10:57:33also now this is my calendar and the
- 10:57:39next column which I need basically is
- 10:57:40the quarter 2 TR quarter we already have
- 10:57:44a quarter number so I'm simply calling
- 10:57:46it as quarter and this time what I'm
- 10:57:48going to do is the format which I need
- 10:57:51so here what I'm going to do format
- 10:57:53function and the first argument is date
- 10:57:58in the second argument I would actually
- 10:58:01like my names to be y y y I want Q to be
- 10:58:06written but if I give Q it will give me
- 10:58:08quarter number I'll tell you if I simply
- 10:58:10give Q
- 10:58:12here it give me quarter number so how do
- 10:58:15I get a q so I can use back SL Q means
- 10:58:20ignore if I want hyphen in between let
- 10:58:22me use hyphen and see hyph is not a
- 10:58:26letter which format is going to identify
- 10:58:28so it's leave as it is to identify Q so
- 10:58:31I use back SL Q to ignore the Q and
- 10:58:34treat it as a normal letter q and next
- 10:58:37second Q I leave it as is so for every Q
- 10:58:40you let's say you want to write quarter
- 10:58:42then let's say T and R doesn't have a
- 10:58:44meaning then you can give and if the T
- 10:58:47and R has a meaning then you have to
- 10:58:48give with every letter like
- 10:58:52this but q and R doesn't have meaning so
- 10:58:54I can leave it as
- 10:58:56is now the format why have knowingly
- 10:58:59taken this format this format is a
- 10:59:01sortable
- 10:59:02format the previous mon format is not
- 10:59:05sortable what do you mean by sortable
- 10:59:06format if I give y y y y and then give
- 10:59:09quarter number every time I put it
- 10:59:11automatically get sorted even if it is a
- 10:59:13text now let's go to the visual level
- 10:59:17and understand that so let me add a new
- 10:59:19page and in this
- 10:59:22page let me now create a table using
- 10:59:26month here simply drag month here and it
- 10:59:28will create a table let me drag quarter
- 10:59:32here and as you can see the quarter here
- 10:59:35which is only called quarter it seems
- 10:59:37like an sorted position q1 Q2 Q Q4 q1 Q2
- 10:59:42but monthier is not how do I sort month
- 10:59:45here mon is not in a sortable format in
- 10:59:49power ba we don't have a way to tell
- 10:59:53system that this is month here and sort
- 10:59:54it like date no we need something known
- 10:59:57as sort column so I'm going to create a
- 10:59:59new column here which I'll call as month
- 11:00:03year
- 11:00:05sort how can we get sort the one way is
- 11:00:08I create y y y mm using the format which
- 11:00:11is a sortable format so y y y 4 Y and mm
- 11:00:15is always a sort table format for month
- 11:00:17year or I'll tell you one more way which
- 11:00:20I want it numerical so I say Year I'll
- 11:00:23use I'll use function year year
- 11:00:27date multiply it by 100
- 11:00:31plus month
- 11:00:33of date what does that will do
- 11:00:37if this itself is a sortable whenever
- 11:00:40you put it will got SED but how will
- 11:00:44this month here sort will sort month
- 11:00:47year so for that what you have to do is
- 11:00:49me make it a little bit smaller click on
- 11:00:51month year column either here in the
- 11:00:56table view or here in the data
- 11:00:59view click on that column you will get
- 11:01:02the column tools and the column tools
- 11:01:03should show your column which you want
- 11:01:05to sort go to sort by column in the
- 11:01:09middle click down and choose the column
- 11:01:13on which you want to sort this column
- 11:01:16you are going to choose the column which
- 11:01:18you are going to choose is going to sort
- 11:01:20your column now so monthe sort follow
- 11:01:22the Sorting of monthier sort so monthier
- 11:01:25sort is a column which can sort my
- 11:01:28column
- 11:01:30correctly it is done now if I go back to
- 11:01:33the
- 11:01:34visualization you will see that the
- 11:01:37columns are sorted
- 11:01:40correctly now we would like also like to
- 11:01:43have one more column which is year week
- 11:01:46and week of the year and then again
- 11:01:49we'll add year week or we can only call
- 11:01:53it week number but I would like here to
- 11:01:57be ear week for that what I'm going to
- 11:01:59use is ear
- 11:02:01function on the
- 11:02:03date again multiplied by
- 11:02:07100 plus there is a function week number
- 11:02:11date requir second argument also in the
- 11:02:15week number the second argument can be
- 11:02:17one means starting from Sunday it can be
- 11:02:20two means starting from Monday again we
- 11:02:22have argument from 11 to 17 from Monday
- 11:02:26Tuesday Wednesday and so on 17 means
- 11:02:29starting from Sunday and 21 is for ISO
- 11:02:33so these are some of the arguments which
- 11:02:36you can give the similar kind of
- 11:02:37arguments also available for week day
- 11:02:41and some of them might not be in
- 11:02:44documented format means you will not be
- 11:02:46able to see that these arguments are
- 11:02:47available but you will be able to use
- 11:02:50and when we will do Week start date and
- 11:02:52week end date we will let you know right
- 11:02:55now I'll keep it two so that I'll have a
- 11:02:58Monday Week
- 11:03:00start let me add week days here how do I
- 11:03:04add weekday here and then we will
- 11:03:07discuss whether our week number is
- 11:03:09correct or not so how do we add weekday
- 11:03:11there's a function known as week day but
- 11:03:14it's going to give me numeric
- 11:03:16here I don't need 1 2 3 4 5 I actually
- 11:03:18need the names again week day have an
- 11:03:21argument like uh 1 and two so I'll use
- 11:03:26format on the
- 11:03:28date and if you give date three times it
- 11:03:32is m o and Monday Tuesday in the short
- 11:03:35form four it is going to give complete
- 11:03:38so I'm going to use 3 days now DDD in
- 11:03:41the format function to get weekday name
- 11:03:44and the reason why I r that let me let
- 11:03:47you know that the first week this
- 11:03:50calendar itself start on a Monday so
- 11:03:52starting on a Monday and if the first
- 11:03:55week goes till Sunday it means this is
- 11:04:00Monday Sunday week and this is week
- 11:04:05number
- 11:04:06one then we have week number two again
- 11:04:09from Monday to Sunday so week number is
- 11:04:14using Monday to Sunday week and weekday
- 11:04:18is verifying that well very first level
- 11:04:21of our calendar is ready let us start
- 11:04:24adding the new column like start of
- 11:04:27month end of month start of quarter end
- 11:04:29of quarter start of year end of year now
- 11:04:32all these will depend on whether your
- 11:04:34year is a financial year or calendar
- 11:04:35year first We'll add for calendar year
- 11:04:37and then we'll try to create our own
- 11:04:40Logic for the financial year we have few
- 11:04:42functions which can do this for us but
- 11:04:44they have a limitation how to understand
- 11:04:46that limitation what I'm going to do is
- 11:04:47I'm going to change this calendar
- 11:04:49statement a little bit so let me command
- 11:04:51this particular line and put it again
- 11:04:53now in I will not use EO month here and
- 11:04:56I'll tell you why I'm doing so I'll use
- 11:04:58minimum and then I'll it till today so
- 11:05:01let me commit this change and you will
- 11:05:03see my calendar is now starting on
- 11:05:05October 13th let me check where it is
- 11:05:07ending it should end on ending on 1st
- 11:05:09January 2024 now let's try to use the
- 11:05:12start of the month function now start of
- 11:05:14the month function will not work in the
- 11:05:16add columns start of month basically I
- 11:05:19need a date on which this month has
- 11:05:20started and I'll give date it is not
- 11:05:23taking it so parameters is not correct
- 11:05:25type so it basically need table name
- 11:05:27column name we say okay fine it's not
- 11:05:29working here that let me go ahead and
- 11:05:31directly add it as of now the quickest
- 11:05:33way is to directly go and write down a
- 11:05:35new column and the new column will be
- 11:05:38month start start of month function so
- 11:05:41we as you can see we have start of month
- 11:05:42start of quarter start of year start of
- 11:05:44month I'm using it require only one
- 11:05:46column The Continuous dates and I'll
- 11:05:48give the eight date table and let me
- 11:05:50press enter now ignore the first one if
- 11:05:53I go to the November month it is showing
- 11:05:55me the correct start date if I go down
- 11:05:57any date after the October month it is
- 11:05:59showing me correct dates if I go here
- 11:06:01also you will see that it is showing me
- 11:06:03the correct start dates of every month
- 11:06:05except the first month why is it that
- 11:06:07behavior so the reason behind this one
- 11:06:10is that card of month require continuous
- 11:06:13stes and it cannot go beyond the
- 11:06:16boundaries of the date which is
- 11:06:18contained in the column which has been
- 11:06:19supplied so what happens if the month
- 11:06:21start date is not available it will take
- 11:06:23the minimum date available in that table
- 11:06:25so because of that the start of the
- 11:06:27month is happening at the 13th of
- 11:06:29October same way when I take start of
- 11:06:31quarter now start of quarter again has
- 11:06:33the same problem for the first quarter
- 11:06:35instead of from first October which is
- 11:06:37the quarter start it will start from
- 11:06:39October 13 again because it doesn't find
- 11:06:41the 1 October minimum date whatever it
- 11:06:43find before that it's taking that if I
- 11:06:46use start of year you will see the same
- 11:06:48issue again no 1 January it's October
- 11:06:5013th which is the minimum date available
- 11:06:53continuous
- 11:07:07state from month start to month end and
- 11:07:10let me use the function end of end of
- 11:07:14month what happens now very happy first
- 11:07:16month is coming correct but let's go to
- 11:07:17the last value January doesn't end on
- 11:07:19first isn't it doesn't end on first it
- 11:07:22ends on 31st January not able to find
- 11:07:24because there's no date which is
- 11:07:25available after that so it's going to
- 11:07:27end there okay what happens to the end
- 11:07:30of
- 11:07:31quarter you will see the same issue with
- 11:07:33the end of quarter the last date what I
- 11:07:35can do is s descending it will come on
- 11:07:38the top as you can see the month is
- 11:07:40ending on the last year same way for the
- 11:07:42year if you try again the year will also
- 11:07:45end on the 1st January so it cannot go
- 11:07:47beyond the date it has to stop there and
- 11:07:50because of this reason we are unable to
- 11:07:52use start of month end of month if we
- 11:07:55are not using a standard calendar
- 11:07:57specifically if the calendars are not
- 11:08:00starting and ending on the standard
- 11:08:02month start date and month end date then
- 11:08:04we cannot use it if your calendar is
- 11:08:06starting on standard month start date
- 11:08:08and ending on standard month ended you
- 11:08:10can use these functions without any
- 11:08:13doubt but I need to tell you the
- 11:08:15Alternatives what I'm going to do is I'm
- 11:08:17going to delete these things and I'll
- 11:08:18tell you how to create it without using
- 11:08:21these functions now you learned these
- 11:08:23functions only one argument these
- 11:08:25function required other than the end of
- 11:08:26year and end of quarter end of year and
- 11:08:29end of quarter start of year year
- 11:08:31function and end of year function can
- 11:08:32take another argument which is basically
- 11:08:35year anded which can also be supplied to
- 11:08:37get the financial again the limitation
- 11:08:39is if you want to create the financial
- 11:08:41year the calendar should start from the
- 11:08:42financial month start date and should
- 11:08:44end on the Financial month end date
- 11:08:46otherwise the end dates would not be
- 11:08:48correct so what is the alternate so I'll
- 11:08:50tell you here so let me create start of
- 11:08:53month and new column in the add column
- 11:08:55I'll continue to add the column in this
- 11:08:57add column and the what is the date I
- 11:09:00want want start of the month and we'll
- 11:09:01use function e month now e month gives
- 11:09:03end of month and for the row in the date
- 11:09:06if I give zero it will give current
- 11:09:07abundant date so what we do is we go to
- 11:09:09last month end date which is minus one
- 11:09:11means last month end date plus one so
- 11:09:13two argument it takes EO month first
- 11:09:15argument is date second argument is
- 11:09:18which month and date so minus one means
- 11:09:19last month and date and then I'm doing
- 11:09:21plus one in Dex you can simply add
- 11:09:24numbers to a date to travel number of
- 11:09:27days you want then we press enter and
- 11:09:29now we got the start of the month and as
- 11:09:31you can see this is correct but let's go
- 11:09:34start ascending and you can see though
- 11:09:36the calendar has not started on the
- 11:09:38first date there still getting the
- 11:09:39correct start of the month now end of
- 11:09:41the month is simple we know that this
- 11:09:43there is a function which actually
- 11:09:45actually is for there for end of the
- 11:09:46month let me write down that one end of
- 11:09:49month EO month which months and date I
- 11:09:52need I need the current month end dat it
- 11:09:54is very simple for us just give a zero
- 11:09:56enter and we got the end dat now we have
- 11:09:58to check it for the largest statee we
- 11:10:00have S this ending and if as you can see
- 11:10:02here it gives us the correct month and
- 11:10:05date though the month and date is not
- 11:10:06present in the calendar or the date
- 11:10:09table or the dates which are available
- 11:10:11in the table which is we are using here
- 11:10:14the date column itself doesn't contain
- 11:10:16the dates which we require before I'll
- 11:10:17go to the quarter because quarter
- 11:10:19require a little bit of logic I'll show
- 11:10:21you how easily we can achieve the start
- 11:10:23of year and end of year now start of
- 11:10:25year I'm showing you the calendar later
- 11:10:27on we'll come and develop the logic
- 11:10:29shift enter shift enter start of year
- 11:10:31how do we start the year now we will use
- 11:10:33the same function this one only Now
- 11:10:35understand when I subtracted one month
- 11:10:37from October when where did you went
- 11:10:38September If I subtract two then August
- 11:10:41what happens so if I subtract one you
- 11:10:43are 1 month less so if I subract nine
- 11:10:45where would you reach you would reach
- 11:10:47January but if I subtract 10 where would
- 11:10:49you reach you will reach December so if
- 11:10:51I subtract 10 then you will reach end of
- 11:10:53the month December and then plus month
- 11:10:55will give you January so how do I know
- 11:10:57the month of the date so I can use month
- 11:10:59function and there I can give date as an
- 11:11:01argument so what I'm saying here is
- 11:11:04basically from the date you have to go
- 11:11:06minus one star number of months which
- 11:11:08you had so you will reach 10 months
- 11:11:10behind in this case for October minus
- 11:11:12one is September minus 2 is August and
- 11:11:14same way you will reach - 10 means last
- 11:11:16December and plus one means you will
- 11:11:18reach the start of the year and as you
- 11:11:20can see we are getting the correct start
- 11:11:22of the Year date here and let's sort
- 11:11:24ascending and check it out we are also
- 11:11:26getting it so start date is correct now
- 11:11:28end date how do I reach end it now how
- 11:11:30do I identify how many months I need to
- 11:11:32add because months are changing January
- 11:11:34is different February is no to reach 12
- 11:11:37we need to reach 12 month isn't it what
- 11:11:39would happen when we give zero October
- 11:11:40when we give two what will be happen
- 11:11:42November when we'll give two it would be
- 11:11:44December December is 12 what is the
- 11:11:46current month 10 12 - 10 is 2 we need to
- 11:11:49reach 2 months if we are in September if
- 11:11:52you give zero September 1 October 2
- 11:11:54November 3 December 12 - 9 is 3 it means
- 11:11:58if we subtract the month from the 12 we
- 11:12:00will exactly get how many number of
- 11:12:03month we should go ahead so what we are
- 11:12:05going to do here is we copy paste this
- 11:12:06one we don't need to add the plus one
- 11:12:09now simply go ahead and say end of year
- 11:12:11EO month 12 minus the number of months
- 11:12:14which is is already passed me that
- 11:12:16include the current one and we should
- 11:12:18get end of year date so start of year we
- 11:12:21got using the month number end of year
- 11:12:23we are also getting using the month
- 11:12:25number enter and let's look at the date
- 11:12:27perfect end of year date 2018 thought
- 11:12:30descending check what we are getting for
- 11:12:32the 1 of January 2024 31st of December
- 11:12:352024 we are able to get it now we comes
- 11:12:38to the logic of quarter quarter is not
- 11:12:41very simple because what happens is we
- 11:12:43have these quarter which are ending
- 11:12:44every 3 months we are right now
- 11:12:46preparing for the calendar it's easy for
- 11:12:48us because they are we can use division
- 11:12:51by three as a criteria actually even if
- 11:12:54the month start from a common date and
- 11:12:56the quarters then there are couple of
- 11:12:58ways one way is
- 11:13:19for January what we can do month is one
- 11:13:22so I subtract - 1 month from E month
- 11:13:25I'll read December and then I can add
- 11:13:27plus one to get the 1 January similarly
- 11:13:30for February u monthus 2 31st December
- 11:13:33Plus 1 day we'll reach January for March
- 11:13:35minus 3 and plus one day we will reach 1
- 11:13:40January but for April the formula little
- 11:13:42bit need to change because now I need to
- 11:13:44only say Min - one then -2 then minus 3
- 11:13:47they say okay fine what we can do is we
- 11:13:49can find out their remainder by dividing
- 11:13:51by three but the challenge with the
- 11:13:53remainder is when we take it from
- 11:13:55January it is fine one means one
- 11:13:57remainder is one for February remainder
- 11:13:59is two for March remainder is not three
- 11:14:01the remainder is zero so we say fine we
- 11:14:04can adjust it so we use start of qtr and
- 11:14:07you might have to actually think about
- 11:14:09this logic little bit I have done quite
- 11:14:12a few video and few people uh do get
- 11:14:14this mathem ma matical equation how I'm
- 11:14:16changing it so just pay attention you
- 11:14:18might have to rebuild your own Logic on
- 11:14:20that first is very simple if mod mod is
- 11:14:24a function which gives me remainder so
- 11:14:26it takes a number Division and gives the
- 11:14:28remainder so we are learning a
- 11:14:30mathematical function mod here mod
- 11:14:32functions give us the remainder what is
- 11:14:34the number we need for which we we need
- 11:14:36the month number so month of date and I
- 11:14:39could have used this inside a variable
- 11:14:41so let me do one thing where underscore
- 11:14:44r equals and I'll tell you when you
- 11:14:47inside the add function when you use
- 11:14:50variable how to use that now if the mod
- 11:14:52of the month from 3 equals to 0er then
- 11:14:55three if it is becoming zero it means if
- 11:14:58it is third month the mod is coming zero
- 11:15:00it means it is three otherwise it should
- 11:15:02be same as mod or it could be same as
- 11:15:04the it should be same as mod because for
- 11:15:05four you can't say no no it is a month
- 11:15:08number no in case of four I need one and
- 11:15:10if you want to avoid this calculation
- 11:15:12twice you could have created a variable
- 11:15:14on this first and then used it so now I
- 11:15:16got my calculation this is this is what
- 11:15:18is going to give me 1 2 and 0 1 2 and 0
- 11:15:211 2 and 0 and then what it will convert
- 11:15:23it the if statement will convert it into
- 11:15:2512 1231 123 shift enter tab tab just and
- 11:15:29I'm pressing tab so that you know you're
- 11:15:31able to understand the code the code is
- 11:15:33aligned better now I'll so when you use
- 11:15:35variable you need to write down written
- 11:15:36statement and in this case also you can
- 11:15:38do this but and I'm going to write down
- 11:15:40in the same line so now it is very
- 11:15:42simple for us EO month of the date Min
- 11:15:44-1 star this remainder what we got
- 11:15:47underscore remainder and then add the +
- 11:15:50one add the plus one to date now let's
- 11:15:52look are we getting the correct one this
- 11:15:54is start of quarter for descending let's
- 11:15:57s it ascending let's sort it ascending
- 11:15:59October after that we got January and
- 11:16:01this is what we are getting on the 1
- 11:16:03January seems correct let's look at
- 11:16:05April and then we can go and simply
- 11:16:07check the start dates this is quarter
- 11:16:09number so don't go by this look at here
- 11:16:111 January so this is 1 April that's fine
- 11:16:13and we can look at all the quarter start
- 11:16:15dates all quarter start date seems
- 11:16:16correct quarter end dat now if I so what
- 11:16:19happens for January I need to go 2
- 11:16:21months ahead February I need to go 1
- 11:16:23month ahead and March I don't need to go
- 11:16:25so there
- 11:16:43are so what we will in this Cas is we
- 11:16:45will say let's write down the formula
- 11:16:47for this one I erased it EO month date 3
- 11:16:51minus the remainder and we will reach
- 11:16:53the end of month so we don't need
- 11:16:55anything for that let's Commit This and
- 11:16:58let me go down you can see this is
- 11:17:00ending on 31st December end of quarter
- 11:17:03let's scroll a little bit down and then
- 11:17:06this one you can see a change of date
- 11:17:08here on this line in the January let's
- 11:17:10look at all the quarter end dates seems
- 11:17:12correct and not dependent on the dates
- 11:17:14which which are available on the
- 11:17:15calendar so now we are able to get the
- 11:17:18month start date year start date quarter
- 11:17:20start date month end date year end date
- 11:17:22quarter end next most important thing is
- 11:17:24Week start date week end date so now we
- 11:17:26would like to add the column start of
- 11:17:29week and end of week I'm going to do is
- 11:17:32while we can add in this table but this
- 11:17:34table has too many columns one of the
- 11:17:35ways that I remove some of the columns
- 11:17:38or I add at the start but what I'm going
- 11:17:40to do is I'm going to add those column
- 11:17:41in date Auto where we only have couple
- 11:17:43of columns and and now because it's a
- 11:17:46script we can come back and add the
- 11:17:48columns into the date table we're going
- 11:17:50to do at the end so start of week end of
- 11:17:53week no standard function we have to
- 11:17:55create it now the logic the way we have
- 11:17:57to drive it let's say Monday is your
- 11:18:00start of week so Monday means you to go
- 11:18:02zero behind Tuesday means you to go one
- 11:18:03day behind Wednesday means you to go 2
- 11:18:05days behind Thursday means 3 days behind
- 11:18:07Min subtract simple number subtraction
- 11:18:09will there is a function weekday
- 11:18:11function also which can give us for
- 11:18:12Monday 1 Tuesday 2 so every week which
- 11:18:15you want to start first of all you need
- 11:18:16to have a week day for that kind kind of
- 11:18:18start so if I want a Monday start or if
- 11:18:20I want a Sunday start what I'm going to
- 11:18:22do is there is are arguments which can
- 11:18:24help you and these are other than one
- 11:18:25and two and let's try those out today so
- 11:18:28to start with let me first of all start
- 11:18:31by add column and I would like to add
- 11:18:33here a weekday okay so and not weekday
- 11:18:36number I would like to add a weekday
- 11:18:38name here weekday name how do we add
- 11:18:40weekday name we have learned just few
- 11:18:42minutes before is that we can use for
- 11:18:44format function for that format date
- 11:18:47again calendar Auto also gives us a date
- 11:18:50let's use DD d d four times give us the
- 11:18:52complete one Alt Enter Alt Enter so we
- 11:18:55got Monday Tuesday and S ascending is
- 11:18:57the date so this start so any Monday
- 11:18:59week cover the first week as a full one
- 11:19:01now let's play around with one argument
- 11:19:03here where I want to have a new column
- 11:19:05which is nothing but week day as a
- 11:19:07number and week day is a number week day
- 11:19:10date first argument column return return
- 11:19:12type 1 2 3 try 11 though it's showing an
- 11:19:16error but as you can see here it is
- 11:19:19giving 1 2 3 4 5 6 7 1 2 3 4 5 6 7 so
- 11:19:23Monday is day one let's try the argument
- 11:19:2512 so in case of 12 Tuesday is 1 and
- 11:19:29then
- 11:19:42mon other than that we have 1 and two
- 11:19:44also as an argument one means Sunday and
- 11:19:47two means Monday and one means Sunday
- 11:19:49start so I'll tell you the formula and
- 11:19:51you can use those argument as you
- 11:19:53require so let's say I need I actually
- 11:19:55need the Monday so I can use 2 or 11 so
- 11:19:58date it's a very simple formula date
- 11:20:00minus weekday we'll reach a day before
- 11:20:02not reach Monday we'll reach Sunday
- 11:20:04because on Monday I'll subract one day
- 11:20:06I'll reach Sunday in Tuesday I'll
- 11:20:07subract two days I'll reach a Sunday so
- 11:20:09we'll say okay after that just add plus
- 11:20:11one so this is nothing but Week start
- 11:20:14dat what we got here is Monday as Week
- 11:20:17start date then again the next Monday is
- 11:20:19again the week start date and you can
- 11:20:20check what is the date on the Monday now
- 11:20:22if you need Tuesday is the week start
- 11:20:23dat what you need to do no change in the
- 11:20:25formula only Chang in this parameter
- 11:20:28just do that commit come out Week start
- 11:20:30date becomes the Tuesday start date same
- 11:20:33way you can work for Wednesday this is
- 11:20:35Tuesday this is next Tuesday this is the
- 11:20:38entire week so get it we'll keep it
- 11:20:40Monday you can keep it 2 or 11: what is
- 11:20:43week and date week and date is six day
- 11:20:45ahead of the Week start date I want to
- 11:20:47add six more so I can simply go ahead
- 11:20:49and add plus seven here and sometime
- 11:20:52what we is 7 + 7 minus week day both are
- 11:20:55going to give you same result so either
- 11:20:57you do plus 7 here or you do plus 7 here
- 11:21:00both in same and we cannot have to
- 11:21:02column name with the week start date you
- 11:21:04need to week end date press enter and
- 11:21:06you get the end date now the start date
- 11:21:09and that's your end date you're ending
- 11:21:10on 7th which is a Sunday then you ending
- 11:21:13another on Sunday this is this so now
- 11:21:15any calculation you know 11 12 13 14 15
- 11:21:1816 17 are what we are looking at so now
- 11:21:21you understood the calculation I can
- 11:21:23copy this and this is why I prefer this
- 11:21:25manner I can go to the date table just
- 11:21:27shift enter or Alt Enter back space
- 11:21:29backspace back space in this case and
- 11:21:32then I simply press enter here at the
- 11:21:34end and I have Week start date and week
- 11:21:36dat end date also available here and as
- 11:21:39this is not starting from 1 January so
- 11:21:41that's why you have the weeks which are
- 11:21:43starting from The Middle of the month as
- 11:21:45this is starting from 13th of October
- 11:21:47based on that our weeks are coming
- 11:21:50here now I want to create Financial year
- 11:21:53start and financial year end now because
- 11:21:55my months are standard months so the
- 11:21:57calculation for the month start date and
- 11:21:58month end date is not going to change
- 11:22:00but the year month calculation will
- 11:22:03change because let's say if my year
- 11:22:04starts on April the April is the first
- 11:22:06month and let's consider that case only
- 11:22:08when April is the first month so again
- 11:22:11my date table has a lot of columns as we
- 11:22:13have done in the p we are going to
- 11:22:15create these here and then we'll take
- 11:22:17them to the other scpt now let we start
- 11:22:20with the start of start of FY let's call
- 11:22:22it Financial year started start of fi
- 11:22:24where do here start the year starts in 1
- 11:22:27of April years end on 31st March any
- 11:22:30month like January February March they
- 11:22:32have their year started in the last year
- 11:22:34month which are after April which is 4
- 11:22:36to 12 the month the year started in the
- 11:22:39same year so this is the logic which we
- 11:22:41are going to use and for that we are
- 11:22:43going to use an statement so what I'm
- 11:22:46going to do is I'm going to create a
- 11:22:47date tape date using the date function
- 11:22:50but and remember four and one are
- 11:22:52constant right now the only thing we are
- 11:22:54doing is keeping a little bit of hard
- 11:22:56coding we say month number is four and
- 11:22:58day is one that is constant here is
- 11:23:00something which we need to change if the
- 11:23:03month of the date is in the row now is
- 11:23:07less than four then the year of the date
- 11:23:11is not starting this year it's starting
- 11:23:13in the last year so whatever year you
- 11:23:15have it's minus one otherwise you can
- 11:23:18continue with the year you had because
- 11:23:21your ear is going to start in this year
- 11:23:22only what we are saying is the in the
- 11:23:25year part of this one is basically that
- 11:23:28if the month of the date is less than
- 11:23:30four the true condition then year is in
- 11:23:33the last year the Year start and if it
- 11:23:35is greater than or equal to then year is
- 11:23:38starting this year and after that we can
- 11:23:40simply hardcode 4A 1 what we got first
- 11:23:43uppl as our start date now this is
- 11:23:45starting in October so it will have that
- 11:23:48now we have to travel till 31st March
- 11:23:50and 1st April to see is there a change
- 11:23:53happening so these are the two rows we
- 11:23:55are looking forward and look at the
- 11:23:59years so the years are changing in the
- 11:24:02month of April now end date again we
- 11:24:05will keep very simple Logic for the end
- 11:24:08date but here what is happening if it is
- 11:24:10before April it's ending in the same
- 11:24:12year after April it isend ending next
- 11:24:15year the Year doesn't end on this year
- 11:24:18shift enter past this end of FY and if
- 11:24:21it is less than then it's ending this
- 11:24:24year if it is more then it's going to
- 11:24:26end next year plus one either it ends
- 11:24:28this year or it ends next
- 11:24:31year where does it end it doesn't end on
- 11:24:34April it ends on 331st we have to do the
- 11:24:37adjustment and then enter or commit and
- 11:24:40we got the date of 31st March as the end
- 11:24:43of year and if you you can scroll down
- 11:24:45again to the same place
- 11:24:49March look at these rows March
- 11:24:52April end of year is
- 11:24:54changing so we got our financial year
- 11:24:57now to get the month number and the
- 11:24:59quarter number the formulas which I
- 11:25:01wanted to use need start of the year
- 11:25:03start of F5 now the challenge with us
- 11:25:06here is basically that this table which
- 11:25:08the current Table of the add columns
- 11:25:10doesn't have that because they are
- 11:25:12calculated in this table itself we
- 11:25:13cannot use use them so now what to do
- 11:25:15what I'm going to do is I'm going to put
- 11:25:16this entire table into a variable that
- 11:25:18we call that where underscore tab equals
- 11:25:22and then what I'm going to do is I'm
- 11:25:23going to go down it's a variable so I
- 11:25:25need to return something I'll return
- 11:25:26this table return underscore tab let's
- 11:25:29do a little bit of alignment change you
- 11:25:32better understand that enter nothing is
- 11:25:34changed this the same table now what
- 11:25:36happens is this new tab which is coming
- 11:25:39down which is in the return have all the
- 11:25:40columns what we need and now we can use
- 11:25:43start of fi and end of f the reference
- 11:25:45point now it is available in that table
- 11:25:47so if I now add add column on this tab
- 11:25:50here at this place if I add add column
- 11:25:53it will have these two columns start of
- 11:25:56FY and end of FY and using that we are
- 11:25:59going to drive out our now our month
- 11:26:01number Financial month number and
- 11:26:03quarter start date and quarter end date
- 11:26:04one of the most important thing in any
- 11:26:07data analytics or business intelligence
- 11:26:09analytics project is time intelligence
- 11:26:11time intelligence is critical to compare
- 11:26:13data Against Time you want to compare
- 11:26:15this month versus last month this month
- 11:26:17till date versus last month till date
- 11:26:18this month versus last year same month
- 11:26:20this year versus last year quarter
- 11:26:22versus quarter QQ y y week on week these
- 11:26:25are the kind of comparison you wanted to
- 11:26:27these comparisons are really important
- 11:26:29to understand are we doing good or bad
- 11:26:32powera provide you huge list of time
- 11:26:34intelligence functions and sometime you
- 11:26:36have more than one option to achieve one
- 11:26:37thing now there are ways and means you
- 11:26:39can write down your own time
- 11:26:40intelligence function using the other
- 11:26:42functions or you can get the value let's
- 11:26:45say MTD using the standard MTD functions
- 11:26:47and then you can also get that using
- 11:26:49let's say date between or maybe using
- 11:26:51the filter function now for everything
- 11:26:53there is a fit for purpose it is really
- 11:26:54important to understand all these time
- 11:26:56intelligence functions in powerb to make
- 11:26:58sure the time intelligence works for us
- 11:26:59the first step is to make sure the six
- 11:27:01step which I'm going to tell you you
- 11:27:03ensure that these six steps are done in
- 11:27:05your powerbi setup or your schema is
- 11:27:07following those six step or six rules
- 11:27:09poose that we are going to check in our
- 11:27:11own file that yes we are right now
- 11:27:13following these six step while we are
- 11:27:15going to do this time intelligence
- 11:27:16journey in powerbi there are six rules
- 11:27:19one must follow to make sure the time
- 11:27:21intelligence work in powerbi if you
- 11:27:23don't follow these rules the time
- 11:27:25intelligence May Fail or may not give
- 11:27:27the desired results so these six points
- 11:27:30or rules are use date table you have to
- 11:27:32always create a date table and use it
- 11:27:34and you have to join the date of your
- 11:27:36fact with the date of the date table the
- 11:27:38date table is marked as a date table now
- 11:27:41once you mark date table as a date table
- 11:27:42or calendar table as a date table it is
- 11:27:45going to ensure that you have continuous
- 11:27:46dat continuous States is really
- 11:27:48important for all powerbi time
- 11:27:51intelligence functions use columns from
- 11:27:53the date table when we will use the
- 11:27:55visualization in powerbi you must
- 11:27:57remember that you have to use the
- 11:27:59columns from the date table like date
- 11:28:01month year Etc into visualization into
- 11:28:04slicer into filter and into measure all
- 11:28:07these places the column should come from
- 11:28:10the date table to make sure the time
- 11:28:11intelligence work properly the date does
- 11:28:14not have a time stamp now your fact
- 11:28:16table date might have a time stamp and
- 11:28:18sometime because you have just taken the
- 11:28:20data type as date you might not be able
- 11:28:23to see it so the best practice is to
- 11:28:25change the data type as date time and
- 11:28:27then choose a format where you can see
- 11:28:30the time and then see you don't have any
- 11:28:33time other than 00 hours or 12:00 a.m.
- 11:28:36you must not have any time other than 00
- 11:28:39hours or 12 a.m if that's how your date
- 11:28:41is looking then you can use that if
- 11:28:44there is any other time other than 00
- 11:28:46hours or 12:00 a.m. like 2: a.m. 2: p.m.
- 11:28:481:00 a.m. 1 p.m. Etc then you should
- 11:28:51create a date column that you can do in
- 11:28:54power query you can change the data type
- 11:28:55as date and if you change it in power
- 11:28:57query it will lose the Tim stamp and if
- 11:28:59you want to do it in Dex you can create
- 11:29:00a new column using date value once you
- 11:29:02have ensured that your date doesn't have
- 11:29:04a Tim stamp you can join it with the
- 11:29:06date of the date table and because we
- 11:29:08are going to create date table using
- 11:29:10calendar and calendar Auto function that
- 11:29:12is going to ensure that your date table
- 11:29:14will not have a time stamp in the date
- 11:29:16column you have also need to make sure
- 11:29:18that your date table has all the dates
- 11:29:20because if your date table doesn't have
- 11:29:22all the dates your time intelligence may
- 11:29:23not work correctly if you are using a
- 11:29:26date from the date table and you are
- 11:29:28putting any measure from the fact and it
- 11:29:30is started showing blank in the date
- 11:29:32column then it means you don't have all
- 11:29:34the dates when you're using calendar
- 11:29:35Auto function it can make sure that you
- 11:29:38have full coverage of date coming from
- 11:29:39various other tables but when you're
- 11:29:41using calendar function you have to make
- 11:29:43sure that you do the full coverage this
- 11:29:44is another important point you should
- 11:29:46remember avoid bidirectional join if you
- 11:29:49have a bidirectional join your fact
- 11:29:51table will filter the date table what do
- 11:29:53it essentially means is if there is a
- 11:29:55date missing in the fact table because
- 11:29:57it is missing in the fact table or
- 11:29:59because you have applied some filter and
- 11:30:01now the dates are less it may actually
- 11:30:03reduce the date in the date table which
- 11:30:05you are using in a Time intelligence
- 11:30:07function and once there are not and once
- 11:30:10the and once continuous dates are not
- 11:30:12available your time intelligence May
- 11:30:14error out or may not work properly if
- 11:30:16you take
- 11:30:18care so these are the six rules and if
- 11:30:20you take care of these six rules your
- 11:30:22time intelligence should work
- 11:30:24properly we want to start time
- 11:30:26intelligence now let's make sure all the
- 11:30:28six rules has been followed or not let
- 11:30:30start that with the model view do we
- 11:30:32have a date table yes we have a date
- 11:30:33table is date table marked as a date
- 11:30:35table to ensure that we have continuous
- 11:30:37dates right click Mark date table Mark
- 11:30:40as date table select a date column the
- 11:30:43date column should should be the one
- 11:30:44which is a primary key or which is the
- 11:30:46main date column it may be coming from
- 11:30:48your sources it's not necessary you need
- 11:30:50to create it in powerbi you can create
- 11:30:52it at the source you can create it in
- 11:30:54power query you can create it in Dex
- 11:30:56make sure the dates are continuous so
- 11:30:57the validation is successful press okay
- 11:30:59and the moment you do the first thing
- 11:31:02which will change here is it will now be
- 11:31:04a key it will no more be a date and
- 11:31:07there will be no more autod date
- 11:31:08hierarchy Auto date time intelligence is
- 11:31:10gone is it joined with our table no it
- 11:31:12is not joined look at again this date
- 11:31:15sales date and if I scroll down here
- 11:31:16sales date will have a hierarchy so we
- 11:31:19have a sales date with which I want to
- 11:31:21join let me drag the date of the date
- 11:31:23table on the sales date and the
- 11:31:25relationship is created now I need to
- 11:31:27make sure the two things which I should
- 11:31:29have checked before one is the date the
- 11:31:32say date doesn't have a time stamp I
- 11:31:34need to make sure that and second is the
- 11:31:36date table covering all the dates now
- 11:31:38I'll go to the table View and inside the
- 11:31:40table view let me go to the sales table
- 11:31:43and here I have my sales date how do I
- 11:31:45ensure that there is no time stamp so
- 11:31:47usually what I do for that is I change
- 11:31:49the data type to date time and I take a
- 11:31:52format where I can see a time stamp all
- 11:31:54the dates should have a time stamp of
- 11:31:5612:00 a.m. all the date in my case have
- 11:31:59a time stamp of 12:00 a.m. any date
- 11:32:01having time stamp other than 12:00 a.m.
- 11:32:04it means the join will not be successful
- 11:32:07that is there I can change it format
- 11:32:09back to date and I can keep it in the
- 11:32:11short format so column TOS help Us in
- 11:32:14that now let's go ahead and check do we
- 11:32:17have the complete set of dates now we
- 11:32:19may have multiple tables so the one of
- 11:32:21the ways is that you take the Min and
- 11:32:23Max of the dates and check it out one of
- 11:32:26the easiest way to do that is create a
- 11:32:28page bring date or some from the date
- 11:32:31table a bring a measure or some
- 11:32:33aggregated column from your facts one or
- 11:32:37more fact the moment I bring in let's
- 11:32:39create a table visual you should not see
- 11:32:41any null date sending s dat I'm not
- 11:32:43seeing Al date it means all the dates
- 11:32:45are joined and I'll tell you one example
- 11:32:47where if the dates are not complete what
- 11:32:49would happen so let's go to our date
- 11:32:51table and we are using the Min date here
- 11:32:54let me use a date which is 2019 01 01
- 11:32:59now I have data from October 2018 but if
- 11:33:01I make it 2019 what would happen I'll
- 11:33:04start getting a blank so this blank
- 11:33:06means the dates are missing or there is
- 11:33:09a time stamp join problem there's a date
- 11:33:11time if you see this check out those two
- 11:33:13things now let me complete my date table
- 11:33:15I can make it from the starting of 2018
- 11:33:18the moment I cover all the dates you
- 11:33:20will see I do not have blank date when
- 11:33:24there is no empty date or blank date it
- 11:33:26means we are fully covered you may have
- 11:33:28more than one fact add all of them and
- 11:33:30check it out so time intelligence setup
- 11:33:32is correct one more thing which we need
- 11:33:34to ensure is going to come when we
- 11:33:36create a Time intelligence major when we
- 11:33:39create a Time intelligence major and we
- 11:33:41want to use it we need to ensure the
- 11:33:43major should use the columns from the
- 11:33:45date table or the period the visual
- 11:33:48right now you can see the visual is
- 11:33:49using date from the date table and the
- 11:33:52slices and filter should also be on the
- 11:33:54date tape that's the way when it's going
- 11:33:56to work best which we are going to check
- 11:33:58after our first time intelligence before
- 11:34:00I do that once again I'll click on the
- 11:34:03date go to the column format change its
- 11:34:05format to date and we'll also change it
- 11:34:07to short format so that whenever I'm
- 11:34:09creating visualization I get little bit
- 11:34:11of space when I'm doing some work so
- 11:34:13let's start with time intelligence now
- 11:34:16as part of our journey we are going to
- 11:34:18learn MTD MTD means month till date
- 11:34:21means from the start of the month till
- 11:34:23the date which we have selected or the
- 11:34:25till the date which is available in the
- 11:34:27context qtd quarter till date from the
- 11:34:30start of the quarter till the date we
- 11:34:32have selected or in the context and the
- 11:34:35quarter start date would be decided on
- 11:34:36based on the date which you have
- 11:34:38selected also the quarter start date
- 11:34:40will be dependent on your financial year
- 11:34:41start date if your financial year is not
- 11:34:44starting from the standard quarter
- 11:34:45months like Jan April July and October
- 11:34:48you might have a different quarter start
- 11:34:50date than what you have for the standard
- 11:34:52quarter similarly year till date YTD YTD
- 11:34:55means year till date year till date
- 11:34:57typically we call it when we are using
- 11:34:59from standard calendar start date so
- 11:35:02standard calendar year start date till
- 11:35:05date from the start of the calendar year
- 11:35:06till date is yd but in case of a
- 11:35:09financial year the Year may start on
- 11:35:11let's say 1st April then it is from the
- 11:35:13finan year start date till date so let's
- 11:35:15try to understand these till date when
- 11:35:17we say MTD qtd YTD what does this means
- 11:35:20month till date quarter till date year
- 11:35:21till date assume my date is 15th of
- 11:35:24September 2024 so for 15th of September
- 11:35:272024 what is going to be my MTD my MTD
- 11:35:30is going to be from the start of the
- 11:35:31month which is from 1st of September
- 11:35:332024 to 15th of September 2024 my qtd is
- 11:35:37going to be from the start of the
- 11:35:39quarter which is 1st of July 2024 to
- 11:35:4215th of September 202 4 my YTD would be
- 11:35:45from the start of the year in this case
- 11:35:47the calendar year which is from 1st
- 11:35:49January 2024 to 15th of September 2024
- 11:35:53what happens when my year start from the
- 11:35:551st April now again 1st April is going
- 11:35:57to have all the standard quarters so
- 11:35:59it's not going to change anything for
- 11:36:00quarter same way it is standard month
- 11:36:02start so it's not going to change
- 11:36:03anything for the month also so MTD would
- 11:36:06be from 1st of September 2024 to 15th of
- 11:36:09September 2024 QD would be from 1st of
- 11:36:12July 2024 to 15th of September 2024 YTD
- 11:36:16would be from 1st of April 2024 to 15th
- 11:36:20of September 2024 this is because our
- 11:36:23financial year is starting from the 1
- 11:36:25April it is not starting from the
- 11:36:27calendar year so that is why the start
- 11:36:29date of YTD has changed and sometime we
- 11:36:31call this as fytd Financial year till
- 11:36:34date let us start with our first time
- 11:36:36intelligence measure and the first time
- 11:36:38intelligence major is MTD month till
- 11:36:40date means from start of the month till
- 11:36:43the date which is being selected or
- 11:36:45present in the context the date could
- 11:36:47have been selected in the slicer or
- 11:36:49available in the row context based on
- 11:36:51that date it should give us the data for
- 11:36:53that for MTD there are many ways you can
- 11:36:55achieve it but first of all we will
- 11:36:57learn dates MTD and total MTD functions
- 11:37:00Tes MTD function need to be used in a
- 11:37:03calculate function total MTD function
- 11:37:06might not require a calculate because it
- 11:37:08can take a measure as well as the date
- 11:37:10to give you the total MTD there are two
- 11:37:13fun functions and later on when we
- 11:37:14progress when we go to quarter till date
- 11:37:16and year till date we will only start
- 11:37:18using one of them so the function is
- 11:37:20total MTD and dates MTD I'll start with
- 11:37:23total MTD which is basically a
- 11:37:24self-sufficient function it doesn't
- 11:37:26require calculate let me click on the
- 11:37:28measure table and I can see the table
- 11:37:30tool as of now and inside the table tool
- 11:37:32I have a new major option which I'm
- 11:37:34going to use in this case let me click
- 11:37:35on new major and here I'm going to
- 11:37:38create my first time intelligence major
- 11:37:40that is MTD net and I'm going to use
- 11:37:42total MTD total MTD requires an
- 11:37:45expression date and filter it can have a
- 11:37:47filter and if you need more than one
- 11:37:49filter then you can again use calculate
- 11:37:51on top of total MTD otherwise total MTD
- 11:37:54doesn't require calcul what is the
- 11:37:55expression so expression date filter
- 11:37:58what is the expression expression is
- 11:38:00Major dates is the sequential date where
- 11:38:02we are going to give the date column
- 11:38:03from the date table and filter as of now
- 11:38:05I'll not give I'll give my major net for
- 11:38:07which I want the MTD then I'll give date
- 11:38:10from the date table and no requirement
- 11:38:12of filter as of now so I'll continue
- 11:38:14with this I created my first time
- 11:38:16intelligence major MTD net and let me
- 11:38:18bring in here now it is from the start
- 11:38:20of the month now on the month of October
- 11:38:222018 we don't have the data which is
- 11:38:24starting from the first date is 13th
- 11:38:26October 2018 and that's the date from
- 11:38:28where the aggregation of the data would
- 11:38:30start and till the last date of the
- 11:38:32month you will see the data is keep on
- 11:38:34adding as you can see these two dates
- 11:38:36are getting added on the next so we got
- 11:38:3836 on 3 days now it is 73 3 days getting
- 11:38:41added and it keep on increasing till 30
- 11:38:431 which is the last date of this month
- 11:38:45and on the 1 November the first date of
- 11:38:48November you see there is a reset and
- 11:38:50this is what we call MTD start point you
- 11:38:53start MTD from the start date of the
- 11:38:54month so the value of the that day and
- 11:38:57MTD would be equal but on the next day
- 11:38:59it will start increasing so on the
- 11:39:01second you have sum of first two days on
- 11:39:02third you have first 3 days fourth you
- 11:39:04have sum of first 4 days and keep on
- 11:39:06going till the month and date and you
- 11:39:08will see another reset happening on the
- 11:39:101st of December till 31st is going to
- 11:39:12end on first there would be a reset now
- 11:39:15MTD Works based on the date in the
- 11:39:17context now date here in the context is
- 11:39:20basically the date in the row there is
- 11:39:22nothing coming from Filter context let
- 11:39:23me bring in month here in another visual
- 11:39:26I'll drag it into empty space sorting is
- 11:39:28correct and let me drag in MTD major
- 11:39:31there in this case when we use month
- 11:39:33here the MTD major is going to give us
- 11:39:35the last dates value and it will act
- 11:39:38like a monthly value if you're using at
- 11:39:40the month level the MTD will act like a
- 11:39:43monthly value at the month level From
- 11:39:44First to Last that's the monthly value
- 11:39:46it's a current month the month in the
- 11:39:47context we have not talked about the
- 11:39:48filter as now how does it behave with
- 11:39:51respect to filters what happens when we
- 11:39:53apply a filter so now the case when the
- 11:39:56date is available in the row context and
- 11:39:57even if you apply filter let's say I
- 11:39:59apply the November filter now we know
- 11:40:00the other visual can also act as a
- 11:40:01filter when we apply you can see only
- 11:40:04November month data we can't get more
- 11:40:05than November month data unless we
- 11:40:07follow the tricks and the data will
- 11:40:09start aggregating for that you may have
- 11:40:11a date filter specific very specific
- 11:40:12date filter on that date filter how much
- 11:40:14data will I get on that day's data or
- 11:40:16the MTD data so let me bring in a slicer
- 11:40:18for the date I'll bring the date in
- 11:40:20between convert it into a slicer and let
- 11:40:23me go ahead and change this slicer
- 11:40:25setting using the format which is
- 11:40:27available on the right hand side and
- 11:40:29slicer I would like a drop down and when
- 11:40:32I drop down I would drop down actually
- 11:40:35go a little bit down I would like to
- 11:40:36select something in November so let me
- 11:40:38select fourth November so as you can see
- 11:40:40the MTD value is for the 4th November
- 11:40:42till from first to Fourth even if the
- 11:40:44date is not selected you can remove the
- 11:40:47fourth number context okay but the date
- 11:40:49from first second and third no is not
- 11:40:50selected but still it is going to get
- 11:40:52that and give you the MTD value if the
- 11:40:54value are available in your data the
- 11:40:56fourth number is going to give me that
- 11:40:57value now we understand that if you
- 11:40:59select a month the dates in the context
- 11:41:01is going to control that we selected
- 11:41:03more than if we select a single date
- 11:41:05that date is going to play what happens
- 11:41:07and both filter and slicer context are
- 11:41:09missing so let's make sure there is no
- 11:41:10filter context and there's no slicer
- 11:41:12context right now now there is nothing
- 11:41:14selected on the slicer nothing select on
- 11:41:16the visualization and we remove the
- 11:41:18filter and the slicer context and now we
- 11:41:20will bring in MTD into a card visual why
- 11:41:23we are seeing a blank what is the date
- 11:41:25is getting for us what happens these
- 11:41:27total MTD and even the dates MTD
- 11:41:29function going to follow soon it takes
- 11:41:31the last date available in the context
- 11:41:34of what the date which is supplied here
- 11:41:36and what is the last date available in
- 11:41:37the date column please remember it's
- 11:41:39only for TD functions for the previous
- 11:41:41they take the first date if you go to
- 11:41:43our date table the last date is today I
- 11:41:46don't have any data for today and for
- 11:41:48even for today's month my data ends in
- 11:41:492020 we are in 2024 I don't have any
- 11:41:52data for the current month what date
- 11:41:53range exactly it is taking for that I'm
- 11:41:55going to give you an example and let's
- 11:41:57try to use dates MTD let me do a little
- 11:42:00bit of visual adjustments
- 11:42:04here so I'm going to create my second
- 11:42:07major time intelligence major it's again
- 11:42:09going to be the MTD major so this time
- 11:42:11I've clicked on a major so Major Tool is
- 11:42:12visible and from the major tool I'm
- 11:42:14going to create a new major and the
- 11:42:17major is MTD net1 and this time I need
- 11:42:21to use calculate calculate net I'm going
- 11:42:23to use a function dates
- 11:42:25MTD dates MTD actually required only one
- 11:42:29argument which is dates this is also
- 11:42:31true with the next function which we are
- 11:42:33going to use is dates qtd definitely
- 11:42:35dates YTD we can have two arguments it
- 11:42:37do cover the year and date which we'll
- 11:42:40see later only one date and the date
- 11:42:43date which you provide it's going to
- 11:42:44pick up the last date from that and
- 11:42:46based on that the last date so what it
- 11:42:49is going to do is it's going to pick up
- 11:42:50the last date from the context now the
- 11:42:52context could be the filter context or
- 11:42:54could be the row context or if there is
- 11:42:56no context available it's going to go
- 11:42:58till the last date of the calendar dates
- 11:43:00which you are supplying here and going
- 11:43:02to take that out dates MTD actually
- 11:43:04return return me a table of dates or a
- 11:43:07sequence of dates based on the date in
- 11:43:09the context is going to return me from
- 11:43:11the start of the month till that date is
- 11:43:13sequence of date it's going to come up
- 11:43:14set of dates month up to current date
- 11:43:16date of date and never most of the
- 11:43:18people understand it in the context of
- 11:43:20today today you cannot pass first of all
- 11:43:22it needs sequence of date you can't pass
- 11:43:23today to a date 7 and date where what is
- 11:43:26there is defined by the context so we
- 11:43:28given date of date what is filter
- 11:43:30context or what is row context otherwise
- 11:43:32what is the last date in case of MTD it
- 11:43:34could be first date in case of previous
- 11:43:35functions so and this function will also
- 11:43:38help us in understanding what we are
- 11:43:40getting so again the same results so
- 11:43:41dates MTD and total MTD their uses is a
- 11:43:44little bit different but they're going
- 11:43:45to give us the same result again we are
- 11:43:47getting the month till date data using
- 11:43:49this one and the same behavior at the
- 11:43:51month level there's no difference so it
- 11:43:52gives you sequence of date from the
- 11:43:54first date of the month till that
- 11:43:55particular date the set of date and to
- 11:43:57understand that what we are getting and
- 11:43:59what we are getting why we are getting
- 11:44:00this blank and let me bring in the other
- 11:44:02one also as a card visual let's create a
- 11:44:04table and see what dates we are getting
- 11:44:06so let's click on any of the table and
- 11:44:08create a new table and in that table we
- 11:44:10will see what dates we have using dates
- 11:44:13MTD date of date now because cable is
- 11:44:16static in nature it is pre-calculated
- 11:44:18the only thing it can do is go ahead and
- 11:44:20get the last date because it's not going
- 11:44:22to follow any filter context any row
- 11:44:24context is going to get the last date in
- 11:44:26the calendar based on that is going to
- 11:44:27calculate that and let's go to the table
- 11:44:29view now and check what does this table
- 11:44:31contains for us and as you can see the
- 11:44:33dates table contains the date of the
- 11:44:35current month from the start date and
- 11:44:37this is because the calendar is editing
- 11:44:38at today now let me change my calendar
- 11:44:41don't think that it gives from today let
- 11:44:43me change my calendar I'm changing my
- 11:44:45calendar and now it is no more going to
- 11:44:47end on today let me end my calendar on
- 11:44:50date 202 1231 again have data till
- 11:44:54October I'm ending it the 12th month and
- 11:44:56now let me go to the dates table again
- 11:44:58you see the data is from December 2020
- 11:45:02and all the dates 31 dates are available
- 11:45:04the reason for that it taken that last
- 11:45:06date available in the calendar and
- 11:45:09calculated it so these are the date
- 11:45:11applicable and because of that you get
- 11:45:14these blank values now you understand
- 11:45:15now you know how to play around with how
- 11:45:17to control that so this is what we have
- 11:45:19to continue so now we have learned MTD
- 11:45:21let me rename this qtd total qtd are the
- 11:45:24functions to achieve quarter till date
- 11:45:26you have understood by now that the
- 11:45:28total qtd function is one which might
- 11:45:31not require calculate while dates qtd is
- 11:45:33going to require calculate to do the
- 11:45:35calculation let's start with qtd
- 11:45:37functions again total qtd dates qtd two
- 11:45:40options are available I'll go to quickly
- 11:45:42create that so let me add a visual here
- 11:45:44date and this time I'm going to add date
- 11:45:47because we know it Behavior how it's
- 11:45:48going to behave after this one so we'll
- 11:45:50quickly create the two majors and the
- 11:45:52two major which I'm going to create here
- 11:45:55is qtd Majors so qtd net first of all
- 11:45:59with total
- 11:46:00qtd again three arguments expression
- 11:46:03dates and filter we are going to pass
- 11:46:06only two as of now expression is net
- 11:46:08dates is date of dates that's all
- 11:46:13let me also add one more major based on
- 11:46:17the UTD net 2 and here I'm going to use
- 11:46:22dates QD is going to give me the set of
- 11:46:25dates date of date two majors going to
- 11:46:29return me the same results just
- 11:46:30implementation difference what does it
- 11:46:33this do start from the first date of the
- 11:46:34quarter the first date is not available
- 11:46:36first available date of the quarter and
- 11:46:38go till the last date of the quarter the
- 11:46:39last date of this quarter is 31st
- 11:46:41December and it's continuously
- 11:46:43increasing in this direction values you
- 11:46:45can see the daily values are increasing
- 11:46:47where they will reset they will reset on
- 11:46:49the first date of the quarter so you can
- 11:46:51see the November has started till the
- 11:46:52values are increasing let's go on 31st
- 11:46:55December and we have 31st December and
- 11:46:571st January together now you can see
- 11:46:59it's increasing till this date and post
- 11:47:01that it is changing now to understand
- 11:47:03this increase let's also bring in net
- 11:47:05into the visualization and as you can
- 11:47:07see on the first date of the quarter the
- 11:47:09values is same as that day's value and
- 11:47:12this is going to be true prove with
- 11:47:13every start of the quarter not start of
- 11:47:15the month now if I go to February there
- 11:47:17is no more a reset at the month's start
- 11:47:20the value is not same as the value on
- 11:47:22that day for the second month because
- 11:47:24it's a quarter till quarter and date it
- 11:47:25will keep on increasing so we got now
- 11:47:28qtd for YTD we are going to use States
- 11:47:30YTD and total YTD total
- 11:47:33YTD might not require the calculate
- 11:47:36because it to have a capability to take
- 11:47:39a measure and provides you total YTD
- 11:47:42along with the date column
- 11:47:44provided for financial year in both
- 11:47:47States YTD and total YTD we can provide
- 11:47:49a financial year end date and they can
- 11:47:51calculate the financial year till date
- 11:47:53values now let's bring in YTD we are
- 11:47:56going to bring it into the same visual
- 11:47:58for that again two majors and you will
- 11:48:00notice one difference this time when we
- 11:48:02calculate YTD so YTD net let me start
- 11:48:05with total YTD total ydd again we
- 11:48:08require expression dates filter but
- 11:48:10there is a year and date year and date
- 11:48:13means if your financial year is not
- 11:48:14ending on 1231 you can give any date on
- 11:48:17which it is ending and based on that is
- 11:48:19going to start the year end date is only
- 11:48:21for the reference where it year ends can
- 11:48:23get the year starting point based on
- 11:48:25that and can calculate your YTD based on
- 11:48:27that so here again for the first
- 11:48:30starting I can avoid the year and
- 11:48:32argument and I'm going to do that and
- 11:48:34let me calculate total YTD and that's
- 11:48:37going to give me YTD let me bring in the
- 11:48:40YTD using dates YTD so net
- 11:48:43YTD net 1 equal to calculate net dates
- 11:48:46YTD and dates YTD required dates and
- 11:48:49year and date it's required two
- 11:48:51argument so date of date and second
- 11:48:54argument I'm leaving let me add it to
- 11:48:56the visual if the visual is selected I
- 11:48:58can simply click on that I got the YTD
- 11:49:00value now where would the reset happen
- 11:49:01see because we are starting in a last
- 11:49:04quarter so we will see the reset on the
- 11:49:06first January itself here the quarter
- 11:49:08value and the year value same doesn't
- 11:49:09mean that it's going to be always the
- 11:49:10case and there is only a reset happening
- 11:49:12at this start of the year now in the
- 11:49:14entire year you will see the
- 11:49:15continuously values are increasing till
- 11:49:17the time we reach the end of 2019 and
- 11:49:19you can see here the max value reached
- 11:49:21here and there is a reset which is
- 11:49:23happening on 1st January 20 so whyd get
- 11:49:26reset on that day now because it was
- 11:49:28asking end date it does mean that we can
- 11:49:30change where it should reset so let's
- 11:49:32say you want a financial year ending on
- 11:49:34331st we can do that so let's create a
- 11:49:36YTD for FY and we can call it FY YTD net
- 11:49:40and I'm only going to use one function
- 11:49:42for that as of now both the functions
- 11:49:43can do the same job for us and here in
- 11:49:46the dates YTD we are going to use the
- 11:49:47second argument now is year and date and
- 11:49:50this is not available with other TDS
- 11:49:51month and quarter only available with
- 11:49:54YTD function and let me add this now
- 11:49:56let's look the value looks same but we
- 11:49:58have to pay attention on 1st January
- 11:50:00because on the 1st January this YTD is
- 11:50:02not going to reset so this this is
- 11:50:05resetting this is resetting this is not
- 11:50:07resetting because it will reset on 1st
- 11:50:09April when we cross the year on 31st
- 11:50:12first March so when we cross year it is
- 11:50:15getting a reset and the value is same as
- 11:50:17the start of the the quarter in this
- 11:50:19manner we can create Financial year till
- 11:50:22date from the start of the Year till the
- 11:50:24that particular date now let's learn how
- 11:50:27can we get the previous month value
- 11:50:28previous month till date and previous
- 11:50:30month why I'm talking about two things
- 11:50:31I'll tell you in a short file let me
- 11:50:33duplicate this page after I duplicate
- 11:50:35I'll remove one one major from here I
- 11:50:37don't need two TDS one TD is sufficient
- 11:50:39for me now I would like to bring in the
- 11:50:42last year month till date so definitely
- 11:50:44I need MTD function for that but other
- 11:50:46than MTD I need to make sure that I go
- 11:50:49one month back and to go one month back
- 11:50:51I'm going to use a function which is
- 11:50:53known as date add function the date add
- 11:50:56function is going to help again date add
- 11:50:58function require continuous set of dates
- 11:51:00so let me go ahead and create a measure
- 11:51:02and tell you how do I let me add a new
- 11:51:04measure from the table tool and this
- 11:51:07measure I want is lmtd last month till
- 11:51:10date so I want lmtd net calculate net
- 11:51:15that's the same thing I'm doing now here
- 11:51:17comes the
- 11:51:18difference dates MTD that's same but
- 11:51:22inside the dates MDD I want the entire
- 11:51:25dates to move a month back I'm going to
- 11:51:27use a function date add and please
- 11:51:30remember the understanding of date head
- 11:51:32that date head also require continuous
- 11:51:34for dates please watch date as dated
- 11:51:37video on my channel for that so dates
- 11:51:39require the first arguments is dates
- 11:51:41date of date this the second argument is
- 11:51:43interval how many intervals I want to go
- 11:51:45to last month so minus one plus one for
- 11:51:48next month interval day month quarter
- 11:51:50year I need month here what I've done
- 11:51:53here is basically the continuous
- 11:51:55argument which date argument which I
- 11:51:57passed to my MTD has been moved a month
- 11:52:00behind it is still the continuous date
- 11:52:02but a month behind let me press and
- 11:52:04enter here my major is created let me
- 11:52:07bring it inside the visualization one
- 11:52:09here and one on the month here so I
- 11:52:11bought the MTD in the table which I have
- 11:52:14dates and you can see exactly after the
- 11:52:161 month the MTD has started and it
- 11:52:19increasing in the similar fashion now go
- 11:52:21down and pay attention on 30th what
- 11:52:24value we are getting on 30th I'm getting
- 11:52:26the value not of the last day of the
- 11:52:2830th October 7 547 K 547 is on 30th
- 11:52:33October not 31st when I'm using date by
- 11:52:36date it take the 30th value but look at
- 11:52:38here what is happening at the month
- 11:52:40level at the month level it takes the
- 11:52:42complete value so MTD used with a
- 11:52:46trailing date using date ad is going to
- 11:52:49give me the last month value when I use
- 11:52:50the full month value and corresponding
- 11:52:53days MTD month till date of the last
- 11:52:56month on that date whatever date I have
- 11:52:58on that days of the last month what was
- 11:53:00my value it's going to give me that so
- 11:53:03this is MTD for me now I will tell you
- 11:53:05one more function that function is going
- 11:53:08to give us previous meth and the
- 11:53:09function which I'm going to use is name
- 11:53:11itself is previous month so let me
- 11:53:13create a new majure meure tool is open
- 11:53:15as of now I'll click on new
- 11:53:19measure
- 11:53:22calculate net and the function I'm going
- 11:53:24to use is previous month previous month
- 11:53:27required only one argument that is date
- 11:53:29again when we use year it will require
- 11:53:31more than one argument you can decide
- 11:53:33the year and date date of date I'm
- 11:53:36supplying and I'm completing this let me
- 11:53:38bring in this observe the difference
- 11:53:40which we are going to get here and you
- 11:53:42might have realized the moment I dragged
- 11:53:44it in the visual which contains only
- 11:53:46date is actually not the single day
- 11:53:50value it's the complete last month even
- 11:53:52for each date the next month while on
- 11:53:55the month level I'm fine with having a
- 11:53:58value which is month and date value it
- 11:54:01is not suitable for MTD and definitely
- 11:54:04this is not a function for MTD this is a
- 11:54:06function for previous month it gives you
- 11:54:08complete previous month so now you
- 11:54:10understand how the MTD trade triling can
- 11:54:12be done and how can we use previous
- 11:54:14month I would like to bring in something
- 11:54:16here now let me bring in lmtd here and
- 11:54:19as expected it is blank let me add thee
- 11:54:22also
- 11:54:23here both are blank you that's expected
- 11:54:25isn't it should be blank let me go to
- 11:54:28the last available month is October and
- 11:54:31if I click on October what should happen
- 11:54:32should give me the September value isn't
- 11:54:34it yes it is giving me value this is my
- 11:54:37value of the SE number that's fine now
- 11:54:39let me do one thing let me play play
- 11:54:42around with my date calend I go to my
- 11:54:44data in my date calendar I will go ahead
- 11:54:47now I don't want to pass a filter or a
- 11:54:49filter context just want to go ahead and
- 11:54:52change this date to Uber and as you know
- 11:54:54I have data enough now there is no
- 11:54:56filter there is no filter context and
- 11:54:58the date is ending at the last month
- 11:55:01where I have the data see I have the
- 11:55:03data for October that was the last
- 11:55:05available data and this is my previous
- 11:55:06month data and I'm getting a previous
- 11:55:08month also in my visual make it a little
- 11:55:10bit bigger overlapping as you can see
- 11:55:12see here I'm still getting the previous
- 11:55:13month values both with the lmtd and B
- 11:55:16previous but look at the the card is not
- 11:55:18getting a filter because I have not
- 11:55:19clicked on any of the values nor I have
- 11:55:22used my slicer so there's no filter
- 11:55:24context there is no row filter context
- 11:55:26there's filter context here available
- 11:55:28with this visual which is containing
- 11:55:30month here so there is no filter context
- 11:55:32for the card visual there is no filter
- 11:55:34why it is giving blank why not September
- 11:55:36because lmtd is giving me September MTD
- 11:55:39is giving me value why previous month is
- 11:55:41not giving the reason for that that
- 11:55:43previous month and all the previous
- 11:55:44function which we are going to use
- 11:55:45whether it is previous quarter and
- 11:55:47previous year they use first date into
- 11:55:49context they don't use last context and
- 11:55:52to understand that let me give you one
- 11:55:55example here that it is using the first
- 11:55:57date I'm going to bring in month year as
- 11:56:00a slicer here and in this month year
- 11:56:03slicer I'm going to go down and select 2
- 11:56:07months January febrary January 2019
- 11:56:10febrary 2019 the ones which I selected
- 11:56:13what are you expecting January to get
- 11:56:16the December value seems like it is
- 11:56:17getting and February to get the like it
- 11:56:19is getting what what value what value is
- 11:56:21this lmtd is giving me January and
- 11:56:24previous month is giving me
- 11:56:30de this is because in the context there
- 11:56:32are 2 months right now and the lmtd is
- 11:56:36picking up from the maximum available
- 11:56:39because of MTD and previous month is
- 11:56:41picking up the first date available
- 11:56:43because there is no filter context only
- 11:56:45filter is available and filter is giving
- 11:56:462 months you need to be really careful
- 11:56:49if you are designing a previous month or
- 11:56:52the last month and you're using these
- 11:56:54function and you select a range which is
- 11:56:57crossing a month you're not using any
- 11:57:01context then the behavior of these
- 11:57:04functions can change so keeping in that
- 11:57:06mind you should create these majors and
- 11:57:09use them appropriately
- 11:57:12the next thing which we want to learn in
- 11:57:14the time intelligence is week or week
- 11:57:17for week or week the challenge with us
- 11:57:19is basically that there is no standard
- 11:57:22function for that we need couple of
- 11:57:24things in our date table so let me go to
- 11:57:27the table View and in the date table let
- 11:57:30me tell you what we need so in the date
- 11:57:32table we will need a date rank which we
- 11:57:35have created as a column here and the
- 11:57:38date rank should be the ascending Rank
- 11:57:40and it should be dance means after one
- 11:57:43we should get two I have created that on
- 11:57:46week start date you can also create that
- 11:57:48on year week YY y ww second thing which
- 11:57:51we need is the we need a week day as a
- 11:57:54number and the week day when we use the
- 11:57:57weekday as a number that should follow
- 11:57:59the same week which start date is
- 11:58:01falling so we don't have a week day as a
- 11:58:04number so let me add weekday as a number
- 11:58:07here I'm going to enter here let me call
- 11:58:10it week day number and weekday number
- 11:58:13should follow the same weekday which
- 11:58:15start date is following so what start
- 11:58:17date is following I'll let you know Week
- 11:58:19start date is following this one so same
- 11:58:22I will follow for weekday usually for
- 11:58:25the Monday start what do you want so two
- 11:58:27is for Monday 11 is also for Monday so
- 11:58:30Monday weekday number one for Monday and
- 11:58:33I'm starting let me sort this for
- 11:58:37sending 1st January 2018 was a Monday so
- 11:58:41that's correct and and we have a week
- 11:58:43rank of one for that 1st January 2018 is
- 11:58:46a Monday and it should be first week
- 11:58:48also both the informations are correct
- 11:58:51so now using this we will do our time
- 11:58:54intelligence so let me add a new page
- 11:58:57and what I can do is directly I can
- 11:58:59start with first we will do week over
- 11:59:02week and then later we'll do wtd week
- 11:59:05till date so for that from the date
- 11:59:07table let me bring in week start date
- 11:59:10and using that only I'm going to bring
- 11:59:12in my week or week so what is going to
- 11:59:15be my formula so here I'm going to take
- 11:59:17the help from the row context so this
- 11:59:20week is the major which I'm creating
- 11:59:23calculate net then I'll start my filter
- 11:59:26now in the filter I'll use all now for
- 11:59:29this week I can use all selected
- 11:59:31assumption is that this week would
- 11:59:33always be present but it's Finly
- 11:59:35possible that I select a date and I need
- 11:59:38the complete week then that's why I need
- 11:59:40all so in all I can give table or column
- 11:59:42name I'm going to give table name here
- 11:59:45because I want to ignore all the filters
- 11:59:47whether it's a day month year quarter
- 11:59:50and then I want to use date of date
- 11:59:53tables week rank equals to Max of week
- 11:59:58rank now what does that means is when we
- 12:00:01use the max of weak rank in the context
- 12:00:05whatever week is available or a date is
- 12:00:08available for that is going to find out
- 12:00:10let's say even month is available aable
- 12:00:12then it would be the last week of that
- 12:00:14month here is available last week and if
- 12:00:16the there's no context available last
- 12:00:18week available in the date table it
- 12:00:20would be picked up so this is how this
- 12:00:22is going to behave and it's going to
- 12:00:24give me this week measure and let me
- 12:00:27bring it inside the visual and convert
- 12:00:30it into date table and you can see that
- 12:00:33the values have started from the very
- 12:00:35first week the first week started on 13
- 12:00:38so the week of 8th contain the 13 only
- 12:00:41two days of data and then we have the
- 12:00:42week of 15th and the week of 22 for
- 12:00:45which we have the data and I can
- 12:00:47showcase you it with along with the date
- 12:00:49also so let me bring in another visual
- 12:00:51with date and this
- 12:00:55week value will repeat for a week
- 12:00:57because we are doing this kind of
- 12:00:59calculation now last week calculation is
- 12:01:01very simple we have to use this week's
- 12:01:04calculation but when so calculate net
- 12:01:07filter all the date means ignore all the
- 12:01:10filters on the date we rank should be
- 12:01:12equal to the max of weak rank but minus
- 12:01:15one it should be minus one and because
- 12:01:17the entire date context is available
- 12:01:19entire date table is available we'll be
- 12:01:21able to have the last week also last
- 12:01:24week the only difference is this minus
- 12:01:27one let me bring last week also here and
- 12:01:30as you can see the last week values are
- 12:01:32now av la so we have learned this week
- 12:01:35and last week how do we get week till
- 12:01:37date for week till date remember you
- 12:01:39have to use week number don't use date
- 12:01:42you will use the same formula as this
- 12:01:44week with the difference copy the same
- 12:01:46formula of this week create a new
- 12:01:48measure Major Tool is open new measure
- 12:01:51is available there and now we are going
- 12:01:53to create what we call as wtd be till
- 12:01:56date again no standard power ba function
- 12:01:59is available so we'll filter the date
- 12:02:01table all the dates week rank equals to
- 12:02:03the max of weak rank means whatever is
- 12:02:06available in the context and weekday
- 12:02:10number equal equals to Max of weekday
- 12:02:15number so whatever is the weekday number
- 12:02:17it should be equal to that number that
- 12:02:20is what we are going to have in the
- 12:02:21filter Clause week is equal to week and
- 12:02:23weekday number is also equal to the
- 12:02:25weekday number but that's going to give
- 12:02:27me the week day I need to use less than
- 12:02:30equal to so now it is start accumulating
- 12:02:33so all the week days we have to consider
- 12:02:36and let me add this this will give me
- 12:02:39wtd and you see that the two days are
- 12:02:42adding and this was the value for the
- 12:02:44first week then there is a reset which
- 12:02:46is happening let me bring in net and
- 12:02:48when I bring in net you will understand
- 12:02:50that these two days are adding here and
- 12:02:52this was the same value which we got for
- 12:02:55current week also then for the next week
- 12:02:58these values are adding till this place
- 12:03:01and this was the value which we were
- 12:03:02getting these values are C for the week
- 12:03:05is getting added so we got wtd now what
- 12:03:08we need to do for last week till date
- 12:03:10very simple this is the same last week
- 12:03:12formula you need so I can copy the wtd
- 12:03:15formula actually that's much easier I
- 12:03:18copy this wtd formula create a new
- 12:03:20measure measure tool is available new
- 12:03:22measure is available there paste this
- 12:03:25formula call it as last week till date
- 12:03:28and the only difference is only where
- 12:03:31the weak rank is there you just say weak
- 12:03:33rank minus one and press enter you got
- 12:03:36last week till date and what would
- 12:03:39happen here is when you add this to the
- 12:03:41visualization you will see after a week
- 12:03:43we got on 13th so on 20th you will get a
- 12:03:47value on 21st the next accumulated value
- 12:03:50will come and whenever there is a reset
- 12:03:54there would be a reset Whenever there is
- 12:03:55increase there would be in now next day
- 12:03:57is again Monday so you will see the same
- 12:04:00value as the week start which is coming
- 12:04:03and so on it will keep on adding post
- 12:04:05that so now in spite of not having a
- 12:04:08function we able to get week till date
- 12:04:11and this week versus last week any
- 12:04:14custom month whether it is half year
- 12:04:17whether the month is 28 days whether the
- 12:04:21month is starting from 15th of a month
- 12:04:24as long as you are able to create a weak
- 12:04:26Rank and day of period or day of month
- 12:04:31the same mechanism will apply for period
- 12:04:35versus last period month versus last
- 12:04:38month and MTD versus last month MTD or
- 12:04:43ptd versus last ptd so till now we have
- 12:04:46learned you know we have MTD how get to
- 12:04:48get last month till date you have
- 12:04:50complete month data how to get the last
- 12:04:52month complete month data similarly we
- 12:04:54have done for quarter year and then we
- 12:04:56created some custom formulas for week we
- 12:04:58have not discussed very simple thing
- 12:05:00what happens when I want last days data
- 12:05:02what was my data 7 days before what my
- 12:05:05what was my data a year before or a week
- 12:05:07year before week year means 364 days
- 12:05:10today's Monday what was my my data same
- 12:05:13Monday last year how can I achieve this
- 12:05:16so for that what we are going to use we
- 12:05:17going to use the date add function and
- 12:05:20we are going to create certain trailing
- 12:05:21formula the name trailing is coming
- 12:05:23because they are behind by certain days
- 12:05:25or days behind formula as you can see so
- 12:05:27I already a new page and in this new
- 12:05:30page I'll add date from the date table
- 12:05:33and this time I don't want aggregation
- 12:05:35above the date level means I don't want
- 12:05:37to aggregate for TDS till date I just
- 12:05:39want this is my net what is my net for
- 12:05:42last day before 7 days before a year
- 12:05:45even it could be before a month so let's
- 12:05:47quickly create some Majors so on the
- 12:05:50Home tab new major is visible as of now
- 12:05:52and I'm going to click on that and let
- 12:05:54me create last date so this is going to
- 12:05:56be a date add which I'm going to use for
- 12:05:58last day but we do have a previous day
- 12:06:01function which is available so here I'm
- 12:06:03going to use calculate net date ad and
- 12:06:07in the date ad there are three arguments
- 12:06:09required the first argument is date of
- 12:06:11dat second is minus one and third one is
- 12:06:13day so it is going to trail by a day I
- 12:06:16got last day values are just a day
- 12:06:18behind now let's create last week last
- 12:06:21week is basically 7 days behind last day
- 12:06:25last week same day which is a week
- 12:06:27behind so it's going to be behind by 7
- 12:06:30days so Monday to Monday Tuesday to
- 12:06:32Tuesday Wednesday to Wednesday
- 12:06:33comparison we and let me add this into
- 12:06:35the visualization and as you can see the
- 12:06:38values are a week behind so this is 20th
- 12:06:42this was 13th same way 21st 14th a week
- 12:06:45behind now how do I get a month behind
- 12:06:47value simple create a new measure and
- 12:06:49instead of day use month and minus one
- 12:06:52minus one month behind and same last
- 12:06:56month same day you will see on 13th of
- 12:07:00November I'll get my value on 14th of
- 12:07:02November I'll get my 14th of October
- 12:07:04value I getting a month behind value
- 12:07:07same day I can do for quarter but I
- 12:07:08would like go for year and last year
- 12:07:11same day so basically what happens is
- 12:07:13every year typically we end up adding
- 12:07:16one additional day so if it is 13th next
- 12:07:19year it is 12th if it is not a leap year
- 12:07:21next year it is going to be the 12th
- 12:07:23October which is going to have the same
- 12:07:26weekday 364 is the combination which
- 12:07:29fits in the proper division of weeks so
- 12:07:31365 add one additional day so because of
- 12:07:34that same week day last year if I need
- 12:07:37so last year same week day I'm going to
- 12:07:40call I'm not going to call same day I'm
- 12:07:42going to call same week day and here
- 12:07:44instead of subtracting a year I'll
- 12:07:46subtract minus 364 days and usually on
- 12:07:51the non-leap year you will find it is a
- 12:07:53day difference when the actual data
- 12:07:55comes in in case of leap year it could
- 12:07:57be 2 days so remember the value for the
- 12:07:5913th of October and 14th of October and
- 12:08:02when I go to the
- 12:08:042019 I will start getting values from
- 12:08:0612th of October and the reason behind is
- 12:08:09the day and let's bring in week day into
- 12:08:12the picture now now let's look at what
- 12:08:15it is Saturday what this is Sunday let's
- 12:08:18scroll up and see what we had initially
- 12:08:20Saturday and Sunday now you understood
- 12:08:22why we have done that now last year same
- 12:08:24day basically it is 13th October I need
- 12:08:2713th October isn't it in that case I am
- 12:08:29not going to use - 365 I'm going to
- 12:08:32Simply use -1 year don't use 365 or 366
- 12:08:37nothing like that just subtract one year
- 12:08:40and we will get last year and when we
- 12:08:41scroll down you will see the data is
- 12:08:43actually started coming from 13th of
- 12:08:46October Sunday every year the date will
- 12:08:48change so this year it was Saturday next
- 12:08:50year it was Sunday this is how it is
- 12:08:52going to happen so this is how you
- 12:08:53create trailing formulas now these
- 12:08:55formulas are a day behind again sometime
- 12:08:58what would happen like if you have too
- 12:09:00many dates available your grand total
- 12:09:02may actually not be a year behind so if
- 12:09:05you don't have a year in the context
- 12:09:06then what would happen is let's say I
- 12:09:08have a calendar which is still 2021 so
- 12:09:10what happen my calendar is actually
- 12:09:13Trail let's say for minus one year
- 12:09:14formula my calendar even get trailed by
- 12:09:16one year when no date is in the context
- 12:09:19I reach 2020 and I have data till 2020
- 12:09:21so my values could be same for the
- 12:09:24trailing as well as this one and that
- 12:09:26you will see for the last day the grand
- 12:09:28totals are same because I have
- 12:09:30additional day available for the same
- 12:09:32week day it is again same for month
- 12:09:34definitely because we ended on October
- 12:09:36so that is why we have a little bit less
- 12:09:38value but if I increase my calendar
- 12:09:40dates you will you will see these dates
- 12:09:42are you will see if I move it by to
- 12:09:45December or let's say October 2021 you
- 12:09:48will see that the values of grand total
- 12:09:51is now same and the reason behind that
- 12:09:53that when the context is not available
- 12:09:56or the filter context is not available
- 12:09:58it moved the day a year behind or a
- 12:10:00month behind or a quarter behind but
- 12:10:03still it has covered all the dates which
- 12:10:04are available in such cases if you're
- 12:10:06using make sure either the context or
- 12:10:09the filter or slicer is adding a ear to
- 12:10:12the page or to the visualization so that
- 12:10:15we get correct values otherwise you end
- 12:10:17up getting incorrect values in powerbi
- 12:10:21we have many Dex function but starting
- 12:10:23from December 2022 we got a series of
- 12:10:27functions which are very similar to SQL
- 12:10:29Windows function now the reason we call
- 12:10:32them very similar to SQL Windows
- 12:10:34function that they do also provide us
- 12:10:36something known as order by and
- 12:10:38Partition by and based on that we can do
- 12:10:40certain calcul which were previously
- 12:10:42difficult to do and now they are very
- 12:10:45easy if we use these functions so what
- 12:10:47are these functions let's have a look at
- 12:10:49it in December 2022 we got three
- 12:10:52function offset windows and index
- 12:10:54followed by two more functions in April
- 12:10:572023 those are Rank and row number all
- 12:10:59these functions are on very similar
- 12:11:02basis they all have order by they all
- 12:11:04have Partition by and they also support
- 12:11:07access and reset now what are the key
- 12:11:10highlights of these text functions so
- 12:11:12these Tex function as I already told you
- 12:11:13are very similar to SQL Windows function
- 12:11:16performing performing calculations
- 12:11:18across related table rows based on Dex
- 12:11:21evaluation context but unlike Windows
- 12:11:23function these Dex function do not
- 12:11:25return a single value but a set of row
- 12:11:28which can be used with the functions
- 12:11:30like calculate and sumx to compute the
- 12:11:32values means they are not going to
- 12:11:33return single value so we have to go
- 12:11:35ahead and use different function like
- 12:11:37calculate or sumx to make sure in our
- 12:11:39measures we are able to get single value
- 12:11:41so these function execute in Dex engine
- 12:11:45rather than being pushed to the data
- 12:11:46source offering improved performance
- 12:11:48particularly when sarting by
- 12:11:49non-continuous columns so basically what
- 12:11:51happens is their execution happens as
- 12:11:53the Dex engine level so they will be
- 12:11:55able to provide you better performance
- 12:11:56so these functions are different and
- 12:11:59they are executed differently to give
- 12:12:01you performance gains key highlights as
- 12:12:03I already told you these functions use
- 12:12:05order by Partition by access and reset
- 12:12:07typically they are used in pair order by
- 12:12:10and Partition by one pair access and
- 12:12:12reset access and reset are usually used
- 12:12:15in visual level calculations so let us
- 12:12:17start with the offset function offset
- 12:12:19function is one of the functions which
- 12:12:21has been released in December 2022 and
- 12:12:25it's very similar to Windows function
- 12:12:27and now we're going to use that so let
- 12:12:29me start first by creating a visual on
- 12:12:31category and I will take along with the
- 12:12:34category
- 12:12:36net let me convert this into a table
- 12:12:38visual now here I would like to know
- 12:12:40what is the value of previous category
- 12:12:42now based on what based on the category
- 12:12:44sequence or based on the net sequence
- 12:12:46okay so in this manner we can comparison
- 12:12:48means based on the last one which and
- 12:12:50that's where the offset comes in play
- 12:12:52where we can actually go up and down now
- 12:12:54offset is not a table function where it
- 12:12:56goes for a table row it still need the
- 12:12:58context means by which you are it needs
- 12:13:01that row or group by for which you are
- 12:13:03going to move up and down inside the
- 12:13:05calculation so let me add a new measure
- 12:13:08and this measure is I'm going to call
- 12:13:10offset one
- 12:13:13calculate net offset now what are the
- 12:13:16things we require for offset Delta
- 12:13:18plusus one what is relation this should
- 12:13:20contain the columns for order by and
- 12:13:21Partition by with the enhancement you
- 12:13:24don't need to add Majors now so if you
- 12:13:26want to use a major into the order by
- 12:13:28you don't need to add it then you have
- 12:13:29order by blanks most of the time we are
- 12:13:31leaving that blanks Partition by where
- 12:13:33you can means let's say if I want to
- 12:13:35partition inside category or brand see
- 12:13:39the operation should happen within a
- 12:13:40partition we can do do that then we have
- 12:13:42Concepts like match by and reset which
- 12:13:44can also be used now let's start with
- 12:13:46minus one offset and we will use all
- 12:13:49selected now all selected and all
- 12:13:51depending on whether the data which is
- 12:13:53present based on that we want to take a
- 12:13:55decision or data which is also not
- 12:13:56present but present in the values want
- 12:13:59to take decision based on that I would
- 12:14:00like to take based on the data which is
- 12:14:02present so item category order by now
- 12:14:05order by let's first start with item
- 12:14:06category itself isn't it that what is
- 12:14:08the value for the last category 1 2 3 4
- 12:14:105 rest I don't need I don't need Val
- 12:14:12blanks Partition by match by and resets
- 12:14:14so let's close the offset and let's
- 12:14:16close the net by default here order is
- 12:14:19ascending now in powerbi those of you
- 12:14:21who have seen rank you know that the by
- 12:14:23default order is descending but for all
- 12:14:25the windows function the by default
- 12:14:27order by is ascending so let's add this
- 12:14:29mejor offset inside our our
- 12:14:32visualization and let me sort it on
- 12:14:34category because that's is how I've done
- 12:14:35it so as you can see here the net is
- 12:14:38trailing by one one values because I
- 12:14:40given offset one same way you can give
- 12:14:42offset 2 3 this is minus one okay now
- 12:14:45either I can make it plus one or I can
- 12:14:46change the order that is one of the two
- 12:14:48things I can do so let me do one thing
- 12:14:50let me go here in order by and let me
- 12:14:52use descending what would happen instead
- 12:14:55of trail by one now it is lead by one so
- 12:14:58Category 2 is coming in category one so
- 12:15:00next now same thing you could have
- 12:15:01achieved by ascending by using plus one
- 12:15:03so I removed the descending and let me
- 12:15:05remove the minus one also so same result
- 12:15:07I got so in this manner offset works now
- 12:15:10this is one way variation of offset now
- 12:15:12let's run on the second variation of
- 12:15:14offset where now I don't want to sort on
- 12:15:16categorical values now this would be
- 12:15:17really useful when we do month-on-month
- 12:15:19comparison but let's look for the
- 12:15:21comparison which is basically for net so
- 12:15:23I want to travel by net my top category
- 12:15:26I should differentiate with second top
- 12:15:28second top with third top now comparison
- 12:15:29is happening between the top ranks then
- 12:15:32how do I do that so then what would be
- 12:15:33my order by in case of this new major
- 12:15:35which I'm going to call offset new I
- 12:15:37don't want to do by the categories I
- 12:15:39want to do by net major and see I have
- 12:15:41not added the major inside my all
- 12:15:43selected in relation it is not added and
- 12:15:45let me use descending and let now let me
- 12:15:48bring this inside now I need to sort it
- 12:15:50on net to understand this so category
- 12:15:53now why I'm getting in category 4
- 12:15:54because I used plus one I said in
- 12:15:56descending order plus one but in
- 12:15:57descending out what I need minus one so
- 12:15:59now the topper would be trailed so
- 12:16:01second topper will get the first topper
- 12:16:03in this value so now whether you need
- 12:16:05second with first or first with second
- 12:16:06you can decide now this is really
- 12:16:08helpful the offset is going to be really
- 12:16:10helpful in month on month comparison
- 12:16:12quarter on quarter comparison and year
- 12:16:14on year comparison now let me do one
- 12:16:16thing let me bring in a new visual for
- 12:16:17you and in this visual what I'm going to
- 12:16:19do here is I'm going to do a little bit
- 12:16:21of trick so what I'm going to do here is
- 12:16:23I will bring in year I will bring in
- 12:16:26quarter I will bring in month and I'll
- 12:16:29bring in
- 12:16:32net and let me instead of month number
- 12:16:34let me bring in month
- 12:16:36here what I want here first of all I
- 12:16:38want month on month so how do you get
- 12:16:40off offet of month on month very simple
- 12:16:42challenge month on month is a text it's
- 12:16:44not going to work easily so I would like
- 12:16:46M and offset month on month offset how
- 12:16:48do I get calculate net offset what is
- 12:16:52Delta minus one what is relation all
- 12:16:55selected now here comes the challenge
- 12:16:57month is a text and it s order is not
- 12:17:00correct so how do I take this so here
- 12:17:02what I'm going to do is date table month
- 12:17:05year I need to take month year as well
- 12:17:07as I'll take month year sort so let's
- 12:17:10take both of them month year and month
- 12:17:12year sort both we have taken now we will
- 12:17:14go and so relationship is done how do I
- 12:17:17sort I need to sort on or order by on
- 12:17:19month year
- 12:17:22sort do I need to partition as of now I
- 12:17:25don't seem I need a partitioning but we
- 12:17:27may or
- 12:17:28may let's bring this m offset inside the
- 12:17:31visualization so what we see here is
- 12:17:33basically that we're able to get this
- 12:17:35month or month and let's not look at the
- 12:17:37quarter and this one because quarter
- 12:17:39offset doesn't seem like this TW first
- 12:17:41of all I should not have got anything
- 12:17:43here in the Q4 I'm getting something so
- 12:17:44we are not looking but here in the month
- 12:17:46things seems to be correct but there is
- 12:17:48a challenge I'm not getting this one for
- 12:17:50first month so let me change this visual
- 12:17:52a little bit and let me duplicate this
- 12:17:54for this so Ive duplicated it and let me
- 12:17:56delete this first visual I don't need
- 12:17:58but if I use here this visual I
- 12:18:00duplicated it and let me remove ear and
- 12:18:02quarter from here you can see that this
- 12:18:05measure has properly worked isn't it for
- 12:18:07every month I able to get an offset
- 12:18:08minus one offset easily m is working
- 12:18:11perfectly fine why not here and this is
- 12:18:13what we call the inclusion of all the
- 12:18:15participant in the formula so what's
- 12:18:18happening here is basically the quarter
- 12:18:20and year are also the participants which
- 12:18:22are not been considered so even though
- 12:18:24we have not done the partitioning inside
- 12:18:26the quarter and year Auto partitioning
- 12:18:28is happening and that is something you
- 12:18:29might have seen in the rank function
- 12:18:30also so now what we are going to do is
- 12:18:32we are going to include that so we'll
- 12:18:33say Okay include the quarter also so
- 12:18:35date quarter and include the year also
- 12:18:38date year and the Sorting don't need to
- 12:18:40change because the Sorting month year is
- 12:18:42still valid across these month year sort
- 12:18:46we have taken month year sort it is not
- 12:18:48month sort now what you seeing here what
- 12:18:50we see here is okay this is fine this
- 12:18:52was previously also happing now this is
- 12:18:53also Happening Now across year and
- 12:18:56quarter we are able to get M and the
- 12:18:58month year actually only month year
- 12:19:00visual also retaining the same so in
- 12:19:02both cases it is working now you might
- 12:19:04have understood how I want to get the
- 12:19:05quarter very simple I'll keep quarter
- 12:19:07year and change the Sorting of quarter
- 12:19:09year now quarter Year is already in
- 12:19:10sortable format so I don't need a
- 12:19:12sortable quarter here here is easy but
- 12:19:14tell me will I take three measures and
- 12:19:16then how would I ensure the quarter is
- 12:19:17going to be at quarter's position and
- 12:19:18month is going to be a month position
- 12:19:20and so what I'm going to do is I'm going
- 12:19:21to create little bit complex measure
- 12:19:23this time around so you understood how
- 12:19:25offset
- 12:19:26work and now let me take this
- 12:19:29calculation here and I'm going to take
- 12:19:31this use this calculation inside a new
- 12:19:33measure which is basically po period on
- 12:19:36period what I'm going to do is in Period
- 12:19:37of period I'll create a switch statement
- 12:19:39switch true and in switch true I'm going
- 12:19:42to use is in Scope when we use is in
- 12:19:45scope we have to remember that the one
- 12:19:47which is at the bottom of the Hier so
- 12:19:49let's consider this Matrix in this
- 12:19:51Matrix visual at the bottom of the H is
- 12:19:54month here when we look at the row
- 12:19:56columns followed by quarter and year ear
- 12:19:59is on the top month is on the lowest
- 12:20:01whenever you use is in scope you should
- 12:20:04handle the lowest one first because
- 12:20:06understand ear is always in scope other
- 12:20:09than grand total quarter is in always in
- 12:20:12scope other than the year total month is
- 12:20:15only in scope for month column so here
- 12:20:18year is in scope here as well as here as
- 12:20:20well as here here is only not in scope
- 12:20:23in grand total we can decide what we
- 12:20:24want in grand total when nothing is in
- 12:20:26scope so now we know our Scopes so is in
- 12:20:29scope what should be the first one month
- 12:20:32year and the column which has been taken
- 12:20:34in the visual is really important so
- 12:20:35month has been taken in the visual and
- 12:20:37at that time which formula I'm going to
- 12:20:38use I already copied that formula so
- 12:20:40this formula is going to work now second
- 12:20:42is is in scope which should be second is
- 12:20:44in scope
- 12:20:45quarter so date quarter is in scope what
- 12:20:48formula you need I need almost similar
- 12:20:50formula but I need this for quarter so
- 12:20:51let's start changing offset minus one
- 12:20:53all selected I don't need monthier
- 12:20:55columns quarter and year what should it
- 12:20:57order by it should be order by quarter
- 12:20:59see start giving the error if you're not
- 12:21:01using so minus one is my Delta my
- 12:21:03relationship is all selected quarter
- 12:21:06year and year everything which is
- 12:21:07applicable to this particular row okay
- 12:21:09relation order by water here I don't
- 12:21:12want partition within here I want it to
- 12:21:13go across here and that's why I'm not
- 12:21:15taking Partition by and that's why I'm
- 12:21:16including the complete combination so
- 12:21:18that it can go across so very good you
- 12:21:20can copy this formula now now you can
- 12:21:22take a decision whether you want to
- 12:21:23write down is in scope ear because if
- 12:21:24you write down is in scope ear you have
- 12:21:26a flexibility to write it down the grand
- 12:21:28total also but right now I don't not
- 12:21:30much interested in handling the grand
- 12:21:32total but this is one of the way you can
- 12:21:33handle the grand total okay now think
- 12:21:35about it when we are comparing month on
- 12:21:37month quarter on quarter year and on
- 12:21:38what I'm going to compare on the grand
- 12:21:39to do I really want to compare something
- 12:21:41or not that is the decision you have to
- 12:21:42take based on that you decide and
- 12:21:43there's nothing in the context of the
- 12:21:44grand total there's no year there
- 12:21:46there's no quarter here so what is going
- 12:21:47to trail that is also an important
- 12:21:49question okay so what we saying
- 12:21:50calculate now ear is in the scope or gr
- 12:21:52R is in the so assume the year is in the
- 12:21:54scope so I only need ear I don't need
- 12:21:55quarter I don't need month and what it
- 12:21:57should be order by Year my year is
- 12:21:59number which is sortable so I handled
- 12:22:01all three conditions so what we have
- 12:22:02done is we have used this season scope
- 12:22:04and using this scope we have now created
- 12:22:06a calculations which is going across
- 12:22:08month quarter and year and three
- 12:22:10different level it is handling in three
- 12:22:12different manner now we need to
- 12:22:13understand these calculations so let's
- 12:22:15pull in this measor inside this
- 12:22:16visualization now you can see for the
- 12:22:18first year quarter and month there is no
- 12:22:20value it shouldn't be because I I don't
- 12:22:21have anything before that isn't it month
- 12:22:23we already tested let's look at the
- 12:22:25quarters so this value matches with this
- 12:22:27value of 2018 here quarter matches with
- 12:22:30quarter now when I go to Q2 the value
- 12:22:33matches with previous quarter I to
- 12:22:34scroll down little bit or make this
- 12:22:36visual bigger or what I can do is I can
- 12:22:38move up so month is removed now I can
- 12:22:40compare year also again easily at the
- 12:22:42year values so we're able to now compare
- 12:22:45month on month quarter on quarter year
- 12:22:46on year in the same visual same Matrix
- 12:22:48visual we are able to do is in scope has
- 12:22:50helped us offset has helped so this is
- 12:22:52how powerful offset function is and
- 12:22:54there could be many things which you can
- 12:22:55do with this it makes your travel easy
- 12:22:57across the rows based on categorical
- 12:22:59data or a major so go ahead and try that
- 12:23:01out one of the most interesting function
- 12:23:05in these functions offset window index
- 12:23:09rank and row number is window function
- 12:23:12itself now very similar to SQL Windows
- 12:23:15functions but window function is really
- 12:23:17interesting it allows you to create so
- 12:23:19many things running total rolling totals
- 12:23:23MTD qtd YTD lot of possibilities are
- 12:23:28there all the function offers different
- 12:23:30kind of possibilities but Windows
- 12:23:32function has so many things which you
- 12:23:34can do and it is because it provides you
- 12:23:38those two arguments where basically you
- 12:23:40can decide the position of traveling so
- 12:23:43let's look at this function so let me
- 12:23:45add a new page and in this new page I
- 12:23:48will start with month here this time
- 12:23:51because while we can do traveling on the
- 12:23:54categorical variable other than the time
- 12:23:56not going to make much sense unless we
- 12:23:58have very specific example and time is a
- 12:24:00very good example month year and along
- 12:24:03with that let's have net table visual
- 12:24:05first thing is I want a rolling so how
- 12:24:07do we do rolling we have formulas in the
- 12:24:09past so let me tell you the first of all
- 12:24:11rolling formula without Windows how you
- 12:24:14let me create a new measure so let's say
- 12:24:16I want rolling two and rolling two is
- 12:24:18easy to understand so usually we do
- 12:24:20rolling tool like usually calculate net
- 12:24:23dates in period is something we use in
- 12:24:25dates in Period what we want a date
- 12:24:27column basically the first argument is a
- 12:24:30date column start date number of
- 12:24:32interval and intervals so what we do is
- 12:24:35let's say we give have end dat here so
- 12:24:37we start giving intervals in negative
- 12:24:39and then inter well basically month
- 12:24:41quarter year what you can get this is
- 12:24:43the date in Period so what first thing I
- 12:24:45will use is a date column so date of
- 12:24:47date second is start date so we usually
- 12:24:50use max of date of date means whatever
- 12:24:53is current Max date you take that then
- 12:24:55I'll use minus 2 because I want 2 months
- 12:24:58rolling usually we do 12 months rolling
- 12:25:00but 2 months is easy to understand we
- 12:25:02can easily compare the total so this is
- 12:25:04rolling two okay we got rolling two let
- 12:25:07me bring in Rolling two here now as you
- 12:25:10can understand the first one is same
- 12:25:12because there is no previous month now
- 12:25:14this is total of these two the second
- 12:25:16row November then December is total of
- 12:25:18November and December you and see the
- 12:25:21number which is 18 68 which is very
- 12:25:24similar to some of these and similarly
- 12:25:26you can see because if it's more then it
- 12:25:28would not have survived if it is too
- 12:25:30high then it would not have been 2
- 12:25:32months total it is more than that so now
- 12:25:34we understand that it is only totally
- 12:25:36for 2 months so rolling is there second
- 12:25:38formula which Windows also easily is
- 12:25:40cumulative now today how do we do
- 12:25:42cumulative without using Windows so
- 12:25:44again I'll create a new measure and give
- 12:25:46you an example of cumulative so if I
- 12:25:48have to do a cumulative measure let's
- 12:25:50say cumulative sales how do I do I'll do
- 12:25:53calculate net filter all of date so we
- 12:25:57have to ignore everything which is
- 12:25:58coming on the date and then we say and
- 12:26:00the reason is I I don't want to say that
- 12:26:02if you have taken the filter of the year
- 12:26:05then I'll not give cumulative if you
- 12:26:06taken filter of the date I'll not take
- 12:26:08give you a cumulative or if you have
- 12:26:09taken filter of month I not so that's
- 12:26:11why we are ignoring all the filters on
- 12:26:12the date and then we say date of date
- 12:26:15and this works even for month quarter
- 12:26:16end that's why we start with the basic
- 12:26:18unit of date that I'm doing cumulative
- 12:26:20for each date and then it will roll up
- 12:26:22to month quarter and Year date of date
- 12:26:24is less than equal to Max of date of
- 12:26:27date so in the context whatever Max date
- 12:26:30is available I will take less than equal
- 12:26:33that so max of date of date and then we
- 12:26:35close filter and the calculate we got a
- 12:26:38new mejor which is cumula sales let me
- 12:26:41bring in this let me also bring in this
- 12:26:43inside the now in this one you see the
- 12:26:45total is continuously increasing until
- 12:26:47the end of time it will keep on
- 12:26:49increasing and even if you don't have
- 12:26:51the data because your normal measures
- 12:26:53will stop as soon as you get blank but
- 12:26:56this will not stop because it's still
- 12:26:57getting the data from the past from the
- 12:26:59beginning of the date you want to
- 12:27:01control then you have to give additional
- 12:27:02filter so now we understand that you
- 12:27:04know the basic way of doing these things
- 12:27:07before the windows function now how to
- 12:27:09do this using window function so let me
- 12:27:12duplicate this Visual and remove
- 12:27:14additional stuff now again we'll start
- 12:27:16with rolling again new major Home tab is
- 12:27:19open we can click on new major there and
- 12:27:21the major this time again I'm going to
- 12:27:23create rolling two but this time the
- 12:27:26rolling to would be created from Windows
- 12:27:28function so let's understand this
- 12:27:30function so first calculate net and now
- 12:27:33I'll use the window function in the
- 12:27:35window function let's understand the
- 12:27:36argument from offset type of offset two
- 12:27:40offset type of offset then we have the
- 12:27:43normal one relation order by blanks
- 12:27:47Partition by match by and reset from
- 12:27:51number type absolute or relative whether
- 12:27:54it's absolute or relative What's happen
- 12:27:57in case of rolling rolling is basically
- 12:28:00relative minus one to0 two rows and what
- 12:28:03is cumulative cumulative is partially
- 12:28:06absolute partially relative from the
- 12:28:08absolute Z row to relative zero relative
- 12:28:11zero is current row so what happens in
- 12:28:14this case is the relative position is
- 12:28:16with respect to current row so my
- 12:28:18current row is let's say December then
- 12:28:21November is minus1 and January is + one
- 12:28:25so now let's start creating this
- 12:28:27function so -1 why not Min -2 because
- 12:28:30from -1 to 0 two only we are considering
- 12:28:34which position relative position
- 12:28:36relative to the current one then what is
- 12:28:39the next one I want zero what is this
- 12:28:42zero this is zero is also relative
- 12:28:44relative position the current rows
- 12:28:47relative zero position comma all
- 12:28:50selected or all we use all because even
- 12:28:53if the data is not present I want to
- 12:28:54some all month year so what we'll use in
- 12:28:57inside this one all month year but month
- 12:29:00year cannot sort so we'll use all month
- 12:29:02year sort this is the relation we want
- 12:29:05then what is the next order by order by
- 12:29:08what we can order by only only month
- 12:29:10year sort then that is why in the
- 12:29:13relation we have month year sort do I
- 12:29:16need anything else no I don't need
- 12:29:18anything else rename this one and commit
- 12:29:21it rolling to by window function let me
- 12:29:24drag this inside the visualization you
- 12:29:27can see very similar results here same
- 12:29:30rolling to results so rolling to from
- 12:29:33Windows and rolling to from the
- 12:29:35traditional mathod whenever we can use
- 12:29:37Windows function we prefer the way of
- 12:29:39calc ation is a little bit different so
- 12:29:42it should give us the advantage now we
- 12:29:44want to create cumulative and this
- 12:29:46cumulative measure is going to become
- 12:29:48base of many other measures let's see so
- 12:29:51how do we create cumulative in case of
- 12:29:53window so let's begin a new measure
- 12:29:54first of all measure tool is open and
- 12:29:57under that I have new measure and I will
- 12:29:59now create a measure cative net using
- 12:30:02Windows calculate net window function
- 12:30:06from where I should start from or one
- 12:30:09one absolute till which place I should
- 12:30:12go to zero of relative I want to go zero
- 12:30:16relative position what is my relation
- 12:30:18here I can give all data I want to
- 12:30:20include the complete date table then
- 12:30:23order by order by and because I have
- 12:30:25included the table it should allow me
- 12:30:27the order by date do I need anything
- 12:30:29else I don't think I need anything else
- 12:30:31right now I should be able to get a
- 12:30:33cumulative net using the window function
- 12:30:37let me add this to visualization and as
- 12:30:39you can see see it is also showing the
- 12:30:42cumulative results continuously
- 12:30:44increasing and should give me the same
- 12:30:47total at the end so on the last month
- 12:30:50the total is same as grand total and it
- 12:30:52will continue even if you don't have
- 12:30:54data so similar behavior of cumulative
- 12:30:57net with cumulative sales from the
- 12:30:59traditional method so both traditional
- 12:31:01method and the window method for
- 12:31:04cumulative giving same results now what
- 12:31:06we are going to do interesting thing is
- 12:31:08we'll take this cumulative method keep
- 12:31:10on partitioning it month quarter and
- 12:31:12year and we'll get MTD qtd and YTD very
- 12:31:15simple just set Partition by you get MTD
- 12:31:18qtd YTD how so let me rename and
- 12:31:21duplicate this window one duplicate
- 12:31:25window 2 now let's remove something
- 12:31:28which we don't need I don't think even I
- 12:31:30need the first visual we have learned
- 12:31:31using time intelligence how to do MTD
- 12:31:34qtd andt I'll only going to keep
- 12:31:36cumulative here in the visual and let me
- 12:31:38copy this formula using the major to new
- 12:31:40major let me duplicate
- 12:31:42it net MTD window function remain same 1
- 12:31:47absolute 0o relative All Dates order by
- 12:31:50date but now we will add after the order
- 12:31:52by leave the blanks Partition by what I
- 12:31:55want partition I want to partition it on
- 12:31:58date month here so MTD function is ready
- 12:32:02by just partitioning the cumulative
- 12:32:05Windows code on month does it won't work
- 12:32:09seems like month total isn't it seems
- 12:32:11very similar to month total how do I
- 12:32:13differentiate and to do that actually we
- 12:32:15need to bring in one visual with the
- 12:32:17dates at least for MTD we need dates and
- 12:32:20I'll replace the month here by date so
- 12:32:23in the first visual now you can see that
- 12:32:25the data is getting added up till the
- 12:32:28end of the month and there is a reset
- 12:32:30which is happening at the start of the
- 12:32:32month same way when you and another
- 12:32:34month totaling up till the end of the
- 12:32:36month and reset happening at start of
- 12:32:39theth month MTD behavior let's do for
- 12:32:42qtd copy this formula again new major
- 12:32:45from the Major Tool and just we need to
- 12:32:48change qtd and Partition by what quarter
- 12:32:52it should be quarter here actually and
- 12:32:54my quarter is actually quarter here
- 12:32:56let's add this to visualization and now
- 12:32:59you can see the reset is happening after
- 12:33:02the quarter so the first month value is
- 12:33:04same and if I look at the day level also
- 12:33:06you will see that on the 1st January
- 12:33:08only the reset is happen happening if I
- 12:33:11go to first FA there is no reset for
- 12:33:13quarter now you would have understood
- 12:33:15ear is really simple same formula Major
- 12:33:18Tool is open new major just go ahead and
- 12:33:22change the name and the Partition by add
- 12:33:26this to visualization as you can see
- 12:33:29reset only happen once a year Windows
- 12:33:32function giving us MTD qtd YTD running
- 12:33:36total ruling total there could be there
- 12:33:38could be n number number of such things
- 12:33:40which you can do using Windows functions
- 12:33:42so keep on exploring let's start with
- 12:33:45the index function the index function
- 12:33:47can be used to identify top bottom
- 12:33:50performer top first performer second
- 12:33:52performer by value and name so let's
- 12:33:54begin our journey by bringing in
- 12:33:57category in a visual along with the
- 12:33:59category I would like to bring in net
- 12:34:02inside this
- 12:34:05visualization table
- 12:34:07visual now let me create a majure which
- 12:34:10is going to give me the top category Top
- 12:34:13by what top by the category names or top
- 12:34:16by the net I need it by net isn't it so
- 12:34:20top one cat and I'm going to use the
- 12:34:23function which is known as
- 12:34:25index index which position first thing
- 12:34:29is
- 12:34:30position then relation order by blanks
- 12:34:36Partition by if you need the within
- 12:34:39let's say within brand what is the top
- 12:34:41category or within the year which is the
- 12:34:43top month match by I need the topper one
- 12:34:48what is the relation all item
- 12:34:52category what is next order by order by
- 12:34:55what net but ascending or descending
- 12:34:58topper means
- 12:35:00descending in case of net topper means
- 12:35:03descending I don't need to give next of
- 12:35:05the argument so let me bring this inside
- 12:35:08the visualization
- 12:35:10it's giving me the name of the top
- 12:35:12category and as you can see the top
- 12:35:14category is Category 2 so this would
- 12:35:16remind you of a function top n which can
- 12:35:18also give you the top category but the
- 12:35:20challenge with the top end function is
- 12:35:22if you say top n 2 N is two in top and
- 12:35:27it's going to give you two categories
- 12:35:28not one I want the second topper how do
- 12:35:31I get that very simple here in the index
- 12:35:38function uh to Second category and just
- 12:35:41change index by
- 12:35:43two you got the second topper category 4
- 12:35:47is the second topper you need bottom
- 12:35:50performer use minus one or ascending you
- 12:35:55will get it if you even put this on the
- 12:35:57card visual you will get the
- 12:36:00results now you may be asking why this
- 12:36:03is repeating can we control it and I'll
- 12:36:06tell you how to control it let's use
- 12:36:11calculate max
- 12:36:13of item
- 12:36:16category comma then we will use keep
- 12:36:18filters we don't want it to repeat so we
- 12:36:20use keep filters on the index keep
- 12:36:23filters on the index and the expression
- 12:36:26will keep it as it is so this will work
- 12:36:28as values and
- 12:36:30filter and we will now close the key
- 12:36:32filters and calculate and bring that in
- 12:36:36and as you can see it can now filter the
- 12:36:38visual if require so we can duplicate
- 12:36:41remove the additional
- 12:36:44items and you will see the visual is
- 12:36:46getting filter and the reason I use this
- 12:36:49formula was a little bit different
- 12:36:51because I actually now want the topper
- 12:36:54value what is the value the topper had
- 12:36:56so I'll create another mejor and in this
- 12:36:59mejor I want the net value of
- 12:37:03topper and for that I'm going to replace
- 12:37:06this Max category by net so I want to
- 12:37:09keep the formulas almost similar and
- 12:37:11then index is
- 12:37:16one let's bring this inside the
- 12:37:18visualization this is the topper value
- 12:37:20but if you want to compare with the
- 12:37:22topper value how much percentage you are
- 12:37:25of the
- 12:37:26topper then what you can do is you can
- 12:37:29actually avoid using this keep filters
- 12:37:41if you Avid keep filters then this value
- 12:37:44will repeat for all the categories only
- 12:37:47when you are inside the category View
- 12:37:49and you can compare how much percentage
- 12:37:51you are of category similarly if you
- 12:37:53want to know bottom
- 12:37:56performer very
- 12:37:58easy either use minus one or sort by
- 12:38:01ascending one of the two thing will give
- 12:38:03you bottom performer so instead of top I
- 12:38:06now want bottom performer bottom first
- 12:38:09bottom second bottom third everything is
- 12:38:13possible just go ahead and change the
- 12:38:15number in the index function and you
- 12:38:18will get it so the bottom performer
- 12:38:21is Category 5 with the value of 615 K so
- 12:38:27offset function makes it really easy to
- 12:38:30find it you can use Partition by to find
- 12:38:32is it within inside a partition and this
- 12:38:35function opens New Opportunities while
- 12:38:38you're dealing with this in the
- 12:38:39visualization now let's understand rank
- 12:38:42function you already have a rank X which
- 12:38:44is very similar to this function but
- 12:38:46this function is different in its
- 12:38:48Behavior the way it is used and one of
- 12:38:51the biggest advantage of this function
- 12:38:53is it can be used to give a rank for a
- 12:38:55major by considering a column also and
- 12:38:58I'll give you that by an example so let
- 12:39:00me first of all find out what rank we
- 12:39:02already created so if you remember in
- 12:39:04the past we created rank on the net and
- 12:39:06it was created on brand let me bring
- 12:39:08that ins inside the visualization and
- 12:39:11let me bring in brand also this rank was
- 12:39:13created on net so let's add net into the
- 12:39:15visualiz thought on net so you can
- 12:39:17understand the rank patter so how did I
- 12:39:18get this rank so we use the rank X
- 12:39:20function now we use the another function
- 12:39:22for the rank which is rank function rank
- 12:39:25net one equals to rank ties first thing
- 12:39:29it ask for ties second thing it ask for
- 12:39:31relation which is something which I all
- 12:39:33or all selected item brand order by what
- 12:39:35order by you want to give blanks in case
- 12:39:37you have blanks Partition by in case you
- 12:39:39want to partition the rank within
- 12:39:41something match buy and reset these are
- 12:39:43the standard things which we have in the
- 12:39:45any window type of function it's not
- 12:39:48true SQL window it's type of that what
- 12:39:50is my ties ties is dance Dance means
- 12:39:52even if the rank repeat the next rank
- 12:39:54would be the continuous rank so 112 it's
- 12:39:57not 1 13 I can use all or all selected I
- 12:39:59let me use all selected item brand now
- 12:40:02order by something which has been
- 12:40:03enabled only major so you don't need to
- 12:40:05have it part of the relation I can
- 12:40:07simply give order by net ascending and
- 12:40:10rank X was by default descending rank is
- 12:40:14basically the series of function which
- 12:40:16uses these kind of order by and
- 12:40:18Partition by all of them is by default
- 12:40:20ascending so we have to use order by
- 12:40:22descending because we want the net to be
- 12:40:24sought by descending now this function
- 12:40:26is also better for handling ties the
- 12:40:29reason for that is basically in the
- 12:40:31order by I can simply use item brand now
- 12:40:33if I use the brand name it will
- 12:40:34immediately break the ties if I have the
- 12:40:36same number so breaking tie is really
- 12:40:38easy in this function fun well that was
- 12:40:40little bit complicated in case of rank
- 12:40:42so rank breaks T now I would like to
- 12:40:45take another case I go to my sales table
- 12:40:47first of all I go to my customer I bring
- 12:40:49in customer name t date and net IND
- 12:40:52visualization I first sort it on
- 12:40:54customer and second s with the shift
- 12:40:56button on sales date I want to know the
- 12:40:58first sale of the customer so here what
- 12:41:00I want to do is I want to rank the
- 12:41:02customer sales States I don't want to
- 12:41:04rank them by net I want to rank them by
- 12:41:06sales State can I do it in rank X in the
- 12:41:09r rank expression where we use the major
- 12:41:11you can't use a column if you are
- 12:41:13creating a rank major in a rank column
- 12:41:16you can do that but not in a rank major
- 12:41:18and that's where the rank function comes
- 12:41:21handy unlike rank X where you can use
- 12:41:24only a major in the expression of a
- 12:41:26measure rank functions allows you to use
- 12:41:29a column also how let's try that out new
- 12:41:31measure from the Home tab and I'll
- 12:41:33create rank customer date rank what I
- 12:41:37need ties then something is repeat
- 12:41:39use dance relation is really important
- 12:41:41here and I'm going to create this
- 12:41:43relation using summarize all selected
- 12:41:45sales because the things are coming from
- 12:41:48two different table customer which is a
- 12:41:51dimension to the sales and the sales
- 12:41:53date which is coming from the sales that
- 12:41:55is why I need and I need definitely the
- 12:41:57all selected or the all data and that's
- 12:42:00that is why I'm using all selected on
- 12:42:02the sales inside the sumarize from
- 12:42:03customer what I need I need name what
- 12:42:05else I need from the sales from the
- 12:42:07sales I need the sales date
- 12:42:10now comes the order bu in the order by
- 12:42:12what I need I need order byy of sales
- 12:42:15date ascending I need ascending rank
- 12:42:17blanks I can leave empty I need
- 12:42:19Partition by customer which is customer
- 12:42:22name Partition by customer name I don't
- 12:42:25need match by and reset I can leave it
- 12:42:27and let me bring in now this measure let
- 12:42:29me bring this inside the visualization
- 12:42:31now as you can see as you can see we
- 12:42:33have a rank of part the Sal State inside
- 12:42:36each customer
- 12:42:39this is something which is not possible
- 12:42:41using rank X function also you can
- 12:42:43easily break ties here by including
- 12:42:45additional parameter to order by let's
- 12:42:48start with the function row number now
- 12:42:50row number function can provide you the
- 12:42:53continuous sequence of the number or a
- 12:42:55visualiz now for quite a some time some
- 12:42:58of you are asking let's say I'm creating
- 12:43:00a table Visual and in that visual I
- 12:43:02would like to give you know sequence
- 12:43:04number how do I give that sequence so
- 12:43:06this function is going to enable that
- 12:43:07I'm going to take a little bit different
- 12:43:09example and measure so what I'm going to
- 12:43:11do here is basically I will bring item
- 12:43:14name from the item table and I would
- 12:43:17like to bring from the sales table the
- 12:43:19sales State Sal State and now I would
- 12:43:22like to bring one major NE now here I
- 12:43:24want to create a row number what would
- 12:43:27be row number based on row number can be
- 12:43:29based on any of my condition let's say I
- 12:43:31say first item and then order by sa
- 12:43:33State and then if really I can consider
- 12:43:36the net or it could be based on net of
- 12:43:39item and Sal state so we can decide the
- 12:43:41criteria the way we wanted to do it and
- 12:43:43based on that we can create so let's
- 12:43:45start a measure so I'll call this as row
- 12:43:48num and use the function row number now
- 12:43:51let's look at the syntax of row number
- 12:43:53first of all it is asking for a relation
- 12:43:55then for order by lengths Partition by
- 12:43:57match and reset so relation means it
- 12:43:59should include the columns which are
- 12:44:01there in the visualization which want to
- 12:44:03consider order byy how do we order that
- 12:44:05byy and blanks so now let's start with
- 12:44:08so I'll use all selected because I want
- 12:44:10the item and sales date whatever is
- 12:44:12available in the visualization to use it
- 12:44:14but the challenge is item and sales date
- 12:44:16are not from the sales table so for that
- 12:44:17I need to change this code little bit I
- 12:44:19need to use summarize function first
- 12:44:21summarize all selected sales I whenever
- 12:44:23we take the central table in the star
- 12:44:26schema we should be able to use the
- 12:44:28related Dimension item name comma is
- 12:44:31date this is what I need order by what
- 12:44:33so I'll use order by let's use that
- 12:44:35Partition by I don't need any kind of
- 12:44:37partition I want the continuous R number
- 12:44:39so let me add the r now you seeing the
- 12:44:41numbers definitely not making sense to
- 12:44:43us okay so let's sort on the net so when
- 12:44:46I done the sort ascending and because
- 12:44:48the sort is by default ascending you can
- 12:44:50see you are getting the r number now
- 12:44:52here we did not talk about TI Breakers
- 12:44:55it did not say order by net then item
- 12:44:58then sales dat no it's automatically
- 12:45:00broken those ties let me do instead of
- 12:45:03order by net can I use item item name we
- 12:45:06do that let me sort on the item then
- 12:45:08higher automatically breaken taken care
- 12:45:10it's acting as a WR number now let's
- 12:45:12take a case what happens if we forget
- 12:45:14something is there in the visualization
- 12:45:16let me bring in the ID inside the
- 12:45:18visualization you start seeing a
- 12:45:20repetition isn't it why are you seeing
- 12:45:22the repetition now the reason for that
- 12:45:24is that the city ID is not considered
- 12:45:27inside the relation so let's add the
- 12:45:29city ID also here Sal City ID whichever
- 12:45:32City ID you taken geography Sayes and
- 12:45:34immediately you see the row numbers are
- 12:45:36correct again and if you forgot some
- 12:45:38something it may not give the correct
- 12:45:41answer so whatever is participating in
- 12:45:44the table basically those which are
- 12:45:46getting grouped you need to use that now
- 12:45:48if you want this row number to reset
- 12:45:50let's say after partition let's say you
- 12:45:52want this row number to reset after
- 12:45:54every name then we can use Partition by
- 12:45:56name and let me remove the city because
- 12:45:58otherwise there are too many items on
- 12:46:00that and remove this city from the row
- 12:46:03number relation also order by and now
- 12:46:05let me use Partition by and it is item
- 12:46:08name name I Chang my formula now we need
- 12:46:11quickly scroll down the best way could
- 12:46:13have been we should have used Matrix and
- 12:46:16now you can see item 10 and item 10 you
- 12:46:18can see a reset happening in the rank
- 12:46:20because it's partition inside the item
- 12:46:22so row number is allowing you now it can
- 12:46:24give you continuous row numbers it can
- 12:46:26give you within a partition just give
- 12:46:28the combination and you will get it it's
- 12:46:30automatically breaks the ties you don't
- 12:46:32have to explicitly do it but yes if you
- 12:46:34want to do use order by to break in a
- 12:46:37particular order so another function set
- 12:46:39of five functions as of now which is
- 12:46:41offset Windows index Rank and row number
- 12:46:45which uses these order by Partition by
- 12:46:47very similar to Windows function of SQL
- 12:46:50not same that has a different objective
- 12:46:53it has different objective execution
- 12:46:55wise they are also a little bit
- 12:46:56different but they provide you whole lot
- 12:46:58of flexibility to create the Maes which
- 12:47:01are really difficult to create otherwise
- 12:47:03let me rename
- 12:47:06this before I could have completed the
- 12:47:09editing of my complete code February
- 12:47:122024 release has arrived and in February
- 12:47:152024 we have got visual calculations so
- 12:47:19we are going to have a deep dive into
- 12:47:21the visual calculations and going to
- 12:47:24look at the various functions available
- 12:47:27in the visual calculations these are the
- 12:47:29Dex function which we can use at the
- 12:47:32visual level to understand this we have
- 12:47:34to also look at the release notes of
- 12:47:37visual calculations of February 2024 so
- 12:47:40unlike other functions we have not taken
- 12:47:43you to the release node specifically for
- 12:47:45the visual calculation functions I'm
- 12:47:47going to take you through the
- 12:47:49documentation I am on the February
- 12:47:532024 release notes feature summary and
- 12:47:56if you scroll little bit down you will
- 12:47:59see all the features and one of the
- 12:48:01features which has been released in
- 12:48:04February 2024 is visual calculations let
- 12:48:08we click on that and go to the feature
- 12:48:11so let's read the release notes a new
- 12:48:13way of doing calculations has arrived
- 12:48:16you can now add the calculation directly
- 12:48:19on your visual using visual calculation
- 12:48:22which are Tex calculations remember
- 12:48:24these are T calculation that are defined
- 12:48:27and executed directly on visual a
- 12:48:30calculation can refer to any data in the
- 12:48:33visual including columns measures or
- 12:48:36other visual calculations means you can
- 12:48:39refer the other visual calculation also
- 12:48:41this approach removes complexity of the
- 12:48:44semantic model and simplify the process
- 12:48:47of writing Dax you can use visual
- 12:48:50calculation to complete common business
- 12:48:53calculations such as running sum moving
- 12:48:56average Etc visual calculations make it
- 12:48:59easy to do calculation where previous
- 12:49:02the very hard or almost impossible to do
- 12:49:05so very interesting feature how do you
- 12:49:08enable it you have to go to options and
- 12:49:10setting options preview feature select
- 12:49:13visual calculation and click on okay I'm
- 12:49:15going to Showcase you that and then
- 12:49:17there are certain examples have been
- 12:49:19given there has been a separate blog on
- 12:49:22the visual level calculations also on
- 12:49:25the blog. powerbi.com and it has been
- 12:49:28explained in detail along with all the
- 12:49:32visual level functions the documentation
- 12:49:35of the visual level function is also
- 12:49:37available and it has provided great
- 12:49:40details so let's read few part of this
- 12:49:44documentation to understand the visual
- 12:49:46level calculations better visual
- 12:49:49calculations is the tax calculation that
- 12:49:51defines and executed directly on your
- 12:49:54visual visual calculation make it easier
- 12:49:57to create calculation that are
- 12:49:59previously hard to create leading to
- 12:50:01simpler Dex and easier maintenance for
- 12:50:04better performance example of running
- 12:50:07sum has been given you need to Simply
- 12:50:09use running some sales
- 12:50:11amount visual calculation differ from
- 12:50:15other calculation index how visual
- 12:50:18calculation aren stored in the model
- 12:50:20instead are stored on the visual which
- 12:50:23means visual calculation can only refer
- 12:50:26to what's on the visual anything in the
- 12:50:28model must be added to the visual before
- 12:50:31visual calculation can refer it being
- 12:50:34visual calculation from being concerned
- 12:50:37with the complexity of filter context
- 12:50:40and model visual calculation combines
- 12:50:43the Simplicity of the context from the
- 12:50:45calculated columns with the on demand
- 12:50:49calculation flexibility from
- 12:50:51measure compare to measure visual
- 12:50:54calculation can operate on aggregated
- 12:50:56data instead of detailed level often
- 12:51:00leading to the performance benefit when
- 12:51:02the calculation can be achieved either
- 12:51:04by new measure or visual calculation
- 12:51:07later often leads to better performance
- 12:51:10it means in case you have an option to
- 12:51:13create a major versus a visual
- 12:51:15calculation you can opt for visual
- 12:51:18calculation for better performance
- 12:51:20because it is going to work on the
- 12:51:22aggregated data at the visual level not
- 12:51:25at the detailed data since visual
- 12:51:27calculations are part of the visual they
- 12:51:30can refer to the visual structure which
- 12:51:33leads to more flexibility there is one
- 12:51:35more article which you can refer to
- 12:51:37which tells the difference between
- 12:51:39custom column power query calculated
- 12:51:42column measure calculated table and
- 12:51:45visual calculations again how to enable
- 12:51:47visual level calculation and some
- 12:51:50examples has been given the first simple
- 12:51:52example was Sal amount minus total
- 12:51:55product cost then there are few things
- 12:51:58which has been explained here like you
- 12:52:00can hide the fields from the visual
- 12:52:02these options have been given now to you
- 12:52:05when you open the visual level
- 12:52:07calculation at that time you can hide
- 12:52:09Fields so let's read that out in visual
- 12:52:12calculation edit mode you can hide
- 12:52:15fields from the visual like you can hide
- 12:52:18column and table in modeling view for
- 12:52:21example if you wanted to show The Profit
- 12:52:23visual calculation you can hide sales
- 12:52:26amount and total profit cost from The
- 12:52:28View then there are using templates so
- 12:52:31there are already existing template
- 12:52:33which you can use which is running sum
- 12:52:35moving average percent of total percent
- 12:52:38of R total averages of CHS versus
- 12:52:41previous versus next versus first versus
- 12:52:44last what are these functions running
- 12:52:46sum moving average running sum you might
- 12:52:49have understood it is going to give you
- 12:52:51running totals or what you call as
- 12:52:54cumulative moving average calculates the
- 12:52:56average of the set of given values in a
- 12:53:00given window by dividing the sum of
- 12:53:02values by the size of the window
- 12:53:04percentage of parents calculates the
- 12:53:07percentage of value related to its
- 12:53:09parent uses collapse function percentage
- 12:53:12of grand total now become very easy
- 12:53:14calculate the percentage of value
- 12:53:17relative to its value using the collap
- 12:53:19Sol function averages of children you
- 12:53:22can use expand calculates the average
- 12:53:25value of set of values uses expand
- 12:53:28versus previous using previous means the
- 12:53:30preceding value next subsequent value is
- 12:53:34next first Value First value in the
- 12:53:36window or visual last value last value
- 12:53:40now there is something known as AIS many
- 12:53:43function have optional AIS parameter
- 12:53:45which can only be used in visual
- 12:53:47calculation X's influence how visual
- 12:53:50calculation traversing in the visual
- 12:53:53Matrix AIS parameter set to the first
- 12:53:56axis in the visual by default it's by
- 12:53:59default set to the first axis for many
- 12:54:01visual first axis is the row which means
- 12:54:05the visual calculations is evaluated row
- 12:54:07by row in the visual Matrix from top to
- 12:54:10bottom what are the different axes row
- 12:54:13calculates vertically across rows to
- 12:54:16perform top to bottom column calculate
- 12:54:19horizontally across column from right to
- 12:54:22left rows column calculate vertically
- 12:54:25across Row from top to bottom continuing
- 12:54:28column by left to right and column row
- 12:54:31means calculate horizontally across
- 12:54:34columns from left to right continuing
- 12:54:36row by Row from top to bottom then many
- 12:54:39functions will contain reset many
- 12:54:41function have optional reset parameter
- 12:54:43which is available individual
- 12:54:45calculations only reset influence if and
- 12:54:49when the function reset its value to
- 12:54:51zero or switches to the different scope
- 12:54:54while traversing the visual Matrix the
- 12:54:56reset parameter is set to none by
- 12:54:58default which means the visual
- 12:55:00calculation is never restarted reset
- 12:55:04accepts there to be multiple levels on
- 12:55:07the access so there to be multiple level
- 12:55:09on the access access means your bar
- 12:55:11visual can have like access like brand
- 12:55:13or category so that is what we means by
- 12:55:15access similarly when you are using year
- 12:55:18month and quarter they are your X's
- 12:55:20you're displaying a visual there you
- 12:55:21have year then you have quarter then you
- 12:55:23have month then you have days so these
- 12:55:24are your X's something on which we are
- 12:55:26grouping the data the categorical
- 12:55:28variable used in the visualization if
- 12:55:31there is only one level on the axis you
- 12:55:34can use Partition by the following list
- 12:55:36describe only valid values of reset
- 12:55:39parameter none highest parent lowest
- 12:55:41parent highest parent and lowest parent
- 12:55:44means the parent which is at highest
- 12:55:46example has been given like if you have
- 12:55:48year month and quarter highest parent is
- 12:55:50year and the lowest parent is quarter it
- 12:55:52means the the lowest most X's value is
- 12:55:56not participating as a parent it can
- 12:55:58also be used like values like one and
- 12:56:00two so in this case because there are
- 12:56:02only two so highest is one and lowest is
- 12:56:05two so if you want to restart like when
- 12:56:07we are doing run running sum now you
- 12:56:09want to transfer this running sum to
- 12:56:10let's say YTD so you can use running sum
- 12:56:14highest parent so it will reset at the
- 12:56:16ear level and you will get YTD AIS and
- 12:56:19reset versus order by and Partition by
- 12:56:21AIS reset order by and Partition by are
- 12:56:24four functions that can be used in pair
- 12:56:26together to influence how the
- 12:56:28calculation is evaluated they form two
- 12:56:30pairs that are often used together so
- 12:56:32AIS and reset on order by and Partition
- 12:56:34by so with AIS you can use reset and
- 12:56:36order by you can use partition by by and
- 12:56:39Partition by are the calculation you
- 12:56:40might have seen in the window function
- 12:56:43offset function index function rank
- 12:56:46function and row number function then
- 12:56:48this has been explained how to use this
- 12:56:51access and reset are only available
- 12:56:53function that can be used in visual
- 12:56:56level calculation and can only be used
- 12:56:59in visual level calculation as the
- 12:57:01reference to the visual structure order
- 12:57:04by and Partition by are the function
- 12:57:06that can be used in calculated column
- 12:57:09and measor and visual level calculation
- 12:57:11and can refer to the fields while they
- 12:57:14perform the same function they are
- 12:57:17different in the level of abstraction
- 12:57:20provided refering to the visual
- 12:57:22structure more flexible than explicit
- 12:57:26referencing Fields using order by and
- 12:57:28Partition by see in case of exis and
- 12:57:30reset you may not be really explicit and
- 12:57:33we will take this example when we do
- 12:57:35running sum that even if I change access
- 12:57:39it can still do the running sum so let's
- 12:57:41say if I'm having a visual at the
- 12:57:43category and if I change it to Brand the
- 12:57:45running sum will continue to do the
- 12:57:48calculation and that's the benefit of
- 12:57:49visual level calculation so let's say I
- 12:57:51have year month quarter and day and I
- 12:57:54use previous function so my expectation
- 12:57:56is that when I'm looking at the day
- 12:57:58level it should show me previous day
- 12:57:59when I look at the month level it should
- 12:58:01show me previous month when I look at
- 12:58:02the quarter level it should show me
- 12:58:04previous quarter and when I look at the
- 12:58:05year level it should show me previous
- 12:58:07year we have to check that at the visual
- 12:58:09level calculation but if you use the
- 12:58:11order by then order by is very explicit
- 12:58:14it is Day means it is J even if you
- 12:58:16change your visual details it is still
- 12:58:19order by day so order by is going to
- 12:58:21call explicit when you need explicit you
- 12:58:24can use order by Partition by when you
- 12:58:27don't need to be explicit you can use
- 12:58:29XIs and reset available functions you
- 12:58:32can use many existing Dex function in
- 12:58:34visual level calculations since visual
- 12:58:37level calculation can work with confin
- 12:58:40of the visual Matrix functions are rely
- 12:58:42on model relationship such as
- 12:58:44relationship related and related table
- 12:58:46aren't available these are the visual
- 12:58:48calculations available with you collapse
- 12:58:50collapse all expand expand all first
- 12:58:53last moving average next previous range
- 12:58:57running sum limitations not all visual
- 12:59:00types are supported the following visual
- 12:59:02types and visual properties have been
- 12:59:05tested and found not to work with visual
- 12:59:08level calculations or hidden Fields tree
- 12:59:10map map shape map Azure map slicer it
- 12:59:14means it's not going to work on slicer R
- 12:59:16visual python visual key influencer
- 12:59:18decomposition tree Q&A smart narrative
- 12:59:21matrices paginated report arjs map power
- 12:59:24app power automate small multiple visual
- 12:59:27calculation and hidden field can only be
- 12:59:29added and edited using powerbi desktop
- 12:59:33while you can publish the report
- 12:59:35containing visual level calculation to
- 12:59:37powerbi ser you can't edit visual level
- 12:59:39calculation or hidden field in power
- 12:59:41service so that's not available on the
- 12:59:43service as of now to edit it you can use
- 12:59:46it and publish it performance of this
- 12:59:49feature isn't representative of the end
- 12:59:52product as of now you should not be too
- 12:59:54much bothered about the performance part
- 12:59:56of it reuse of visual level calculation
- 12:59:59using copying and paste or other
- 13:00:01mechanism isn't available so you can't
- 13:00:03reuse them as of now you can't filter on
- 13:00:06visual level calculation visual level
- 13:00:08calculation can't refer to itself on the
- 13:00:11same or different detail level
- 13:00:14personalization of visual calcul or
- 13:00:16hidden field isn't available and there
- 13:00:18are many other which you can go through
- 13:00:20this article I will be sharing the link
- 13:00:23of this article also into the
- 13:00:25description I have added a new page
- 13:00:27visual calculation on this page I'm
- 13:00:30going to add a table Visual and
- 13:00:34start showcasing you visual calculations
- 13:00:38to start with that I will go down and
- 13:00:41from item I'm going to drag brand and
- 13:00:43create a table
- 13:00:46visual a table visual is ready and I've
- 13:00:48sorted it on the brand time to add a new
- 13:00:51visual calculation and the option is
- 13:00:54available under the Home tab new
- 13:00:58calculation let me click on that opens
- 13:01:02the window very similar to the focus
- 13:01:04mode window and there you have a pain
- 13:01:08where you can give your visual level
- 13:01:10calculation the FX pan or the formula
- 13:01:14pain now here the right now before I
- 13:01:17started the visual level calculation
- 13:01:19visual level calculation is hidden I can
- 13:01:21hide the measure if I need I can't hide
- 13:01:25the AIS or the group wise so let me
- 13:01:28create the first visual calculation
- 13:01:29nothing but running
- 13:01:35sum the function which I'm going to use
- 13:01:38is running some and I'm going to give
- 13:01:42net parameter I'm going to leave
- 13:01:44everything else and not going to give
- 13:01:46any value for
- 13:01:47those now I can use the
- 13:01:50commit to commit the calculation or I
- 13:01:53can also press enter I'm going to press
- 13:01:55enter in this case the calculation is
- 13:01:58added to the visual and as you can see
- 13:02:01the visual calculation which has been
- 13:02:03performed here it is adding up
- 13:02:08the previous value in each rows all the
- 13:02:10previous values if you look at here you
- 13:02:13can see all the rows is the sum of all
- 13:02:15the previous R if you want to edit the
- 13:02:18calculation you can click on the arrow
- 13:02:21and you have option to edit calculation
- 13:02:24so we have done a very simple
- 13:02:25calculation running sum and we have
- 13:02:27given net as an argument there let's go
- 13:02:30back to the
- 13:02:32report now what's the advantage I was
- 13:02:35doing that using majes okay maybe they
- 13:02:37are faster
- 13:02:38done on aggregated data but is there any
- 13:02:40other
- 13:02:41advantage to understand that let me do
- 13:02:44one thing let me go here on the brand
- 13:02:48and change it to
- 13:02:51category can you still see the running
- 13:02:54total working fine this would not have
- 13:02:57been the case in case I would have
- 13:03:00created this calculation by any of the
- 13:03:02traditional methods now I do have tested
- 13:03:06this with field parameters and as of now
- 13:03:08I was not able to add the field
- 13:03:10parameter to it but the moment the field
- 13:03:12parameter is supported it would be
- 13:03:14really amazing because the moment I'm
- 13:03:17changing my field in the calculation it
- 13:03:21is still keep on working now let's use
- 13:03:24another visual function and the function
- 13:03:26which I want to use is collapse all
- 13:03:30again new
- 13:03:32calculation and I'll use the function
- 13:03:34collapse all but that is total or gt
- 13:03:39grand
- 13:03:40total
- 13:03:42cpol what all cpol required expression
- 13:03:45and X's the expression is net and it is
- 13:03:49suggesting me to use the running sum
- 13:03:52also but I just wanted the net and how I
- 13:03:56want the direction rowwise down is the
- 13:03:58direction which I want and let me use
- 13:04:01collaps all and as you can see it has
- 13:04:03given me grand total now I can create
- 13:04:06two functions from here percentage of
- 13:04:09grand total and percentage of running
- 13:04:12total again they are going to be the
- 13:04:14visual level
- 13:04:16calculations so let me create couple
- 13:04:20more so one is percent of
- 13:04:26total which is nothing but
- 13:04:29divide
- 13:04:31net by TT
- 13:04:38now I got the percentage of total or I
- 13:04:41can add it and multiply it by 100
- 13:04:44100 I got percentage of total so easily
- 13:04:48no calculation worries just simply
- 13:04:51taking chy and use it on the measure how
- 13:04:54simple it is now let's go ahead and do
- 13:04:56one more which is percentage of running
- 13:05:00total so again click on the new
- 13:05:03calculation and here we are going to use
- 13:05:07the percent of running total and what
- 13:05:11I'm going to do for that is divide so we
- 13:05:13are going to use divide and we are using
- 13:05:16the regular Dex functions here divide is
- 13:05:19a regular Dex function by running some
- 13:05:22which is a visual calculation divide by
- 13:05:25another visual calculation which is
- 13:05:29GT completely based on visual
- 13:05:32calculations addit calculation multiply
- 13:05:35by 100 as of now
- 13:05:39so let's go back to the report and
- 13:05:41understand these so first row 22% you're
- 13:05:44fine because percentage of total in the
- 13:05:45first row is going to be the same in the
- 13:05:47second row the running total will add
- 13:05:50and I'm not doing a running total of
- 13:05:51percentage of total I'm simply have
- 13:05:53calculated it on running sum I could
- 13:05:55have done it on the percentage of total
- 13:05:57also that is another way to do it and
- 13:05:59then another 14% getting added another
- 13:06:0123% getting added and 100% so such a
- 13:06:06easy to do the these calculations now we
- 13:06:09have already seen two functions but
- 13:06:11there are many more so we'll continue to
- 13:06:13look at those so let's do next
- 13:06:15calculation and next calculation which I
- 13:06:18wanted to do is moving
- 13:06:20average so I go and clicked on the new
- 13:06:23calculation and let's call it as move
- 13:06:27AVG and the function which is available
- 13:06:30with us is moving
- 13:06:32average in the moving average I can give
- 13:06:34an expression expression is nothing but
- 13:06:36net
- 13:06:39so expression
- 13:06:41window do I want to include the current
- 13:06:44AIS row column blanks and where you want
- 13:06:47to reset so window is two I only want to
- 13:06:50do for last two I want to include the
- 13:06:53current as of now I want to include the
- 13:06:54current so I'll keep it otherwise you
- 13:06:56can have the values like true and
- 13:06:59false but let's start
- 13:07:02with only moving average so what it is
- 13:07:06doing right now so basically the first
- 13:07:07value is the self the second value is
- 13:07:10the sum of these two which is 43
- 13:07:13something and just you can see it is
- 13:07:14divide by two now next would be the sum
- 13:07:17of these two which is around 36 3.6
- 13:07:21million divide by 2 and you can see it's
- 13:07:231.8 million next one is going to be some
- 13:07:25of this which is going to be around 2.9
- 13:07:29Million divide by 2 which is 1.47
- 13:07:31million and again this is going to be
- 13:07:33some around 2.4 2.5 divide by 2 which is
- 13:07:372.22 3 so in this manner you can see we
- 13:07:41are getting moving average let's go
- 13:07:45back so we have got net we have got
- 13:07:49running sum we have got GT percentage of
- 13:07:51total moving
- 13:07:53average and as you can see we can go and
- 13:07:57change it the XIs to something else and
- 13:08:00this calculation is still holds true
- 13:08:03that's the beauty of these
- 13:08:06calculation why why don't we learn few
- 13:08:08more
- 13:08:09function I would now like to experiment
- 13:08:12with few more calculation and the
- 13:08:14calculation which I would like to now
- 13:08:16showcase is previous and next which is
- 13:08:19going to give us the value of the
- 13:08:20previous row and the next row so to
- 13:08:23begin that Home tab new calculations
- 13:08:27back to the visual
- 13:08:28calculations let me call it previous
- 13:08:31function which I'm going to use is also
- 13:08:33previous no previous month no previous
- 13:08:36quarter no previous
- 13:08:37here only previous and we have
- 13:08:41expression steps X's blank and reset and
- 13:08:46step means I can go beyond one so I want
- 13:08:50to compare with previous month that's
- 13:08:51fine I want to compare previous to
- 13:08:53previous then I can use steps and do it
- 13:08:55I want to go further down let's say 11
- 13:08:58month or 12 month down the line that
- 13:08:59also I can do by using these steps it
- 13:09:02could be month quarter year whatever you
- 13:09:04want to use based on the requirement and
- 13:09:07it is visual level so sometime if you
- 13:09:09have a disconnected data and you want to
- 13:09:10compare with the last available month
- 13:09:12think about how much big calculation we
- 13:09:14have to do this should resolve that out
- 13:09:17because it's just looking at previous
- 13:09:19it's just a visual row and what previous
- 13:09:22of what
- 13:09:24net anything else we want to give step
- 13:09:27yes definitely I want to give step one
- 13:09:28step and because we have function like
- 13:09:30previous and next it might not allow you
- 13:09:32the negative integer it is only the
- 13:09:34positive integer which has been allowed
- 13:09:36here it should would give me every time
- 13:09:38the previous row and the first row will
- 13:09:40not have any previous
- 13:09:42row because there is no previous for the
- 13:09:44first one and as expected the first one
- 13:09:47doesn't have a previous rest all as a
- 13:09:49previous look up here and based on these
- 13:09:52values you are able to see the previous
- 13:09:54values here going one
- 13:09:58down
- 13:10:02trailing previous well understood very
- 13:10:05simple let's do the next calcul
- 13:10:08next the function is very simple
- 13:10:13next
- 13:10:15net comma One Step done and we got the
- 13:10:19next calculation and this time it would
- 13:10:22be a one row ahead and as you can see
- 13:10:26the in this case the last row will not
- 13:10:28have it because we are going one row
- 13:10:30ahead we are looking into future values
- 13:10:32and there is no value for the last
- 13:10:35row in this manner
- 13:10:37we are able to
- 13:10:39do previous and next calculation let's
- 13:10:41go back to the report and check this out
- 13:10:43and as you can see we able to see the
- 13:10:45next and previous
- 13:10:48calculation and as usual if I change the
- 13:10:50AIS to
- 13:10:52category it's not going to make any
- 13:10:55difference I will get previous and next
- 13:10:57of the
- 13:10:59categories let's add couple more
- 13:11:01calculations the calculations which we
- 13:11:03want to do right now is basically first
- 13:11:07and last so before I do that let me
- 13:11:09again change the AIS
- 13:11:11to BR need a lot of values
- 13:11:15to look at the calculation that's how
- 13:11:18you know only five category first and
- 13:11:21last are just couple of steps away let's
- 13:11:24go ahead and try that out so again hom
- 13:11:26tab new
- 13:11:28calculation very simple
- 13:11:30first think about is how you're going to
- 13:11:32do it with the regular Dex index
- 13:11:36function it's easy but even that would
- 13:11:38require what is the order by and you
- 13:11:41need to mention an explicit column for
- 13:11:43that so function is
- 13:11:45first let's look at the arguments
- 13:11:48expression exis blank and reset we are
- 13:11:51only going to give one argument as of
- 13:11:53now net and that should be sufficient
- 13:11:55let's check that
- 13:11:57out calculation has been added and as
- 13:12:01expected it is just giving me the first
- 13:12:03row value for all the rows so I can now
- 13:12:06find out per percentage of first now
- 13:12:08let's calculate the last value again
- 13:12:11click on new calculation from the Home
- 13:12:13tab name is last and the function we are
- 13:12:17also going to use is last simple net
- 13:12:21only one argument but it can take
- 13:12:23expression xes blank and reset we are
- 13:12:28only going to give one argument as of
- 13:12:29now net and as expected it is showing
- 13:12:32the last value
- 13:12:38let's go back to the table and look at
- 13:12:39it now we have quite a few calculations
- 13:12:42as you can see we have first and last
- 13:12:44also but we have more visual
- 13:12:47calculations so we'll continue to
- 13:12:49explore
- 13:12:51those so the next function which we are
- 13:12:53going to check out is range and it's
- 13:12:56little bit different function and I'm
- 13:12:58going to tell you one different
- 13:12:59operation which you might not have seen
- 13:13:01till now in
- 13:13:03powerbi okay so let's jump on to the new
- 13:13:07calculations from the Home tab and I
- 13:13:11want to do a calculation which is range
- 13:13:13now range can give me moving average but
- 13:13:16I want a moving sum rolling sum and that
- 13:13:20rolling sum I'm going to do using the
- 13:13:22range so let me
- 13:13:24do rolling
- 13:13:26two and little bit different function so
- 13:13:29that's why I'm using
- 13:13:31calculate and I'm going to use net here
- 13:13:33but I'll tell you it might not work so
- 13:13:35we'll come back to that later and and
- 13:13:37I'm going to use function
- 13:13:39range the range function as you can see
- 13:13:42the arguments are step include current I
- 13:13:46want that yes AIS which is rows blanks
- 13:13:50reset the first argument step is minus
- 13:13:53one means one step only last one step
- 13:13:57include current I want yes that is
- 13:14:00true what is the next X's which is
- 13:14:03nothing but rows but when I give these
- 13:14:06arguments and I enter it gives me error
- 13:14:09and now to correct that I'm going to
- 13:14:11edit this
- 13:14:13calculation click down the arrow edit
- 13:14:15calculation and I'm going to do
- 13:14:16something which you don't do I'm going
- 13:14:18to put sum on a major it's a major and
- 13:14:21usually we don't put some on a majure we
- 13:14:23go ahead and use some X for that but
- 13:14:26here I'm doing that and immediately I
- 13:14:28get the correct calculation it means you
- 13:14:30will be able to use some average Etc on
- 13:14:34your measure to get those rolling the
- 13:14:37rolling averages and your life has been
- 13:14:40made further Easy by this let's
- 13:14:43understand these calculation are they
- 13:14:44correct or not first row is going to be
- 13:14:46the same the second row is going to be
- 13:14:47around a million the sum of these two
- 13:14:50the third row is going to be the sum of
- 13:14:52these two which is around 1.5 million so
- 13:14:54let's look at the calculations the
- 13:14:57rolling here is same here it is the two
- 13:15:00which is last two rows but this is 1
- 13:15:03million this is 1.5 million and
- 13:15:05similarly it is going to be 1 2 million
- 13:15:07it's coming from here these two on the
- 13:15:10top and you can relate just for your
- 13:15:12reference let me put the arrow
- 13:15:18here so now we have got rolling and you
- 13:15:22have done little bit different kind of
- 13:15:24calculation and let open up a all set of
- 13:15:29new calculations which you can do
- 13:15:31important function
- 13:15:32range so let's go back to the table and
- 13:15:36before we we move to the next set of
- 13:15:38calculation we need a different kind of
- 13:15:40a visual a visual where we at least need
- 13:15:43to have couple of access so let's begin
- 13:15:47the Journey of few more special
- 13:15:50calculations visual calculations where
- 13:15:53we are going to get few more detailed or
- 13:15:56few more easy calculations just by using
- 13:15:59these visual
- 13:16:02calculations now to explore further the
- 13:16:04visual calculation I have added a new
- 13:16:06page because the set of visual
- 13:16:09calculation I want to explore now is
- 13:16:11going to require me at least to have two
- 13:16:13levels so let me create a matrix visual
- 13:16:16for
- 13:16:17that and in that I'm going to add state
- 13:16:19and city on the
- 13:16:21row expand
- 13:16:23it going to add a major
- 13:16:26net and let's start the two calculation
- 13:16:29expand and expand all again from the
- 13:16:31Home tab new
- 13:16:33calculation let's look at the
- 13:16:35calculation
- 13:16:41expand expand and it require expression
- 13:16:43and XIs and basically expand is going to
- 13:16:47work at the next level in the context so
- 13:16:51the details would come from the next
- 13:16:53level and we have to understand that I'm
- 13:16:55going to have expand expand all and then
- 13:16:57I'm going to show you the differences
- 13:16:59and then you will understand how these
- 13:17:01calculations are performed so let's give
- 13:17:05here average
- 13:17:07I'm going to use average function and
- 13:17:08I'm using it on a major net this is what
- 13:17:11we you can do in the visual level
- 13:17:13calculation and the next thing which I
- 13:17:15compuls need is rows XIs is rows so
- 13:17:19expand and you might not see the
- 13:17:21difference but when you scroll down you
- 13:17:23will see an average happening at the
- 13:17:25state level and simply and at the grand
- 13:17:27total level this number doesn't seems
- 13:17:29like an average of cities because if you
- 13:17:32look at the number of the Cities the
- 13:17:35number cannot average to
- 13:17:382 100 K this is actually the average of
- 13:17:42state and that's what expand does it is
- 13:17:46average of a level
- 13:17:48below to explain this further let's also
- 13:17:51bring in expand
- 13:17:55all and expand all
- 13:17:58function also required to argument
- 13:18:01expression where I will be doing
- 13:18:05average of a major here again I'm doing
- 13:18:08an average of a major net and the second
- 13:18:11argument is X's which I'm going to use
- 13:18:15rows and here if you see you will see a
- 13:18:18little bit of difference in the averages
- 13:18:20yes it is the averages of City it is the
- 13:18:22average from the leaf level it is always
- 13:18:25calculating it from the leaf level not
- 13:18:27from the next level or the level below
- 13:18:30so let me go back to the report and try
- 13:18:32to explain you this if you look at these
- 13:18:35calculations
- 13:18:39look at how the averages is happening
- 13:18:41you should be very happy to see these
- 13:18:43averages happening at the state level
- 13:18:45from the city level no more those
- 13:18:48context plate defining what's below I
- 13:18:50can easily go ahead and change it and
- 13:18:53add another levels or replace these
- 13:18:55levels and they will continue to work
- 13:18:58but what's the difference in the grand
- 13:19:00total here to understand that let me
- 13:19:03collapse it I'll drill up one level
- 13:19:06right
- 13:19:07calculation here remains same but now
- 13:19:10you can understand looking at this data
- 13:19:12where I have a million here I have a
- 13:19:15400k here which are pushing up my
- 13:19:18calculations towards
- 13:19:20the
- 13:19:22232 as an average of the states if you
- 13:19:26further go down you do see some bigger
- 13:19:28values I can sort on the net so that you
- 13:19:31understand these values little bit
- 13:19:33better as you can see quite a few big
- 13:19:35values are there here
- 13:19:37I changeed sorting back to the
- 13:19:41state so expand is doing it from the
- 13:19:44leaf level to understand it
- 13:19:46further let me add one more level first
- 13:19:50of all I'm going to expand it and I'm
- 13:19:52going to add one more level which is
- 13:19:55brand from the
- 13:19:56item I have added brand from the item
- 13:19:59immediately What You observe that this
- 13:20:01number is not changed in the expand but
- 13:20:03the expand all number has changed and
- 13:20:05why even even if you look at the city
- 13:20:07level calculations those calculations
- 13:20:09are little bit different they are not
- 13:20:11same as what we previously had they were
- 13:20:13same when we didn't have the brand if
- 13:20:16you go down you will see these are
- 13:20:18nothing but the average coming from the
- 13:20:20Brand level and even on the level above
- 13:20:24it will continue to be from the leaf
- 13:20:26level so this expand all is doing the
- 13:20:30calculation at the leaf level expand is
- 13:20:33doing at the next level and what does
- 13:20:35that mean for you is
- 13:20:38basically when you see at the city level
- 13:20:40it is average of Brands when you see at
- 13:20:44the state level it is average of cities
- 13:20:45when you look at the grand total level
- 13:20:47it is average of states in this manner
- 13:20:50these two calculation expand and expand
- 13:20:52all works so this will help you to solve
- 13:20:55the common problem which we wanted to do
- 13:20:57average of sum or sum of averages very
- 13:21:00common problem and a very simple
- 13:21:03solution in visual calculation
- 13:21:07now we are going to look at the two
- 13:21:09function which is basically cpse and CPS
- 13:21:12I already shown you cpse all ones but
- 13:21:16the time has come that we again look
- 13:21:18those two things together I'll go to the
- 13:21:21new calculation and I'll first do here
- 13:21:27collapse and collapse requires
- 13:21:31expression x's and N it's basically give
- 13:21:35going to give you
- 13:21:38the grand total or the parents total is
- 13:21:42basically going to collapse it here I
- 13:21:44can use net
- 13:21:49comma
- 13:21:53rows and as you can
- 13:21:57see here is collapse is getting its
- 13:22:00ground
- 13:22:01total but the cities are getting the
- 13:22:04total of the
- 13:22:07state so to understand that look at the
- 13:22:10state total this is my state total the
- 13:22:13cities are getting the state total and
- 13:22:15if you further go down brands are going
- 13:22:18to take the city total collapsing from
- 13:22:23the parent to child so I'm getting the
- 13:22:26parents calculation at the child
- 13:22:29level so that is collapse but if I do
- 13:22:33collapse all which is going to bring a
- 13:22:35grand total for me so let me add a new
- 13:22:37calculation that is colol or I can call
- 13:22:40it as GT but let me call GT1 I can
- 13:22:42already calculated GT not in this visual
- 13:22:45I calculated another visual so I can
- 13:22:46have the same name
- 13:22:47but just use Now call appol and the call
- 13:22:52appol is going to do it all at the final
- 13:22:55parent level I can use net
- 13:22:58here and I can use
- 13:23:03rows and this is nothing but grand total
- 13:23:06so now you can easily calculate
- 13:23:08percentage of parent percentage of gland
- 13:23:09total again use them back into new
- 13:23:12calculation or you can edit the same
- 13:23:14calculation to get it percentage of
- 13:23:17total or percentage of Grant
- 13:23:19total cpse and CPS help help you to get
- 13:23:23the parent values now go back to the
- 13:23:26reports and let's understand these
- 13:23:27things so here we have already opened
- 13:23:30Arizona and we have open one of the city
- 13:23:33of Arizona and their Branch under it if
- 13:23:36you see here this is the total of the
- 13:23:39city and this is given at the Brand
- 13:23:42level now when the Arizona has been
- 13:23:45opened Arizona has a total of 471 look
- 13:23:50at the city totals all the cities are
- 13:23:52getting the Arizona
- 13:23:54total when you go to the states like
- 13:23:56Arizona you get the total the grand
- 13:23:59total which is above one level it
- 13:24:02collapse is collapsing one level at a
- 13:24:05time collapse all is collaps all the
- 13:24:06levels as you can see we are getting the
- 13:24:08ground total here for all the rows
- 13:24:10irrespective of whatever level we are
- 13:24:14at we already have a quick glance at
- 13:24:18these calculation but we do would like
- 13:24:20to explore the reset functionality I
- 13:24:23would like to see how would it work in
- 13:24:26case I want to create a running total
- 13:24:30which is not going across the leap level
- 13:24:33but can it reset itself to ear level so
- 13:24:37let me add another page and here I'm
- 13:24:38going to
- 13:24:39create a line Visual and in this line
- 13:24:43visual I'm going to bring in from the
- 13:24:47date table
- 13:24:49here I'm also going to bring in quarter
- 13:24:53and I would also like to bring
- 13:24:56in
- 13:25:00month and I would like to bring in a
- 13:25:03major
- 13:25:05net so I'm all set already with my
- 13:25:08visual this is my visual and how it's
- 13:25:12showcasing the values for last couple of
- 13:25:16years and let me do a sort on the AIS so
- 13:25:21I have my visual ready and here I want
- 13:25:23to have a running calculation let's
- 13:25:26first of all add a visual level
- 13:25:27calculation from the Home tab and the
- 13:25:30new calculation which I'm going to add
- 13:25:32using the Home tab new calculation is
- 13:25:35running
- 13:25:37some
- 13:25:41net and let's call it
- 13:25:44RT and as you can see the moment I take
- 13:25:47an RT RT is going up and if I go back to
- 13:25:51the report you can see it's continuously
- 13:25:54increasing I don't want to add another
- 13:25:56calculation I just want to go ahead and
- 13:25:58modify this so I click on this arrow and
- 13:26:00use edit calculation and now I would
- 13:26:03like to look at the other parameters of
- 13:26:05RT so
- 13:26:07AIS is definitely row
- 13:26:11only blanks and I want to reset I want
- 13:26:14to reset at what I want to reset at the
- 13:26:17highest
- 13:26:19parent so highest parent is here and I
- 13:26:21want to reset there let me try that out
- 13:26:25and what do you see immediately you see
- 13:26:27there is a fall happening in the month
- 13:26:29of January let's go back to the report
- 13:26:31and understand that as you can see here
- 13:26:34there is a reset happening
- 13:26:38and this means now I'm getting YTD no
- 13:26:41more I'm getting running total RT can I
- 13:26:45get it further down to the T number two
- 13:26:50which is quarter let's
- 13:26:52see as you can see now it is giving me
- 13:26:56qtd not YTD every quarter there is a
- 13:27:00reset so look at the January look at the
- 13:27:03April look at the July look at the
- 13:27:05October
- 13:27:08let's add more complication let's add
- 13:27:10date what
- 13:27:12happens now the reset would still happen
- 13:27:16at the level two the level two is still
- 13:27:19quarter so the reset is happening
- 13:27:22quarterly still and we do it and
- 13:27:26remember this quarter is in the middle
- 13:27:28and that's why knowingly I have added
- 13:27:30here two and I added one more level to
- 13:27:34Showcase you that the reset is is not
- 13:27:36happening month level so there are more
- 13:27:38levels available here and it has taken
- 13:27:40care this is the second level so 1 2 and
- 13:27:433 is it three or is it one let's go back
- 13:27:46edit calculation move the level to three
- 13:27:49and let's understand this calculation
- 13:27:51once more and now you can see the reset
- 13:27:54is happening at the month level the
- 13:27:56highest level is one the second highest
- 13:27:58is two then three four and keep on going
- 13:28:02we are not including the current level
- 13:28:04the current level is not part of the
- 13:28:05parent
- 13:28:06your parent as a year is one quarter is
- 13:28:10two and month is three and we have given
- 13:28:12three as of now you are seeing MTD in
- 13:28:15this particular Trend
- 13:28:18chart now you understand how easy these
- 13:28:21calculations are and how easily we can
- 13:28:26use visual level
- 13:28:29calculations to
- 13:28:31create those complicated calculations in
- 13:28:34a easy manner
- 13:28:36we are just working at the visual level
- 13:28:39the visual row is the row the visual
- 13:28:42level is the level and that makes our
- 13:28:45life easy it's just like Excel we are
- 13:28:47doing it those who likes the Excel
- 13:28:50calculation very much and very find it
- 13:28:53easy to do those kind of calculation
- 13:28:55this is one step near to that I have
- 13:28:58shown you quite a few visual
- 13:29:00calculations in detail but there is a
- 13:29:01quicker way to do some of these
- 13:29:03calculations using templates so where is
- 13:29:05those templates available for that let
- 13:29:08me add a new page and quickly add a
- 13:29:11table visual with item brand and
- 13:29:15net visual is ready and now let me add
- 13:29:19new calculation from the Home tab new
- 13:29:21calculation which is a visual
- 13:29:23calculation when you come to the visual
- 13:29:25calculation look at this FX
- 13:29:28icon when you click on this FX icon you
- 13:29:31get the options for some templates so
- 13:29:34without doing much of the effort you can
- 13:29:37simply get some of the calculation the
- 13:29:39only thing which you have to do is just
- 13:29:41click on any of these calculation let's
- 13:29:43say percentage of grand total and go
- 13:29:45ahead and add the required field now I'm
- 13:29:48going to replace it with
- 13:29:50net the field with the net another field
- 13:29:53also with the net and X is with
- 13:29:58rows so we immediately get percentage of
- 13:30:01total same way I can click on the FX
- 13:30:04icon again and use versus first again I
- 13:30:08need to replace the field where I can
- 13:30:10replace it by one of my major which is
- 13:30:12Nat which is also present in the same
- 13:30:15visual and I'm getting percentage diff
- 13:30:18with first same way you can utilize
- 13:30:20running sum moving average percentage of
- 13:30:24parent percentage of grand total average
- 13:30:27of children's versus previous versus
- 13:30:30next versus first and versus last so not
- 13:30:33only you can create these calcul ations
- 13:30:36by using the functions but you can also
- 13:30:38use some of these templates so go ahead
- 13:30:41and try those out visual calculations is
- 13:30:45not limited to the set of new functions
- 13:30:48which has came along with the visual
- 13:30:50calculation feature some of the existing
- 13:30:53functions can also be used in the visual
- 13:30:55calculation while we have lot of
- 13:30:58functions which we can use we will be
- 13:31:00focusing on few functions which are
- 13:31:02released some time back these functions
- 13:31:05are index offset Rank and row number
- 13:31:08these functions have been released
- 13:31:10during December 2022 and April 2023 now
- 13:31:14while all these functions may not work
- 13:31:17in visual calculations we will try to
- 13:31:19see how can we use them in visual
- 13:31:21calculation and what all functions are
- 13:31:23going to work there so in the upcoming
- 13:31:25videos we are going to explore visual
- 13:31:28calculations with these additional
- 13:31:30functions which are very similar to SQL
- 13:31:32Windows function which are index offset
- 13:31:35rank and row number those provide us
- 13:31:37order by and Partition by I would like
- 13:31:40to go ahead and see whether offset index
- 13:31:43window Rank and row number can work with
- 13:31:46Dynamic rows means xess so we need to
- 13:31:48check can these functions work in visual
- 13:31:51calculation and if they work can they
- 13:31:53work in the visual when we change AIS or
- 13:31:56row of the visual will they continue to
- 13:31:58work like the other visual calculations
- 13:32:00we have learned in the past like
- 13:32:01previous next running sum moving average
- 13:32:05Etc and why I'm thinking these functions
- 13:32:07can work in visual calculation is the
- 13:32:09part of the documentation which I'm
- 13:32:11going to Showcase you I want to perform
- 13:32:13them at visual level without using
- 13:32:15explicit table or relation by doing so
- 13:32:18we will be able to create more flexible
- 13:32:21calculation which can still work even if
- 13:32:23we change the AIS so friend with that
- 13:32:25objective I would like to first of all
- 13:32:27show you the two statements which were
- 13:32:29part of the documentation which
- 13:32:31motivates me to experiment this so one
- 13:32:33of the statement which we have looked
- 13:32:34last time is this exis and reset and
- 13:32:37order by and Partition by and they are
- 13:32:40pairs now the second pair is the one
- 13:32:42which is used by the five functions
- 13:32:44which we plan to discuss and usually
- 13:32:46these functions need explicit columns in
- 13:32:49spite of those explicit column can we
- 13:32:51make them little more Dynamic the second
- 13:32:53thing is when it talk about available
- 13:32:55function it do say you can use many
- 13:32:57existing Dex function IND visual
- 13:32:59calculations let's go ahead and try the
- 13:33:01existing Dex function and see whether
- 13:33:04they can fit in into the visual
- 13:33:06calculation the way we wanted the next
- 13:33:08visual calculation which we would like
- 13:33:10to explore is using the index function
- 13:33:13now I'll leave this page here and we'll
- 13:33:16further go to another page and there
- 13:33:18again I'm going to create the same
- 13:33:20visual what we have started with is
- 13:33:22brand and net and the function this time
- 13:33:24I would like to use is the index
- 13:33:27function so let me click on the visual
- 13:33:29and the new calculation and I'm going to
- 13:33:32call this function as
- 13:33:34index
- 13:33:36calculate
- 13:33:39net index what does index function
- 13:33:42require position relation order by
- 13:33:46blanks Partition by match by and reset
- 13:33:50so what we are going to do is index is
- 13:33:53first index I want the first one based
- 13:33:55on the relation which is nothing but
- 13:33:57rows what's the next thing I require is
- 13:34:00order by and here I'm going to use an
- 13:34:02order by explicit order by order by
- 13:34:07at
- 13:34:13descending and as you can see I got the
- 13:34:16first
- 13:34:19value I can go ahead and modify this
- 13:34:22calculation to have the second value
- 13:34:26also so second value as you can see it
- 13:34:28is the second
- 13:34:31value I can go ahead and use it as a
- 13:34:34third value also
- 13:34:40so this is the third
- 13:34:43topper same way I can use minus here
- 13:34:46which is not possible if you would have
- 13:34:48used the first and
- 13:34:50second so if you would have used the
- 13:34:53first function you cannot get all these
- 13:34:55but you can get with the offset and I
- 13:34:57can make it minus 3 which is actually
- 13:34:59going to give me the bottom third
- 13:35:06same way I can have another
- 13:35:09calculation
- 13:35:11index one where I can use
- 13:35:15calculate
- 13:35:18net
- 13:35:19index and here I can use position as one
- 13:35:24again and rows and I can leave the order
- 13:35:28by to take the default order by and as
- 13:35:30you can see it has taken brand one the
- 13:35:33first position
- 13:35:36because that's the default X's order by
- 13:35:40let me go back to the
- 13:35:43visualization and as you might have
- 13:35:46expected if I change it to category it
- 13:35:49still continue to
- 13:35:50work so this is my third topper by
- 13:35:55net and this is also the
- 13:35:58categorical first Total both are same
- 13:36:02here that's why the number is coming
- 13:36:03same but they are doing two different
- 13:36:05calculations
- 13:36:07same way I can add both of them together
- 13:36:09brand and
- 13:36:12category and calculations will still
- 13:36:15work so one of them would be on the
- 13:36:17bottom
- 13:36:20third and one of them would be based on
- 13:36:22the
- 13:36:24top next visual calculation which we
- 13:36:26wanted to explore is using the offet
- 13:36:29function so to start journey I will
- 13:36:32bring in brand from the item dimension
- 13:36:35and I'll also add net mejor I would like
- 13:36:39to do visual calculations so how do we
- 13:36:41do that from the Home
- 13:36:43tab new calculations click on new
- 13:36:46calculation and the function which I
- 13:36:48plan to use is offset what offset used
- 13:36:52to do for us we can go to the previous
- 13:36:54position or the next position by
- 13:36:56providing an offset just like we have
- 13:36:59got previous here now I'm going to use
- 13:37:03calculate net which is required with the
- 13:37:06offset function you can opt for other
- 13:37:08options also now I use the function
- 13:37:10offset what does offset function require
- 13:37:13it requires
- 13:37:15Delta relation order by blanks Partition
- 13:37:19by match and
- 13:37:22reset let's go ahead and try these out
- 13:37:24minus1 is the
- 13:37:28Delta then relation and here I'm doing
- 13:37:31the first change so instead of using all
- 13:37:34selected
- 13:37:36item brand or all item brand I'm using
- 13:37:39row and remember we are doing a visual
- 13:37:42calculation so getting data outside the
- 13:37:44visual might not be possible for us the
- 13:37:47next thing is order by and because order
- 13:37:50by might require a explicit column I'm
- 13:37:53as of now leaving that as is and because
- 13:37:56it's going to pick up the default order
- 13:37:59by or the first AIS I'm expecting it to
- 13:38:03sort on brand and as as you can see we
- 13:38:07are getting values which are one row
- 13:38:13behind the same as previous but what the
- 13:38:17difference is going to make in our life
- 13:38:20if I use rows instead of explicit table
- 13:38:24call or explicit relation call in the
- 13:38:27offset function let me go ahead and
- 13:38:29change this brand to
- 13:38:32category and you can see the calculation
- 13:38:35is still
- 13:38:36working it is still giving me the
- 13:38:39previous row value it means I am no more
- 13:38:43dependent on what is there on my Axis so
- 13:38:45I got rid of that it makes offset
- 13:38:48function much more powerful than what we
- 13:38:52have used it
- 13:38:54previously now let me change it back to
- 13:38:57brand and I would now like to go back
- 13:39:00and can I run this offset on net I will
- 13:39:02add another new calculation here and I'm
- 13:39:05going to call it offset one again
- 13:39:10calculate
- 13:39:11net
- 13:39:13offset minus
- 13:39:15one rows in the relation as we have
- 13:39:18given previously also and this time I'm
- 13:39:21going to use order by and order by is
- 13:39:23still looking for a explicit column here
- 13:39:27or can we give one and two we have to
- 13:39:29experiment so here I'm going to give
- 13:39:32explicit name net and if you remember
- 13:39:35the there has been a change done after
- 13:39:37this function has been released that in
- 13:39:39the order by we can use major which is
- 13:39:41not part of relation net is not part of
- 13:39:43the relation but we can still use it and
- 13:39:45how do we want to use it descending
- 13:39:49sort so I have pressed
- 13:39:52enter but after adding additional
- 13:39:55parenthesis and it has worked now to
- 13:39:58understand this we need to change the
- 13:39:59Sorting of the visual as I've sorted it
- 13:40:01on net you can
- 13:40:03see that now it is is trailed by
- 13:40:08net so I'm getting previous row based on
- 13:40:13net
- 13:40:15sorting it is not sorted on brand or the
- 13:40:18default
- 13:40:20access can you do that using
- 13:40:23previous try that out and do let me know
- 13:40:26in the comments can you do the same
- 13:40:28thing using previous function if not
- 13:40:31offset is your choice let's go back to
- 13:40:33the visual and understand these calcul a
- 13:40:35little bit so right now the Sorting is
- 13:40:37on net so you can see it Trail by a
- 13:40:41row but this function first offs
- 13:40:45set how it is working it is actually
- 13:40:49still working but it is trailed by the
- 13:40:52order of brand if you see brand one and
- 13:40:57after that if you go to the brand 10 you
- 13:40:59will see that value because the Sorting
- 13:41:02order is like
- 13:41:04this R 10 11 they're still working but
- 13:41:07they're working based on their own
- 13:41:09order the interesting thing we are able
- 13:41:12to use
- 13:41:13offset now I already experiment with the
- 13:41:15Partition by which did not work for me
- 13:41:19but let me showcase you that can we use
- 13:41:21the last reset option so I will use
- 13:41:25calculate net
- 13:41:33offset minus one
- 13:41:35one relation is
- 13:41:39rows order by I will leave blanks I will
- 13:41:42leave Partition by I will leave match I
- 13:41:44will leave and reset can I give highest
- 13:41:48parent here I'm giving highest parent
- 13:41:51here no order by has been
- 13:41:54used doesn't seems to have make any
- 13:41:58difference but we need more than one
- 13:42:01parent for such a reset isn't it so
- 13:42:04let's bring bring in more than one
- 13:42:06column
- 13:42:08here so let's bring in category also
- 13:42:12here and we would like to see the
- 13:42:14calculation of this offset versus this
- 13:42:16offset is it making any difference so if
- 13:42:18you see here it is already sorted on the
- 13:42:20brand which is the highest parent and
- 13:42:22pose that this is 1 4 so if you look at
- 13:42:27the first
- 13:42:29calculation the
- 13:42:33offset and you look look at the second
- 13:42:35calculation of the
- 13:42:39offset it same sounds like doing the
- 13:42:43same job isn't it now let's add one
- 13:42:49more do you see a change
- 13:42:52here to do that let's first of all bring
- 13:42:55in these two things
- 13:42:58together so I have the offset and the
- 13:43:00calculation
- 13:43:02together and I don't see any difference
- 13:43:05let me convert it into a
- 13:43:11matrix and now you can
- 13:43:14see the moment I have a visual like
- 13:43:17Matrix visual where the concept of the
- 13:43:19parent Works remember the concept of the
- 13:43:21parent has to work and the moment I am
- 13:43:24on a matrix visual where we have this
- 13:43:26concept of a parent because remember all
- 13:43:28three of them were on the same kind of
- 13:43:31axis in the table Visual and the concept
- 13:43:33of hery is not too much valid in case of
- 13:43:37table visual it is more valid in case of
- 13:43:41Matrix visual now here you will start
- 13:43:44seeing a difference so one of the
- 13:43:46difference which you are seeing here
- 13:43:47this is the first value if you remember
- 13:43:49this is my first value to this
- 13:43:51calculation this also get carried
- 13:43:53forward to the first calculation we are
- 13:43:54still in the brand one when I go to the
- 13:43:57brand 10 this is my boundary of the
- 13:43:59brand 10 and as you can see inside the
- 13:44:01brand 10 it is not getting the value for
- 13:44:05for the first
- 13:44:06category and to make it easier to
- 13:44:08understand let me first remove the
- 13:44:11subtotals so let me hide the
- 13:44:13subtotals now as I've hidden the
- 13:44:15subtotals what do you see between offset
- 13:44:18and the calculation what is the
- 13:44:20difference between the two so to observe
- 13:44:22that look at the brand 10 only inside
- 13:44:25the brand 10 inside the brand 10 what
- 13:44:27you are seeing here is here I'm getting
- 13:44:30both the values but only I'm getting
- 13:44:32here one because the reset at the one
- 13:44:34has
- 13:44:36applied so it means if you're not able
- 13:44:39to use Partition by you can still
- 13:44:43use reset so you have a reset option
- 13:44:46which can work in such scenarios so now
- 13:44:49we have understood that how we can use
- 13:44:52reset in offset function instead of
- 13:44:56Partition by and if you remember we do
- 13:44:59have the
- 13:45:01flexibility of using numbers here 1 2
- 13:45:04and 3
- 13:45:05depending on what parent we wanted to
- 13:45:07have reset we can also try to experiment
- 13:45:11with that but I'm not going to do that
- 13:45:13experiment as of now I'll leave it for
- 13:45:16you to go ahead and try that out the
- 13:45:19next visual calculation we wanted to
- 13:45:21explore is using the rank function and
- 13:45:24now I would like to use the next
- 13:45:26function which is nothing but rank new
- 13:45:29calculation rank function I'm going to
- 13:45:32use is rank not rank X this is the new
- 13:45:34function function came in April 2023
- 13:45:37what I want to use is ties which is
- 13:45:39nothing but dense and what does dense
- 13:45:42means dance means if you are using a
- 13:45:45rank and the rank getting duplicated
- 13:45:47like 1 one one one then the next rank
- 13:45:49would still be two it is not going to
- 13:45:51skip the rank so we'll get continuous
- 13:45:54rank what is relation
- 13:45:58rows do I want to do I order by yes I
- 13:46:01would like my ranks based on
- 13:46:03net but you know that you can do it
- 13:46:05without that
- 13:46:10also and the ranks are based on the net
- 13:46:14as you can see the moment I sorted it
- 13:46:16you are getting your correct
- 13:46:20ranks and if you want to do the rank
- 13:46:23based on the axis you can add another
- 13:46:25visual calculation click here and in the
- 13:46:27visual calculation give it rank
- 13:46:30one rank function
- 13:46:36dance
- 13:46:38Rose leave everything else it is based
- 13:46:41on the AIS as you can see
- 13:46:45here let's go back to the visualization
- 13:46:48what's the beauty as you know we can
- 13:46:50change
- 13:46:51it we can add additional one till the
- 13:46:55rank should work based on the
- 13:46:57net we have not explicitly called it for
- 13:47:00category you explicitly called it for
- 13:47:02net so that is what it is going to
- 13:47:03continue to work for the net when we do
- 13:47:06the visual calculation now the visual
- 13:47:08calculations are also limited to visual
- 13:47:11so whatever data is not present in the
- 13:47:13visual it is not going to do a ranking
- 13:47:16for that if you are looking for that all
- 13:47:18kind of a scenario you might not be able
- 13:47:21to replicate that here so you are able
- 13:47:23to use now rank also in the visual level
- 13:47:28calculation with the visual level
- 13:47:30arguments like row can we do a reset
- 13:47:34here
- 13:47:35of the rank and for that let me
- 13:47:38duplicate this page after
- 13:47:43renaming here let me change it to Matrix
- 13:47:47Visual and let me add
- 13:47:51brand disabl row sub totals and expand
- 13:47:56it as of now as you can see the ranks
- 13:47:59have changed their order a little bit
- 13:48:01because the thing is the moment I sorted
- 13:48:03it on net the net is actually sorted not
- 13:48:07for the brand and category it is first
- 13:48:10sorted on the top brand and then the
- 13:48:12second top brand and then inside that
- 13:48:14for the category and that is why you see
- 13:48:16this rank is not working in a particular
- 13:48:20descending order but on a table visual
- 13:48:21it is going to work as expected and but
- 13:48:24we would like to add a new calculation
- 13:48:26here which is nothing
- 13:48:29but rank three and here I would like to
- 13:48:32use rank
- 13:48:35ties is
- 13:48:38T relation is
- 13:48:43row order by
- 13:48:46is
- 13:48:50net order by is
- 13:48:52net
- 13:48:56descending I leave blanks I leave
- 13:48:58Partition by I leave match by and I want
- 13:49:00reset reset as right now I'll use lest
- 13:49:04parent but in this case lowest parent
- 13:49:05and highest parent are same so let's try
- 13:49:07that out so it is saying reset parameter
- 13:49:09cannot be used with the combination of
- 13:49:11order by and Partition by because I've
- 13:49:12used order by so it is not allowing me
- 13:49:14to use the reset so let's go ahead and
- 13:49:18edit this
- 13:49:19calculation and remove the order by does
- 13:49:22it
- 13:49:25work yes it does work as we have learned
- 13:49:28only the combinations can work exis and
- 13:49:31reset order by and Partition by let's go
- 13:49:35back to the visual and as you can see
- 13:49:37the we are able to partition it when we
- 13:49:40are using the default access you can now
- 13:49:43observe that the categories are ranked
- 13:49:46properly inside each brand so there is a
- 13:49:49reset happening for each brand and
- 13:49:51categories are ranked inside that so we
- 13:49:55know that the combination is there and
- 13:49:56that combination is applied on this
- 13:49:59visual the row and AIS and order by and
- 13:50:02Partition by but we don't never want it
- 13:50:04to to call it explicit so but still it
- 13:50:07is very good that we are able to change
- 13:50:09it for category and brand whenever the
- 13:50:11access is changing it's still it is
- 13:50:12working so that kind of rank is working
- 13:50:15for us the next visual calculation which
- 13:50:17we would like to explore is using the
- 13:50:19row number function now next thing which
- 13:50:22you want to experiment with is the row
- 13:50:25number with the row number I would like
- 13:50:27to create a table Visual and this time
- 13:50:29I'm going to bring in something which is
- 13:50:31having data at much granular level so
- 13:50:33I'm going to bring in order number
- 13:50:34number as non- summarized and I'm going
- 13:50:36to bring in sum of quantity I no don't
- 13:50:39have any measure here I would like to
- 13:50:41sort it on sum of quantity and now I
- 13:50:44would like to build a calculation which
- 13:50:47is row number I want to give the unique
- 13:50:48row number here in this visual to do
- 13:50:51that I will start a new visual
- 13:50:54calculation and I'll call it
- 13:50:56row num one and I'm going to use the
- 13:51:00function row number and in this row
- 13:51:02number function I'm going to use the
- 13:51:03relation which is
- 13:51:05row next thing is order by and in this
- 13:51:08order
- 13:51:10by I'm going to use the something which
- 13:51:13is we have in this visual sum of
- 13:51:15quantity see I'm not created a measure
- 13:51:16here I'm going to use sum of quantity in
- 13:51:19this visual calculation which is only
- 13:51:23present as a implicit measor not an
- 13:51:27explicit mejor defined by me with the
- 13:51:30help of that implicit one I'm using it
- 13:51:33and as you can see on on the first one
- 13:51:36you are able to see the row numbers
- 13:51:39getting from 1 2 3 4 let's go back to
- 13:51:41the report and you can see that we do
- 13:51:44have the row numbers here 1 2 3 4 5 6 7
- 13:51:478 9 10 can we create a multiple
- 13:51:49combination and can it still work out so
- 13:51:52let's go ahead and add City ID to the
- 13:51:55visualization yes it is working but
- 13:51:57order number is still giving the
- 13:51:59uniqueness and anyway we will we'll
- 13:52:01always get a unique combination so let
- 13:52:03me add an item ID also
- 13:52:05here Item ID and City ID still we are
- 13:52:08getting the numbers and let me change
- 13:52:10this combination now now it is based on
- 13:52:13the combination of item ID and City ID
- 13:52:17no more the combination is based on the
- 13:52:18unique order number so based on the
- 13:52:21unique combinations also it is working
- 13:52:23and we have
- 13:52:24not changed anything in our function the
- 13:52:27row number function like we have not
- 13:52:29done any explicit call here without any
- 13:52:31explicit call of the relation it is
- 13:52:34still working so that is what the
- 13:52:36advantage of visual calculation the next
- 13:52:39visual calculation which I want to try
- 13:52:40out is on the window function and it did
- 13:52:43not work out for me so let me showcase
- 13:52:45you what I tried out and what did not
- 13:52:47work for me but you can go ahead and try
- 13:52:49and experiment and let me know in case
- 13:52:51you are able to make it work so I went
- 13:52:54ahead and added
- 13:52:57brand along with net
- 13:53:04now I will go ahead and add the new
- 13:53:06visual calculation and this time I would
- 13:53:08like to use window function I've done
- 13:53:11few experiment none of them has given me
- 13:53:13the desired success so calculate net
- 13:53:16window as you know window require first
- 13:53:19to argument the window position
- 13:53:22something which we have experimented
- 13:53:23with the range so if the window doesn't
- 13:53:25work range is there with us to do all
- 13:53:28these calculation we can use that
- 13:53:31so from what from the minus one
- 13:53:36relative position
- 13:53:39to zero relative
- 13:53:42position and the next thing which I
- 13:53:44wanted to use is relation itself which I
- 13:53:46was trying to give
- 13:53:47rows and I don't want to give any order
- 13:53:52by right now and try to experiment with
- 13:53:54the window
- 13:53:55function and it did not work as I was
- 13:53:58expecting it to work because it is
- 13:54:01requiring a unique context which I'm not
- 13:54:03able to Pro here I went ahead and I said
- 13:54:07okay let me edit the calculation let me
- 13:54:09see if order by can help
- 13:54:12us I used order by
- 13:54:14net
- 13:54:19DEC and I again committed this
- 13:54:22calculation and it did not work out for
- 13:54:26me so seems like for the window function
- 13:54:29it is not working for me the other thing
- 13:54:31which I can do is absolute to Absolute
- 13:54:33this is something which
- 13:54:34can work for us zero
- 13:54:38absolute
- 13:54:42to minus1
- 13:54:45Absolute let's try from 1 absolute to
- 13:54:47minus one absolute and let's see does it
- 13:54:50work no it didn't so seems like we will
- 13:54:55not be able to use window function as of
- 13:54:57now in the visual level calculation
- 13:54:59using the
- 13:55:04rows as
- 13:55:07X's Ive even tried the experiment by
- 13:55:09giving here all
- 13:55:11selected brand and item
- 13:55:16brand so that calculation also doesn't
- 13:55:19work for me but this is experiment for
- 13:55:22you can you make the window function
- 13:55:25work in the visual level calculations go
- 13:55:27ahead and try that out but now we know
- 13:55:30that we have made quite a few functions
- 13:55:33working for
- 13:55:35the visual calculation that include
- 13:55:37offset index and rank noow number the
- 13:55:41four functions out of the five functions
- 13:55:43which are very similar to SQL window
- 13:55:45function which provides us order by and
- 13:55:47Partition by we are able to use in
- 13:55:49visual level calculations one of the
- 13:55:51most common function which you use very
- 13:55:54frequently is rank now can we use rank X
- 13:55:56in visual calculat because if we can use
- 13:55:58rank X in the visual calculation it will
- 13:56:00Pride a lot of flexibility when we are
- 13:56:02going to calculate the rank so so I'm
- 13:56:05going to go ahead and try out the rankx
- 13:56:06function in the visual calculation and
- 13:56:09explore how can it help us doing visual
- 13:56:11calculation and how our ranks will
- 13:56:13become more Dynamic when we use rank X
- 13:56:15in the visual calculation so I'm on the
- 13:56:17powerb file and here what I'm going to
- 13:56:19do is I'm going to add a new page and
- 13:56:20inside this new page I'm going to add
- 13:56:22brand and
- 13:56:25net make it a little bigger and convert
- 13:56:29it into a table visual also now here I
- 13:56:32want to add a rank so how do we use use
- 13:56:34a rankx function and do it but this time
- 13:56:37I don't want to use the rankx function
- 13:56:38as a measure I want to use it as a
- 13:56:39visual calculat let me click on the
- 13:56:41visual that's how the visual
- 13:56:42calculations are enabled go to the Home
- 13:56:45tab and there I'm going to click on the
- 13:56:47calculation new calculation is the
- 13:56:49option to do that I'll click on the new
- 13:56:51calculation visual calculations have
- 13:56:52been opened now here I'm going to write
- 13:56:54down a new calculation which is Rank and
- 13:56:56rank I'm going to use the rank X
- 13:56:59function rank X if you remember in the
- 13:57:02rank X the first thing which which we
- 13:57:04need to give is the table and that is
- 13:57:06where I'm going to use rows expression
- 13:57:08is basically our column where we are
- 13:57:11going to thought third item usually we
- 13:57:13keep empty fourth is order which is by
- 13:57:16default descending and dies is the fifth
- 13:57:18one which is by default so let me start
- 13:57:20giving that so here I'm going to use
- 13:57:22rows so I'm not going to use any like
- 13:57:25all selected table column I'm the second
- 13:57:28one is my net measure which I wanted to
- 13:57:30use and third one is the values column
- 13:57:32which I'm going to leave empty by
- 13:57:34default it is descending but I can give
- 13:57:36descending here and the dense because
- 13:57:38skip is default one dense here as my
- 13:57:40visual is already sorted on net you can
- 13:57:42see it is showing you the rank one for
- 13:57:45the maximum amount of net what we have
- 13:57:48now question which you may ask is how
- 13:57:50it's making a difference you would have
- 13:57:51done this rank X function all selected
- 13:57:53it would have behaved in the same manner
- 13:57:55isn't it so let's do one thing let's try
- 13:57:58to see if you already have a rank
- 13:57:59function I do have a rank net which is
- 13:58:02also on all selected item net descending
- 13:58:05dance very similar major also I have so
- 13:58:07I have a visual calculation I have a
- 13:58:09major and you can see this is visual
- 13:58:11calculation and this so while I have
- 13:58:14both and both are giving the same but
- 13:58:16let's we go ahead go to brand and click
- 13:58:19on this arrow and I change it to
- 13:58:20category the moment I change it to
- 13:58:22category the thing which you will notice
- 13:58:23here basically this rank got adjusted
- 13:58:25but this is the one which is not getting
- 13:58:27adjusted now why it is not getting
- 13:58:28adjusted because it is talking about
- 13:58:30item brand brand is not in the context
- 13:58:32and that is where it all brand is not
- 13:58:34get listed but here we are talking about
- 13:58:36rows so here it is changed from Brand to
- 13:58:39category and now it is able to adjust
- 13:58:42the second case which we can test out is
- 13:58:43basically let's convert this into a
- 13:58:45matrix now I have category and inside
- 13:58:47that let bring in brand inside the
- 13:58:49category I have brand I added the brand
- 13:58:52and I'm going to expand this Matrix
- 13:58:54visual let's see what do you see a
- 13:58:56difference here now here what is
- 13:58:57happening here is this brand is 1 to n
- 13:59:00so each brand is getting rank within the
- 13:59:03category so there's a partitioning which
- 13:59:04is happening but here when you see these
- 13:59:06things this is not getting same way
- 13:59:08partition there are different ranks and
- 13:59:10if you see there is a one two here and
- 13:59:11then there's a three here so remember
- 13:59:13category 4 Brand two is at number three
- 13:59:16and category two brand 8 and brand N9
- 13:59:18now to understand this let me convert
- 13:59:20this back into a table visual when I
- 13:59:23convert it into table Visual and I sort
- 13:59:25it on net which is right now the Sorting
- 13:59:27you can see that it is actually sorting
- 13:59:29it on the combination so in the second
- 13:59:32level the Brand level when I is seeing
- 13:59:34in The Matrix visual while the rank is
- 13:59:36partitioning it by category this one is
- 13:59:39not getting it partitioned now we we
- 13:59:41have like you know rules how do we
- 13:59:42partition and not partition in different
- 13:59:44functions like we have rank function
- 13:59:47where we can give Partition by and there
- 13:59:48we can deal with but in this scenario
- 13:59:50especially with the rank X function as
- 13:59:51you can see now when I'm adding two it
- 13:59:54is taking both of them as rows and you
- 13:59:55know it is giving the rank based on that
- 13:59:58now this is one of the challenge which
- 13:59:59you had in the past like because if I
- 14:00:01keep on adding how many ranks I'm going
- 14:00:03to create and this is where you know a
- 14:00:06visual calculations help helps us a lot
- 14:00:08that my rank is independent of what I
- 14:00:12have in the calculation I simply using
- 14:00:15row and it can change based on the
- 14:00:16visual so I don't have to specify a
- 14:00:18particular column I get that
- 14:00:20Independence that I can change my column
- 14:00:23inside my visual or I can change my
- 14:00:25group buys inside my visual and my rank
- 14:00:27can adjust to that while in major
- 14:00:29calculation that's not possible because
- 14:00:30they are tied to a particular column of
- 14:00:32field and they're going to behave in a
- 14:00:35manner they should behave when this
- 14:00:37column is tightly attached to that
- 14:00:38particular measure so this is the real
- 14:00:41benefit and now you would have
- 14:00:42understood that you know what benefit
- 14:00:43each one of them has now sometime I
- 14:00:45would like to have mejor because I have
- 14:00:47that kind of a scenario which is
- 14:00:48basically the rank should get partition
- 14:00:50as soon as I add something else and that
- 14:00:52is what the case is and sometime you
- 14:00:54know I have to explain that again and
- 14:00:56again in many videos I've done that the
- 14:00:57moment you add additional stuff the rank
- 14:01:00is inside that additional column which
- 14:01:02is not participating in the rank or get
- 14:01:04partitioned by that other column because
- 14:01:05we are limited by what column we have
- 14:01:07put it into the rank X function in a
- 14:01:09measure but that's not the case with the
- 14:01:10visual calculation visual calculation
- 14:01:13has been enounced in October 2024 so
- 14:01:16let's have a look at what all
- 14:01:18enhancements has been done into the
- 14:01:20visual calculations in October 2024
- 14:01:23there are few enhancements which has
- 14:01:25been rolled out on the visual
- 14:01:27calculation and one of them is using the
- 14:01:30field parameters along with visual
- 14:01:32calculations which we are going to
- 14:01:34explore today so let's jump on the
- 14:01:36release note look at what are the new
- 14:01:39features which has been given for visual
- 14:01:41calculations and we will explore them
- 14:01:43onto the powerbi desktop I'm here on the
- 14:01:46powerbi October 2024 feature summary and
- 14:01:50in this feature summary one of the
- 14:01:52feature which you will find under the
- 14:01:54content reporting is visual calculation
- 14:01:57update foreview once we click on that we
- 14:01:59go down it talks about combo charts are
- 14:02:02Now supported in theual visual
- 14:02:04calculation now the combo chart are
- 14:02:05supported so you can now use visual
- 14:02:07calculation in combo chart such as line
- 14:02:09and cluster column chart just you could
- 14:02:12in the other chart types here is an
- 14:02:14example of visual calculation reporting
- 14:02:16moving average for 34s so one example
- 14:02:19has been given for combo visual where we
- 14:02:21can see the moving average has been
- 14:02:22added on the line three quarters moving
- 14:02:25average has been used on the line of
- 14:02:28combo visual line clustered column chart
- 14:02:34and the another feature which we are
- 14:02:36looking forward mainly for today is
- 14:02:37field parameters are Now supported this
- 14:02:40month we have enabled the visual
- 14:02:42calculation with field parameters you
- 14:02:43can add visual calculation to the visual
- 14:02:45containing field parameter or vice versa
- 14:02:47field parameters can be used to quickly
- 14:02:49switch around what's shown in the visual
- 14:02:51for example you can create field
- 14:02:53parameter to enable your users to decide
- 14:02:56which attribute Dimension to show for
- 14:02:58example field parameter called Product
- 14:03:00attribute can be used to determine the
- 14:03:01percentage of grand total you have the
- 14:03:03percentage of grand total which is using
- 14:03:05rows and you can switch the AIS using
- 14:03:07the field parameter and it will continue
- 14:03:09to
- 14:03:11work another update is faster ways to
- 14:03:14add templated visual calculation you can
- 14:03:17now add templated visual calculation
- 14:03:19with fewer clicks by clicking on the
- 14:03:20button as part of new visual calculation
- 14:03:23previously to get the visual template
- 14:03:25you have to go to the visual calculation
- 14:03:27and there you have the option to choose
- 14:03:29the template from the calculation now
- 14:03:31the template option is available
- 14:03:33directly under the new visual
- 14:03:34calculation under the Home tab and you
- 14:03:36can use it from there you can also start
- 14:03:39new calculation without template using
- 14:03:41custom option so these are some of the
- 14:03:43updates let me jump onto a power VA file
- 14:03:46and showcase you these updates so I'm
- 14:03:49here on the powerbi file this is the
- 14:03:50file where I have already done some
- 14:03:52visual calculations in the past also I'm
- 14:03:54using the dark mode which is recently
- 14:03:56released so you can see that my uis of
- 14:03:58the powerbi are in the dark mode first
- 14:04:01of all I'm going to add a new page in to
- 14:04:03this UI and I will take you through the
- 14:04:06features one by one first of all let me
- 14:04:08add a table visual so I'm going to add a
- 14:04:10table Visual and inside the table visual
- 14:04:12let me bring in brand and the major net
- 14:04:15I have a visual brand with the net and
- 14:04:17let's say I want to add a visual
- 14:04:18calculation how do we add a visual
- 14:04:20calculation I to go to the Home
- 14:04:22tab and inside the Home tab I have new
- 14:04:24visual calculation and as you can see
- 14:04:26the new feature which is already been
- 14:04:28discussed that you have the access to
- 14:04:29the template quickly you don't have to
- 14:04:31go to the calculation and choose one of
- 14:04:33them so let's choose percentage of grand
- 14:04:36total as one of the calculations so
- 14:04:38using that template we have come here
- 14:04:39directly you can see we have percentage
- 14:04:41of ground total and I can use net as my
- 14:04:44major collapse all function is going to
- 14:04:46give me the grand total net again and
- 14:04:49xes is rows that remains Dynamic now I
- 14:04:53got my percentage of total now you are
- 14:04:55not seeing percentage and I'll tell you
- 14:04:56the new feature which will enable you to
- 14:04:58see it in the percentage format also
- 14:05:00that came very recently few months back
- 14:05:02let's go back now we would like to
- 14:05:05format this percentage of total click on
- 14:05:07this go to the format I opened the
- 14:05:09format now inside the format go to
- 14:05:12properties and inside the properties
- 14:05:14data format choose the percentage of
- 14:05:16grand total the data type is decimal the
- 14:05:18format is percentage once you choose the
- 14:05:21percentage format in the decimal data
- 14:05:23type you will be able to see in the
- 14:05:25percentage
- 14:05:27format we have saw one more feature and
- 14:05:30that the feature is it is supported on
- 14:05:32combo visual so let's make this chart as
- 14:05:34line cluster and let's try to move this
- 14:05:37percentage of grand total from the
- 14:05:39column of Y AIS line yis visual is now
- 14:05:41showing percentage of total along with
- 14:05:43the net what we can do now is we can
- 14:05:46sort this visual on brand and observe it
- 14:05:49again let's sort this on
- 14:05:52brand we can observe the visual again
- 14:05:55now we can see net as well as percentage
- 14:05:57of grand total together now to make it
- 14:06:00little more interesting where you can
- 14:06:02differentiate what line is doing this is
- 14:06:03what bar is doing let's convert this
- 14:06:06line into percentage of running total
- 14:06:08line so let's edit this calculation and
- 14:06:11how do we get running total so we have
- 14:06:13another template for running total but
- 14:06:15we do have a function running sum on the
- 14:06:18top I'll take running sum X is as rows
- 14:06:21so let's divide running Su by total and
- 14:06:23let me go back the report and let me
- 14:06:26sort this on the brand
- 14:06:29ascending and as you can see this is now
- 14:06:31showing me running percentage of total
- 14:06:33we are able to explore the second
- 14:06:35feature also let me convert this visual
- 14:06:38into table so we have a calculation net
- 14:06:41we have a percentage of grand total
- 14:06:43which is actually not percentage of
- 14:06:44grand total which is percentage of
- 14:06:46running total and I would also like to
- 14:06:49add one more function offset function or
- 14:06:51index function I'll add one more
- 14:06:53calculation here that calculation is
- 14:06:55last so what is there in the last so I
- 14:06:57can use offset function calculate we
- 14:06:59have previous here but I would like to
- 14:07:00use offset here net comma offset minus
- 14:07:05one relation is
- 14:07:07rows order by is net D actually I wanted
- 14:07:11to have specific order by and that is
- 14:07:13why I used this offset function for last
- 14:07:16row when I go back to the report now
- 14:07:18this function for that I need the
- 14:07:20Sorting on the net if you see if I do
- 14:07:22the Sorting on the net it's giving me
- 14:07:24the last two let's do one thing let's
- 14:07:26duplicate this visual CU they both need
- 14:07:29different sorting and now from the first
- 14:07:31visual I can remove the last row from
- 14:07:33the second visual I can remove percent
- 14:07:35of running total sort first visual on
- 14:07:37brand and second visual on net the
- 14:07:39reason for this change is because one of
- 14:07:41my visual calculation is working on the
- 14:07:43axis another one is working on the major
- 14:07:46sorting now what I would like to do is I
- 14:07:48would like to make both these visuals
- 14:07:49Dynamic by using field parameters so I
- 14:07:52would like to change the a/ row and see
- 14:07:55that the calculation is still holds true
- 14:07:57for that I would now like to create
- 14:07:59field parameter that is going to change
- 14:08:00my categorical variable or access to do
- 14:08:02that I will we go to modeling new
- 14:08:05parameters Fields I'm going to create
- 14:08:08access let me call it as access one and
- 14:08:11here I'm going to select from item table
- 14:08:13brand category subcategory from
- 14:08:15geography table I'll select state and
- 14:08:18city I will leave this option add slicer
- 14:08:21to this page as is I would like it to
- 14:08:23add and then I can now click on create
- 14:08:27to create my field parameter field
- 14:08:30parameter will add a table with a
- 14:08:31special syntax which enables us to use
- 14:08:33the field parameters this I have
- 14:08:35explained in the past also now we got
- 14:08:37the field parameter we also got a slicer
- 14:08:39we would like to utilize it let me first
- 14:08:42of all adjust it little
- 14:08:44bit now we have adjusted our visual but
- 14:08:46our visual are not following any access
- 14:08:48isn't
- 14:08:49it let's go ahead and change the visuals
- 14:08:53to use access I go to the first Visual
- 14:08:55and I will go to access drag XIs one and
- 14:08:58remove brand I will do the same in the
- 14:09:00second visual I'll click on the second
- 14:09:02visual drag access and remove brand
- 14:09:04visual is sorted on AIS or categorical
- 14:09:07variable and second one is sorted on the
- 14:09:09measor now let's change the access both
- 14:09:12the visuals should change if I change
- 14:09:13the access one I change it to category
- 14:09:16as you can observe in the first visual
- 14:09:17we are still getting the correct
- 14:09:20percentage of running total it is still
- 14:09:23rolling up to the
- 14:09:26100% so you can observe in the second
- 14:09:28vual that we are still getting the
- 14:09:30correct prior with the help of field
- 14:09:32parameters XIs has changed or the row
- 14:09:35has changed or the categorical variable
- 14:09:37has changed but still we are able to see
- 14:09:39the last row value based on visual
- 14:09:42calculation which we don't have to
- 14:09:43change let's look at State when we look
- 14:09:46at the state calculation again you can
- 14:09:48see my percentage of running total is
- 14:09:50still working as well as you can observe
- 14:09:53that the prior calculations are still
- 14:09:55working fine are still getting the
- 14:09:57previous row value in spite of change in
- 14:10:00the categorical variable /xs look at how
- 14:10:04simple and quick calculation we have
- 14:10:06done and those quick calculations have
- 14:10:09not only worked with what categorical
- 14:10:12variables or what axis or what row we
- 14:10:14had in that visual even when we changed
- 14:10:16it it continue to work and the last item
- 14:10:19before we conclude for today let's have
- 14:10:21more than one and does it continue to
- 14:10:23work as you can see calculations are
- 14:10:25still working and this is the beauty of
- 14:10:29visual calculation and we can say visual
- 14:10:31calculations are better to together with
- 14:10:34calculation group so why don't you go
- 14:10:35ahead and try this out so now let's dig
- 14:10:39deep into the conditional formatting
- 14:10:40details for doing that what I've done is
- 14:10:42I've already created few set of visuals
- 14:10:44where we are going to experiment with
- 14:10:45I'll also tell you where you will not be
- 14:10:47able to do the conditional formatting so
- 14:10:49what do I mean by conditional formatting
- 14:10:50so in every visual when you go to the
- 14:10:52visual format you have a color option
- 14:10:54now the color option under the bars in
- 14:10:56case of bar visual in case of column
- 14:10:58visual column in case of Matrix and
- 14:11:00table visual you will have the colors
- 14:11:02under same cell element various
- 14:11:04conditional formatting options are
- 14:11:05available table Visual and the Matrix
- 14:11:08visual have a lot of option they have on
- 14:11:09background font then they have datab
- 14:11:11bars icons web URL lot of options now
- 14:11:15let's start with first of all the
- 14:11:17conditional formatting on a table visual
- 14:11:19so conditional formatting has few
- 14:11:20limitations like in case of the Matrix
- 14:11:22visual when you click on the Matrix
- 14:11:24Visual and you want to do conditional
- 14:11:25formatting you go to series you will not
- 14:11:27see anything for the rows and the
- 14:11:29columns me you can't do conditional
- 14:11:30formatting on R feeds and column feeds
- 14:11:32on table visual on contary you will be
- 14:11:34able to do almost on everything on the
- 14:11:36visuals like bar and Etc you cannot do
- 14:11:40it if you have more than one major or if
- 14:11:42you have a legend in these kind of
- 14:11:43visual the the sign is basically you see
- 14:11:45this FX button and the moment you stop
- 14:11:47seeing this FX button you do any action
- 14:11:49and you don't see this FX button it
- 14:11:51means you will not be able to do the
- 14:11:52conditional formatting so let's say if I
- 14:11:53drag category on the legend you will no
- 14:11:55more see that okay so it means the
- 14:11:58option is not available you can see the
- 14:12:00color color for each series but you
- 14:12:02can't do a conditional form similarly
- 14:12:03when you use more than one major also
- 14:12:05you will not get that option you don't
- 14:12:07have the options for the conditional
- 14:12:08formatting the FX is not there in case
- 14:12:10you have a pi visual me create
- 14:12:12one you don't have conditional
- 14:12:14formatting options you go to the slice
- 14:12:16you don't have the option same way if
- 14:12:17you create a line visual you again don't
- 14:12:20have a conditional formatting option
- 14:12:21under the line so there is no option
- 14:12:23under the color and at few places we
- 14:12:25will be able to get this even without
- 14:12:27having those options at other places
- 14:12:29we'll not be able to get it so let's
- 14:12:30start with the conditional formatting
- 14:12:32and first of all I'll I'll quickly
- 14:12:33explain you the two conditional
- 14:12:35formattings options to you on the table
- 14:12:38visual so in the table visual I can do
- 14:12:40conditional formatting on any of these
- 14:12:42but let me bring in a major so margin
- 14:12:44major I want to do background
- 14:12:46conditional formatting of form or data
- 14:12:48bar or icon all are available here I can
- 14:12:50go to the background conditional
- 14:12:51formatting I click it you immediately
- 14:12:52start seeing because when you click on
- 14:12:54FX You Realize by default the gradient
- 14:12:56conditional formatting already been
- 14:12:57picked up in the gradient conditional
- 14:12:58formatting you can use a major and it is
- 14:13:00not necessary that when I use margin I
- 14:13:02need to use margin measure I can use any
- 14:13:04other measure then I can also I specify
- 14:13:07when what should I do for empty values
- 14:13:09don't summarize treat it as zero or
- 14:13:10specific color so this option is
- 14:13:12available in the gradient condition form
- 14:13:14I can use the minimum maximum color
- 14:13:16gradient and I can choose it now if it
- 14:13:18is a reverse like discount it should be
- 14:13:19reverse the minimum value is good
- 14:13:21actually I can have a middle color if I
- 14:13:23want and once I use the middle color uh
- 14:13:25it will give me a try color gradient and
- 14:13:27I can use any color in that manner I can
- 14:13:29actually build in my gradient
- 14:13:32conditional formatting it can apply to
- 14:13:33values and total and total only right
- 14:13:35now I'm keeping it only as values and
- 14:13:37I'll apply gradient conditional format
- 14:13:40the other options here are rule base and
- 14:13:42value base which we will explore in a
- 14:13:44while you are now getting gradient
- 14:13:46conditional formatting the same option
- 14:13:47would be available in all the visuals
- 14:13:48now here in the table visual we have
- 14:13:50more options like we have option for
- 14:13:51background we have option for uh font
- 14:13:54color datab bars Etc but this font and
- 14:13:56background color so this option would be
- 14:13:58available in in the color option of most
- 14:14:00of the visuals now cable visual is the
- 14:14:02only visual where you can actually
- 14:14:04create a row conditional formatting
- 14:14:06because if you can repeat this I can go
- 14:14:08ahead and you know I I chose my margin
- 14:14:10percentage I can go and repeat this on
- 14:14:13discount percentage repeat this on net
- 14:14:14repeat this on brand so I can actually
- 14:14:17create a complete row conditional for
- 14:14:18same conditions I have to repeat the
- 14:14:20same logic I have to repeat and it is
- 14:14:21not necessary then when I'm I'm doing
- 14:14:23conditional formatting on Brown it is
- 14:14:24not necessary when I do conditional
- 14:14:26formatting on discount percentage that I
- 14:14:27have to use discount percentage I can
- 14:14:29still go ahead and use margin percentage
- 14:14:31and I can still use the same logic so I
- 14:14:33will have similar kind of colors and if
- 14:14:34you repeat this you will get a color
- 14:14:35draw then comes the font formatting
- 14:14:38let's complete the different kind of
- 14:14:39formatting and then we will go to the
- 14:14:40rules and the field value in the font
- 14:14:42condition formatting you actually color
- 14:14:44the font so let me color the font this
- 14:14:45time based on the rule values only value
- 14:14:47gr total I want to Value usually what
- 14:14:49happens value rule based conditional
- 14:14:51formatting let me apply it on based on
- 14:14:53the I'm applying it on net but I will
- 14:14:55apply based on the margin percentage I
- 14:14:57should be knowing what are what is the
- 14:14:58values I have because values will change
- 14:15:00based on the group wise now even though
- 14:15:02I'm doing it on percentage column and
- 14:15:03this is something you should remember
- 14:15:05that even though I'm going to do it on
- 14:15:06percentage kind of a column it need to
- 14:15:08be done on number everything should be
- 14:15:09number and it it should be between 0 and
- 14:15:111 so these are basically. 13.13 .14 so I
- 14:15:15have 10% 11% 12% 133% 14% that's the max
- 14:15:19range I have so what I can do I can say
- 14:15:21okay it need to be red when it is
- 14:15:22between 0
- 14:15:24to12 okay everything should be number
- 14:15:26now because it is strictly less than
- 14:15:28here what I can do is I can go ahead and
- 14:15:31say greater than and equal to again
- 14:15:32point
- 14:15:33.12 and then not percentage I want a
- 14:15:36number and from there strictly less than
- 14:15:39.14 percentage 14 percentage and this
- 14:15:42color I can keep it as
- 14:15:45orange so again everything is number not
- 14:15:47percentage now let's add one more rule
- 14:15:50again we have given the last condition
- 14:15:51which is basically till
- 14:15:5514% 12% to 14% strictly less than 14 so
- 14:15:59now it could be greater than 14% .14 and
- 14:16:02it could go till one or it can whatever
- 14:16:04number you wanted to give the best way
- 14:16:05is to give it at one and here like if
- 14:16:09you have negative values the first value
- 14:16:11you can go ahead and change to let's say
- 14:16:13minus1 or - 100 whatever you want minus
- 14:16:15one could also do the job so what are my
- 14:16:18conditions now my condition is from
- 14:16:20negative to positive 12% number
- 14:16:23everything it's going to be red from 12
- 14:16:28to 14% it's going to be yellow and from
- 14:16:3014% now let's change this from 14% to
- 14:16:34anything which is till 100% should be
- 14:16:36green so we use green color so now this
- 14:16:39is the color what we want let's click on
- 14:16:41okay and see how does it apply and as
- 14:16:44you can see it has applied the color now
- 14:16:45the first color is not visible let's
- 14:16:47make it little bit bold so that we can
- 14:16:49see it so we can make the values bold if
- 14:16:51we want like this to look at the color
- 14:16:55so these are the condition now we have
- 14:16:56applied and now based on that condition
- 14:16:58the colors are coming I'm reverting back
- 14:17:00the Bold right as of now
- 14:17:03so this is Rule based conditional
- 14:17:04formatting the rule which you have to
- 14:17:06remember percentage means allocation
- 14:17:08based and number means you have the
- 14:17:11exact value which you are planed to use
- 14:17:12even if your column is a percentage
- 14:17:14column you need to use number because
- 14:17:18you are giving a range you are giving
- 14:17:20the exact number range and for that you
- 14:17:23need to use numbers not percentage so we
- 14:17:25are done with the font conditional
- 14:17:27formatting now what is this data bar so
- 14:17:29basically what happens when you click on
- 14:17:30the data bar I'll keep it on net it will
- 14:17:32add a bar The Filling of the bar if you
- 14:17:34go to the FX the option you have is the
- 14:17:36lowest value highest value which you can
- 14:17:38give you can get the values or by
- 14:17:39default it will decide by itself you
- 14:17:41have for positive bar and negative bar
- 14:17:43and X is color now there's no
- 14:17:45conditional formatting further on it you
- 14:17:47can choose left to right or right to
- 14:17:48left also you can choose it will start
- 14:17:51from the other direction also there's
- 14:17:53one option if you want to only want to
- 14:17:54show the bar you don't want to show the
- 14:17:57number you can choose that in that case
- 14:18:00you will only see the
- 14:18:01bar so these kind of stuff you can do
- 14:18:04now comes the icon conditional
- 14:18:05formatting in case of Icon conditional
- 14:18:07formatting you can click on FX and there
- 14:18:09are always a rule again when you are
- 14:18:11using the percentage base please
- 14:18:12remember this is
- 14:18:14allocation so allocation of net value
- 14:18:17from 0 to 30.3% 33 to 67% and 67 to 100%
- 14:18:22and that is why I was warning you that
- 14:18:24we are not going to use the percentage
- 14:18:26when it is actually percentage so here
- 14:18:29you can have based on the percentage and
- 14:18:30you can use different kind of icons
- 14:18:33and you can say
- 14:18:35okay I got conditional formatting I can
- 14:18:38also do that on the brand one not that I
- 14:18:40can't do it in brand I can also go ahead
- 14:18:42and do the icon conditional formatting
- 14:18:44on brand I can choose a major here or
- 14:18:46actually we have a support for a text
- 14:18:49now we can say is brand one is brand 2
- 14:18:54is brand three and we can choose
- 14:18:57different one okay let's choose the four
- 14:18:59one so brand one is this so we can do on
- 14:19:02the based on the text also brand one
- 14:19:04brand 2 brand three brand four brand
- 14:19:06five only we have five so will'll get
- 14:19:08five there's no option to add here but
- 14:19:10we can add more rules and more icons so
- 14:19:13add let's say is brand six so we can add
- 14:19:15more rules but let's stick with these
- 14:19:17things and as you can see whatever
- 14:19:18Brands we have given some icons we are
- 14:19:20getting those icons now other than that
- 14:19:22what you can do is you can create a
- 14:19:23unique a measure and then can you you
- 14:19:26can do conditional formatting on that
- 14:19:27that is another way to of doing a
- 14:19:29conditional form what is this web URL
- 14:19:30condition formatting for the web URL you
- 14:19:32need to have the URL basically so let's
- 14:19:34see do we have a URL I actually have the
- 14:19:36image URL but I'm trying to use that so
- 14:19:38if you use the URL then it will start
- 14:19:40showing you underline here you want to
- 14:19:42use the underline so if you do the web
- 14:19:44URL conditional formatting it will start
- 14:19:46showing you the URLs underly URL so if
- 14:19:48you want the underlying there is option
- 14:19:50for URL icon and what happens when do
- 14:19:52you use that for that let me take one
- 14:19:54example let me open a new page and in
- 14:19:57that page let me bring in brand and
- 14:19:59brand URL and now let me go to this icon
- 14:20:02value value for a moment I'll change
- 14:20:04this image URL as web URL and now you
- 14:20:07can see the URL here now I'll go to the
- 14:20:09brand URL apply setting and in the icon
- 14:20:11I'll click on the values and the moment
- 14:20:14I switch this on you start seeing this
- 14:20:16icon small icon and this is how you use
- 14:20:18this URL icon so you want to show that
- 14:20:20small icon when you have actually the
- 14:20:22URL field you can do that but as of I'll
- 14:20:24for a longer run I'll just revert it
- 14:20:26I'll just shown you how to use that this
- 14:20:27is actually a image URL and the moment I
- 14:20:29make it image URL it will actually turn
- 14:20:31back and then you can go ahead and play
- 14:20:33with the size of the image you can go
- 14:20:34ahead and say okay I want to have 250
- 14:20:36you can have that much image one the
- 14:20:38limit of 150 has been removed as of now
- 14:20:40you can have much higher size of image
- 14:20:42so now back to the conditional
- 14:20:43formatting so now we have understand
- 14:20:44different kind of conditional formatting
- 14:20:46now I would like to use the Third Kind
- 14:20:48of conditional formatting which is the
- 14:20:50value based conditional formatting which
- 14:20:52is the major based conditional
- 14:20:53formatting which we can use in the field
- 14:20:54value so let's say I want to color these
- 14:20:57things based on category or brand say
- 14:20:59okay we'll go rule based conditional
- 14:21:00formatting also these days allowed text
- 14:21:02values isn't you can do that what I want
- 14:21:04is a little bit different so I want to
- 14:21:06create two majors here brand color and
- 14:21:08there is a reason why I'm creating so I
- 14:21:10create a new major from the table tool
- 14:21:12so let me create first major brand color
- 14:21:15I will also create one more major which
- 14:21:16is category color so let me again click
- 14:21:18on new major this time from the Major
- 14:21:20Tool and this major I already created
- 14:21:23and let me explain you this major and
- 14:21:24same way I've created the brand major so
- 14:21:26I'm also creating one category color and
- 14:21:28now let me explain you both have created
- 14:21:30in the same manner by using the switch
- 14:21:32true instead of switch true I could have
- 14:21:34used switch Max of item category or Max
- 14:21:37of or selected item category so when it
- 14:21:39is category one I'm giving one color
- 14:21:41when it is category two I'm giving
- 14:21:42another color when it is category three
- 14:21:44I'm giving blue let's say category four
- 14:21:46yellow and category five orange so in
- 14:21:49this manner I'm getting colors and
- 14:21:50there's other instead of other I can
- 14:21:52make it let's say
- 14:21:54black there's no other category so I can
- 14:21:56keep it anything I want it should return
- 14:22:00color otherwise it will give error now
- 14:22:02this is a color Mage it returns a color
- 14:22:04you can also use the Hax code the six
- 14:22:05digigit Hax code if you remember with
- 14:22:07the hash sign so if you it may be hash
- 14:22:11ff00 something like that you can also
- 14:22:13use so right now I'm using the names now
- 14:22:17what I'll do here is I'll go to this
- 14:22:19brand by net visual I go to bar and
- 14:22:22inside the FX I can go ahead I can use
- 14:22:24the field value I can go to the major
- 14:22:28and I can search for the brand major I
- 14:22:30can search for brand color I can do a
- 14:22:33condition now you can see each brand has
- 14:22:34got its own color Okay so the color is
- 14:22:36basically by brand and this helps us
- 14:22:39when we want to keep the consistent
- 14:22:40color so we'll go to this category
- 14:22:41Visual and apply the category color to
- 14:22:43keep it
- 14:22:44consistent now in The Matrix visual I
- 14:22:46have option I can have the color by
- 14:22:48brand or by category so let's use by
- 14:22:50brand here so we want to do the
- 14:22:52background color
- 14:22:54FX field value by brand
- 14:22:58color and that's where your max is going
- 14:23:00to play a role now
- 14:23:05so let me use brand
- 14:23:07color and as you can see other than the
- 14:23:09not null values we getting color in that
- 14:23:12particular
- 14:23:14row and as of now the conditional
- 14:23:17formatting value based conditional
- 14:23:19formatting don't color the blank values
- 14:23:20you might have to handle the value
- 14:23:22itself to get the color now we will use
- 14:23:24the other one and this category one now
- 14:23:27you will ask how would you use it into
- 14:23:29the I visual there's no option I'll tell
- 14:23:31you the way first of all I'll convert it
- 14:23:33into cluster column
- 14:23:35chart or bar chart I go to the FX I go
- 14:23:39to field value I can do the gradient
- 14:23:41conditional formatting as well as rule
- 14:23:42base but the easier for me as of now to
- 14:23:45explain to you is field value I use the
- 14:23:48color I created the colors I'm going to
- 14:23:51convert it back remember the colors take
- 14:23:53the values because I'm going to do this
- 14:23:55now on this visual which is actually a
- 14:23:57column visual which where the
- 14:23:58conditional formatting is available so
- 14:23:59we done it on a column visual convert it
- 14:24:01into a pi now we are doing it on a
- 14:24:03column visual again field value we
- 14:24:05clicked on FX came here field value
- 14:24:08color category
- 14:24:11color now if you see the two visuals
- 14:24:13have the same
- 14:24:15colors what happens when we filter
- 14:24:17something so let me bring a page level
- 14:24:21filter brand one till category 4 and
- 14:24:25category one retained those colors till
- 14:24:27they are red and yellow and this is the
- 14:24:30thing which we can do using this one we
- 14:24:32we can have colors which retained it but
- 14:24:35only challenge is across multiple
- 14:24:37measures or with Legends it will not
- 14:24:39work also we can't color The Matrix head
- 14:24:42and row but how do we color line we
- 14:24:44can't color line only we can show
- 14:24:46additional colored marker and this is
- 14:24:48other than the marker color switch so
- 14:24:50what you can do here is again convert it
- 14:24:52into a cluster column
- 14:24:54bar go to the effects do whatever color
- 14:24:57you want I want to do field conditional
- 14:24:59formatting I can search the color major
- 14:25:02and
- 14:25:03colors and then I convert it back to the
- 14:25:06line I get these
- 14:25:09markers colored markers and these are
- 14:25:13not same as the marker which we have in
- 14:25:15the line so if I enable the marker now
- 14:25:17you will say no no it is looking like
- 14:25:18this let me showcase you let me make
- 14:25:20them bigger you can see the background
- 14:25:23the bigger markers are coming back so
- 14:25:25they are not same as the marker what we
- 14:25:27have they are different separate markers
- 14:25:30but yes definitely you can show theor
- 14:25:32you can't color the line but you can
- 14:25:33show the colors so you've seen the
- 14:25:35advantage of field conditional
- 14:25:37formatting now when we have the field
- 14:25:39conditional formatting let's say if I
- 14:25:40need to do it in table visual I can
- 14:25:41quickly replicate it in all the columns
- 14:25:43and you know the same kind of
- 14:25:44conditional formatting and I can get row
- 14:25:45colors now I have done it on the
- 14:25:48category and brand but it doesn't mean I
- 14:25:50can't do it on measure I can do it on
- 14:25:52measure and we'll take up that example
- 14:25:54now before I do that I'll go to this cd2
- 14:25:57and I knowingly created this because now
- 14:26:00the colors are going to give a different
- 14:26:02meanings to this visualization so if you
- 14:26:05remember I suggested you instead of
- 14:26:06using Legends use to access when I use
- 14:26:11twox I don't have two colors now we have
- 14:26:14because we are going to going to go to
- 14:26:15the conditional formatting and from the
- 14:26:18conditional formatting now this is the
- 14:26:20first one is brand I'm going to use
- 14:26:22field value and the brand
- 14:26:25colors brand color I'm going to
- 14:26:28use and you can see the different brands
- 14:26:30have different color now you could have
- 14:26:31used the category colors and different
- 14:26:33categories could have colors and you can
- 14:26:36use other table visually where you can
- 14:26:37only have the categories now where from
- 14:26:39where I will get the legend definitely
- 14:26:40you can't get a legend here what you can
- 14:26:43do is create a very small cable
- 14:26:45Visual and this is brand isn't it so
- 14:26:49I'll put brand
- 14:26:54here and you can put the colors to the
- 14:26:57brand background or font whatever you
- 14:26:59want I'll put the background color we
- 14:27:03value
- 14:27:06brand and you can say these are the
- 14:27:08color of the brand so there a color of
- 14:27:11brand one brand 10 on all those now
- 14:27:12definitely you make it as thin as
- 14:27:14possible you can hide the total all
- 14:27:17those things you can
- 14:27:21do now in the second visual I'm going to
- 14:27:24use it on category it's not going to
- 14:27:26make much difference but I just wanted
- 14:27:28to show you how different is going to
- 14:27:30look like
- 14:27:32you have the category color I could have
- 14:27:34used brand color here and each brand
- 14:27:36could have the same color so you can
- 14:27:38create these kind of visuals using field
- 14:27:40value conditional formatting also rules
- 14:27:42support the name colors you can use do
- 14:27:45do you can also use rule based
- 14:27:47conditional formatting that supports the
- 14:27:48color that also support text now now the
- 14:27:50final which I going to do here is based
- 14:27:53on a measure and for that I would like
- 14:27:55to have a scatter visual I'm going to
- 14:27:57create the scatter visual again so I'll
- 14:27:59add a scatter Visual and this scatter
- 14:28:01visual I will have on the x-axis
- 14:28:04discount
- 14:28:06percentage on the y axis I'm going to
- 14:28:08have margin
- 14:28:11percentage I will use city as my values
- 14:28:15remember I can't use
- 14:28:17Legend I got so many dots I'm going to
- 14:28:20switch the
- 14:28:24x-axis I will invert I want the lowest
- 14:28:27values on the this side because I want
- 14:28:28to create a fourth quadrant here which
- 14:28:30is low discount High margin which is
- 14:28:32green how to create the quadrant so go
- 14:28:35down you have the lines reference
- 14:28:38lines and here you going to add constant
- 14:28:41lines not the average
- 14:28:43line constant line xaxis constant line
- 14:28:47and in the XX is constant line you have
- 14:28:49this FX and in the FX use the measor
- 14:28:52what you
- 14:28:52want it switches then go to the add line
- 14:28:57again use the type as Y axis constant
- 14:28:59line and in the y axis constant line in
- 14:29:02the FX now choose margin
- 14:29:05percentage you have to use the major
- 14:29:06because major is automatically going to
- 14:29:08take care of the grand total because it
- 14:29:10is a divided by B when you have the
- 14:29:12grand total is going to do and when I
- 14:29:14use the constant lines or when I use
- 14:29:15these reference line they are calculated
- 14:29:17at the grand total level now what I need
- 14:29:19here this see these are the average line
- 14:29:21our ba is given those this quadrant is
- 14:29:23high margin low discount green but how
- 14:29:26do I get this middle margin I need to
- 14:29:28now this is still high margin but High
- 14:29:32discount blue low discounts are red and
- 14:29:34yellow low discount low
- 14:29:37margin now for low margins I have two if
- 14:29:40the discount is low I can keep it orange
- 14:29:43if it is low margin High discount I will
- 14:29:45keep it red so I need a measure for that
- 14:29:48I'm going to create this measure and
- 14:29:49I'll tell you how I'm so let me create a
- 14:29:51new measure and I already have a script
- 14:29:54for
- 14:29:55that color scatter first of all for that
- 14:29:57we need gr to so using calculate
- 14:30:00discount percent for Discount all
- 14:30:03selected is going to give me the grand
- 14:30:05total or the average overall average
- 14:30:08same way overall margin calculate margin
- 14:30:10all selected why I'm using all selected
- 14:30:13so because if you apply the filter still
- 14:30:15it find the middle number with those
- 14:30:17filters then what we are saying is if
- 14:30:19margin is greater than the average
- 14:30:21margin and discount is less than the
- 14:30:23discount average discount overall
- 14:30:25discount than green margin is still
- 14:30:27greater but discount is also greater
- 14:30:29blue for both lower margins if the
- 14:30:31discount is low then yellow if the
- 14:30:33discount is greater then red this is
- 14:30:35what I wanted these are the four color I
- 14:30:37wanted I have a major now which can do
- 14:30:39that so I use switch through and created
- 14:30:40this measure now I would like to use
- 14:30:43this
- 14:30:44measure so I'll go to the
- 14:30:47markers inside the marker color I will
- 14:30:50use FX and inside the FX field value
- 14:30:54search for the color color skatter okay
- 14:30:57and you can see the four colors green
- 14:31:00blue yellow or orange if you want it and
- 14:31:03red the four colors have come we have
- 14:31:05got the four quadrants of different
- 14:31:08different colors so conditional
- 14:31:10formatting is a powerful tool to
- 14:31:13communicate the message the message
- 14:31:15could be done in terms of value or it
- 14:31:17could be done in terms of categorical
- 14:31:19values to enhance the visual experience
- 14:31:21you can use whenever you require to make
- 14:31:24impactful visualization so let's
- 14:31:27understand visual interactions to
- 14:31:29understand visual interactions what I've
- 14:31:30done is I actually created created a few
- 14:31:32visuals which include table visual Pi
- 14:31:34visual map Visual and bar visual to
- 14:31:37explain you what are the different kind
- 14:31:38of interactions which happens between
- 14:31:40the visuals I also added a slicer so
- 14:31:42that you can understand it better let me
- 14:31:43close rest of the panes and give you a
- 14:31:46space on the page so that page has a
- 14:31:48larger canvas available now I'll click
- 14:31:51on any of the visual and then I can go
- 14:31:53to format and enable the edit
- 14:31:55interaction edit interactions allows you
- 14:31:57to change the interactions between the
- 14:32:00visuals what do you mean by interactions
- 14:32:01first of of all between the visual so
- 14:32:03let's say if I click on any of these
- 14:32:04slices all these visuals are changing
- 14:32:07okay why these visuals are changing
- 14:32:09these visuals are changing because they
- 14:32:11are interacting with this slicer if you
- 14:32:13go to this brand visual it will only
- 14:32:14show one value because only one value is
- 14:32:16applicable because of its interaction
- 14:32:18with the second brand slicer now the
- 14:32:20moment I erase it you will again see the
- 14:32:22values are removed now if you click on
- 14:32:24any of the visual let's say if I click
- 14:32:25on Category 2 you will see a different
- 14:32:27kind of impact which is happening here
- 14:32:29now I'll explain what is happening on
- 14:32:30the P later but you see this is
- 14:32:33highlight which is happening in the
- 14:32:34brand visual actually there's a
- 14:32:35highlight also happening in the pi
- 14:32:36visual but because it's on the same
- 14:32:38level only category 2 is getting
- 14:32:39highlight now I click back and I click
- 14:32:42on any of the brands in the P visual
- 14:32:45what do you see here the T table visual
- 14:32:47is getting filtered but in the pi visual
- 14:32:49there is a highlight which is happening
- 14:32:50again this visual is basically getting
- 14:32:52filtered the map visual now if I go and
- 14:32:55click again it will deselect and here if
- 14:32:57I click on any of the city you will see
- 14:33:00again highlight at few places and filter
- 14:33:02at other places but is slicer getting
- 14:33:04impacted no so visual is not changing
- 14:33:07the slicer unless the joint is
- 14:33:08bidirectional so visual is not going to
- 14:33:11filter the slicer and we don't see any
- 14:33:13interaction side with the filter pane so
- 14:33:16even if I click on any of the filters we
- 14:33:18don't see any interaction changes so
- 14:33:20filters can also filter the data inside
- 14:33:22the visualization but the interactions
- 14:33:24with the filter cannot be changed while
- 14:33:26it can be changed for other what do I
- 14:33:28mean by interactions can be changed so
- 14:33:30now I will click on let's say one slicer
- 14:33:33and I go to edit interaction and I click
- 14:33:34on that immediately you start seeing
- 14:33:36these signs these signs means filter and
- 14:33:39don't filter so whenever I click on the
- 14:33:41slicer all other visuals we get this
- 14:33:43filter and not filter because the
- 14:33:45interaction with the slicer is either
- 14:33:46you going to filter with that slicer or
- 14:33:48you're not going to filter with that
- 14:33:49slicer only two type of interactions can
- 14:33:51happen every chart is a driver chart and
- 14:33:53all other chart will become the driven
- 14:33:55chart when you click on the edit
- 14:33:56interactions and you try to edit the
- 14:33:58interaction so every chart will become a
- 14:34:00driver for edit interaction so if I
- 14:34:01click on on this visual you will see the
- 14:34:03Dr are you know now asking for whether
- 14:34:05they want to get filtered or not and at
- 14:34:07some of the visuals you are seeing three
- 14:34:09options not two options the third
- 14:34:11additional options which you're seeing
- 14:34:12is the Highlight option so what happens
- 14:34:15if this is a brand if I click on this I
- 14:34:17can disable its interaction with this
- 14:34:19chart I can disable its interaction with
- 14:34:20this chart so now when I click on brand
- 14:34:22one you see that the other visuals are
- 14:34:24getting updated but these two visual
- 14:34:26where I switch off the interaction they
- 14:34:27are not interacting so let me erase this
- 14:34:29now let me select brand 10 here in this
- 14:34:32visual when I select brand 10 and if I
- 14:34:34go here the brand 10 is getting filtered
- 14:34:36into the other visual why because from
- 14:34:38this visual when I click on this visual
- 14:34:40the interactions are on for this one so
- 14:34:41when this chart is driver chart there is
- 14:34:44interaction which is still happening the
- 14:34:46filter is which is still highlighted so
- 14:34:48each slicer or each visual can filter
- 14:34:51other visual unless stopped default
- 14:34:53behavior is filter or highlight in which
- 14:34:56case it would be default highlight I'll
- 14:34:57let you know mean know let me erase it
- 14:34:59let me click on any of the filter You
- 14:35:01Don't See see any interaction happening
- 14:35:03with the filter so see the Highlight is
- 14:35:05still on the slicer so filter can we
- 14:35:08cannot change interaction with the
- 14:35:09filter we can only change with the
- 14:35:11slicers filter is not part of
- 14:35:13interactions now let's go ahead when I
- 14:35:16click on category here you see that
- 14:35:18there is a highlight which is
- 14:35:20happening now why does this highlight is
- 14:35:22happening because there's a method
- 14:35:24available when I click on this chart
- 14:35:25there is a method which is available as
- 14:35:27highlight if I change it to filter and
- 14:35:29if I click on any of these categories
- 14:35:31you will see see now the visual is
- 14:35:32getting filtered so the behavior is
- 14:35:34filter same way when I've clicked here I
- 14:35:36can go ahead and change this Behavior
- 14:35:38also to filter so now this chart will
- 14:35:41only show the category which is clicked
- 14:35:42on this table visual so there are chart
- 14:35:45where we can show The Fill Behavior
- 14:35:47which include the bar chart pie chart
- 14:35:49tree map these visuals can show The Fill
- 14:35:52Behavior but chart like table cannot
- 14:35:54show fill Behavior so let's say if I go
- 14:35:55to the pie chart and when I filter the
- 14:35:57default table can only get filtered or I
- 14:36:00can disable filter or I can filter
- 14:36:02there's no filpa so we cannot do it so
- 14:36:04using the edit interaction under the
- 14:36:06format you can change the behavior let's
- 14:36:08quickly take one use case the use case
- 14:36:10of dividing a page into two parts so
- 14:36:12what I'm going to do is I'm going to
- 14:36:13copy these two visuals from here and
- 14:36:16I'll take them to a new page let me
- 14:36:18paste them let me see don't syn also I
- 14:36:20copied three let me make it two or let
- 14:36:22me keep them three only so I got these
- 14:36:25three visuals and let me instead of two
- 14:36:27I got three I put them on one side now
- 14:36:30what's happening if I select a br
- 14:36:31everything is interacting now let me say
- 14:36:33CR a contrl c contr v i get two sets of
- 14:36:37visuals now even if I select brand here
- 14:36:40it is filtering across now for this use
- 14:36:43case let me go ahead and insert a shape
- 14:36:45and the shape I plan to insert is a line
- 14:36:47let me make this line bigger and thinner
- 14:36:50and I I'll change its orientation now
- 14:36:52let me enable the formatting and inside
- 14:36:55the format I'll go to rotation and let
- 14:36:57me rotate it by 90° so I got a full line
- 14:37:01a y drawn a line here I want the left
- 14:37:03side to only work with the left side I
- 14:37:05want right side to work with the right
- 14:37:07side they should not interact with each
- 14:37:08other then how do I change this Behavior
- 14:37:11so click on this visual now edit
- 14:37:13interaction is already available from
- 14:37:14the format pan we have enabled it last
- 14:37:16time if it is not enabled go to the
- 14:37:17format pan and enable it now disable its
- 14:37:21interaction with all the three visuals
- 14:37:24let me make it a little bit smaller
- 14:37:25because it's overlapping now what would
- 14:37:27happen here when I select brand one it
- 14:37:29is going to filter the first two visual
- 14:37:31not the visual on the other side so you
- 14:37:33can see this visual is filtering this
- 14:37:34visual is filtering but these two
- 14:37:36visuals are not interacting and that is
- 14:37:38the reason why they are not getting
- 14:37:40filtered but it will not stop here I
- 14:37:42have to do the same thing for here and
- 14:37:44have to repeat it for all the visual so
- 14:37:46I click on this I disable its
- 14:37:47interaction with these visual now I
- 14:37:49click on this Visual and I disable its
- 14:37:51interaction with the other side I click
- 14:37:53on the bar Visual and disable bar
- 14:37:55visuals interaction with the right hand
- 14:37:57side visual on the right hand side I
- 14:37:58click on the p and I disable it
- 14:38:00interaction with left hand side visual
- 14:38:01click on the bar and disable its
- 14:38:03interaction with left hand side visual
- 14:38:04now let's check it out so if I filter
- 14:38:06brand one here only right side is
- 14:38:08getting filtered so I filtered on right
- 14:38:10side right side is getting filtered when
- 14:38:11I click on category and let me change
- 14:38:13the impact to highlight let me click on
- 14:38:15the pi on the left and change the impact
- 14:38:17to highlight see left hand side
- 14:38:19interacts with left hand side right hand
- 14:38:20side interact with right hand side there
- 14:38:22is no interaction between left and right
- 14:38:25in this manner you can change the
- 14:38:27interaction and create different kind of
- 14:38:30interactions Behavior where you can
- 14:38:32decide which visual is going to filter
- 14:38:34which other
- 14:38:35visual let's learn the feature bookmarks
- 14:38:39bookmarks is a feature which allows you
- 14:38:41to create snapshots and using those
- 14:38:44snapshot you can create more interactive
- 14:38:46power VI Pages now what happens is there
- 14:38:49is a facility to show and hide the
- 14:38:51visuals so if you go to view and enable
- 14:38:54the selection pan which is right now
- 14:38:56enabled here so you to enable the
- 14:38:58selection Pane and for every
- 14:38:59visualization you will get option to
- 14:39:01show and hide and you can capture that
- 14:39:03stage because sometime the visual is
- 14:39:05showing sometime the visual is not
- 14:39:07showing so you can capture such kind of
- 14:39:09situations and using such kind of
- 14:39:11situations you can actually create a
- 14:39:13really interactive page what are the
- 14:39:15uses there are many uses before field
- 14:39:17parameter came in place this was also
- 14:39:20used for switch AIS so basically if a
- 14:39:23visual is on brand and I want to change
- 14:39:24it to category so bookmarks along with
- 14:39:26Buttons used to help in that then
- 14:39:29sometime it helps us in creating a b
- 14:39:31basically a slicer pan so what happens
- 14:39:33you can have a slicer pan and that
- 14:39:35slicer pen can show and hide so let's
- 14:39:38take these two examples of bookmarks and
- 14:39:41try to implement that and understand the
- 14:39:43bookmark feature in detail what I'm
- 14:39:45going to do is I have another page where
- 14:39:47I have this two slices let me bring them
- 14:39:49in now these slices are not interacting
- 14:39:51with each other right now I'll say don't
- 14:39:56sync so let me change the column on the
- 14:39:59second slicer so on the second slicer
- 14:40:01instead of the brand let me use category
- 14:40:03so I have a visual which is on brand I
- 14:40:05have a visual which is on category brand
- 14:40:06and category and let me bring in one
- 14:40:10visual also I bring a visual here I put
- 14:40:13this visual here below now these visuals
- 14:40:16are filtering this one let's check that
- 14:40:19out round one
- 14:40:23category interaction is happening now
- 14:40:26sometime for the space requirement what
- 14:40:28you want is I want to hide this region
- 14:40:31or you can have it on left hand side so
- 14:40:33how do I do that so let me first of all
- 14:40:36create a pain kind of impression by
- 14:40:39using a shape I put a
- 14:40:42rectangle so let me remove the color and
- 14:40:46everything from this one shape and Style
- 14:40:49no fill I think we are fine with the
- 14:40:51boundaries let me bring in the category
- 14:40:53on top of it so let's go to the format
- 14:40:55Tab and let's send this backward so we
- 14:40:57will say send to back so this is now on
- 14:41:00when to the back one
- 14:41:03now this is here and this should again
- 14:41:07let's bring this forward bring in front
- 14:41:11this is also bring in front control or
- 14:41:16shift press and right click group so all
- 14:41:20these visuals are group so we have one
- 14:41:23group so what can happen is I can hide
- 14:41:26this this is hidden now this is one
- 14:41:28stage where this is hidden this is one
- 14:41:30of the stage I want to show so this is
- 14:41:32the one stage which I would like to
- 14:41:34capture and in that stage I would like
- 14:41:37to use the bookmark
- 14:41:40pan and this is the bookmark pain which
- 14:41:43is already
- 14:41:44enabled and using the pan switcher let
- 14:41:46me bring it
- 14:41:48in so now this stage I add a bookmark
- 14:41:52and this bookmark let me call this
- 14:41:54bookmark as
- 14:41:55hide enable and what is this stage when
- 14:41:58it is showing this this is show stage so
- 14:42:01there are two stages hide and show so in
- 14:42:04this stage it is hidden this stage it is
- 14:42:05show but what happens if I select
- 14:42:07category one I removed all the
- 14:42:10categories in the show stage I go to
- 14:42:12hide stage do you see this a category
- 14:42:14still filtered so what has happened when
- 14:42:16I created this bookmark actually the
- 14:42:19data got saved though the filter is not
- 14:42:21appearing so if I go to show I uncheck
- 14:42:24it but if I go to hide and I come back
- 14:42:26to show you again see the category one
- 14:42:28because the category one was sa so let
- 14:42:29me erase this category one let me erase
- 14:42:31the filter and update this bookmark now
- 14:42:34let me hide this so I unhide it first of
- 14:42:38all erase erase this one now I hide it
- 14:42:41right click and update now both the
- 14:42:43bookmarks are saved without values but
- 14:42:45let's say if I put Category 2 here let
- 14:42:47me put Category 5 here and after keep
- 14:42:49creating Category 5 in the show view I
- 14:42:51go to the Hidden View now if you
- 14:42:53remember I cleaned up and saved it again
- 14:42:55now it is is still showing me everything
- 14:42:56so can I pass the values because when I
- 14:42:58show and hide this menu I still want the
- 14:43:00values to pass so for that we right
- 14:43:02click here and we say disable data we
- 14:43:04say don't save the data same thing on
- 14:43:05the show we go and we say don't save the
- 14:43:08data now we go to the show go to the
- 14:43:09category and put Category 2 come to the
- 14:43:12hide view still Category 2 come back
- 14:43:13show now let's choose a category where
- 14:43:15we have lesser values like Category 5
- 14:43:18this is the show View and we go to the
- 14:43:19hide view we still get the category 5 it
- 14:43:21means even if I hide my menu I will be
- 14:43:23able to do that now what I'm going to do
- 14:43:25is I'm I need a button here isn't it so
- 14:43:27I give a small button for show or hide
- 14:43:29so I want to hide or show then I need to
- 14:43:30give a button so I will go here in the
- 14:43:33insert and I go to button so let me add
- 14:43:37a very small button here blank button
- 14:43:39I'm plan to add let me move it on the
- 14:43:41right hand side I'll go to the button
- 14:43:44style enable the text and give it as a
- 14:43:47name show whenever I click on this the
- 14:43:49menu should show now I go further down I
- 14:43:51go to the actions in the action in The
- 14:43:53Bookmark I'll first of all type action
- 14:43:56type is bookmark what action it should
- 14:43:58show it should show so whenever I click
- 14:43:59on this it should show right now it's
- 14:44:00already showing okay so we need to do a
- 14:44:02little bit of adjustment and then I put
- 14:44:04another button and I put hide button on
- 14:44:06top of the menu itself and I need to
- 14:44:08group it so let me group this together
- 14:44:10so merge I merge it with the group one
- 14:44:13so when I go to height the button itself
- 14:44:15is hidden with that if I go to the show
- 14:44:17it is there now but this should be
- 14:44:19renamed as hide and what action it
- 14:44:21should do if I click it should take me
- 14:44:24to The Bookmark hide so now let's do a
- 14:44:27go ahead and click on this how do we
- 14:44:28click a button in the powerb desktop
- 14:44:31control click hide control click show
- 14:44:33shows can we apply a filter yes category
- 14:44:36two and we go and apply brand and filter
- 14:44:39yes brand and filter has been applied
- 14:44:41let's hide it till the same thing is
- 14:44:42there click on show same thing is there
- 14:44:44okay so we are in short this using the
- 14:44:46not saving the data with the bookmarks
- 14:44:48so these are the stages which are saved
- 14:44:49and we are able to create slicer menu
- 14:44:52which we can show under it you can
- 14:44:53create it on left hand side sometime
- 14:44:54what happens is when you create such
- 14:44:56kind of menu you do adjust your visual
- 14:44:58so BBE the visual is see this big and
- 14:45:00when it is shown on the visual is this
- 14:45:01big so this kind of adjustment also we
- 14:45:03do so with this kind of adjustment you
- 14:45:05can try that out now the Second Use case
- 14:45:07which actually I wanted to go ahead and
- 14:45:09do is I want to create a impression of
- 14:45:11access slicer using the bookmarks and
- 14:45:13button so we have used bookmarks and
- 14:45:14button and created the menu show hide
- 14:45:17menu now what we want is now we want the
- 14:45:19behavior of access slicer now access
- 14:45:21slicer bookmarks cannot work in a slicer
- 14:45:23so what I'm going to do here is
- 14:45:24basically I will go ahead and create
- 14:45:27buttons for those and going to create an
- 14:45:28impression of exess slicer and when you
- 14:45:31learn field parameter you will find that
- 14:45:32the new method is really easy the field
- 14:45:34parameter method is really easy while
- 14:45:36bookmarks can use for both access slicer
- 14:45:38as well as major slicer for major slicer
- 14:45:40traditionally also there are many ways
- 14:45:42available including the calculation
- 14:45:43group now calculation group has very
- 14:45:45recently become part of the Microsoft
- 14:45:47powerbi desktop without going to tabular
- 14:45:49editor or external tool you can create
- 14:45:51it so calculation group is another easy
- 14:45:53way to explore that so calculation group
- 14:45:55was previously there and major slicers
- 14:45:57we can create with the help of
- 14:45:58independent table that was also
- 14:46:00available previous viously so unless a
- 14:46:02very specific case used to come we never
- 14:46:04used to use bookmark for major slices
- 14:46:07but definitely for the exess slicer we
- 14:46:08were using it so let's quickly take an
- 14:46:10example in this example again what I
- 14:46:12want here is basically let me bring in
- 14:46:13this visual by category to this new page
- 14:46:16let me duplicate this contrl C control V
- 14:46:18now there are two visuals and what I'm
- 14:46:20going to do here is the second visual
- 14:46:21I'll change the second visual to Brand
- 14:46:23so what you want is if you click on if
- 14:46:26you click on a button you want brand if
- 14:46:27you click on a button you want category
- 14:46:29so if I hide this is only category
- 14:46:31Visual and if I unhide and this this is
- 14:46:34a brand visual so when category is
- 14:46:36hidden it is brand Visual and when brand
- 14:46:38is hidden we can have category visual
- 14:46:40these are two stages and I want to cover
- 14:46:41these two stages in two buttons so I
- 14:46:43create a hidden brand and I can add a
- 14:46:45bookmark and what will this bookmark be
- 14:46:47known as this bookmark will be known as
- 14:46:49category bookmark then I unhide the
- 14:46:51brand and hide category what this
- 14:46:53bookmark will be known as because brand
- 14:46:55is visible I'll add a bookmark and that
- 14:46:57bookmark double click and rename will be
- 14:46:58known as brand bookmark you you can have
- 14:47:01few more versions and you can have this
- 14:47:02so category brand now I can ship but
- 14:47:04definitely there would be no bookmark
- 14:47:06pain for the users so how you're going
- 14:47:07to enable that we are going to bring
- 14:47:08button insert buttons there are already
- 14:47:10bookmark button which I doesn't like
- 14:47:12there is a navigator also bookmark
- 14:47:13Navigator so I'll add two buttons blank
- 14:47:15button but what typically I do is I add
- 14:47:17the first button and then I start
- 14:47:19editing the style and then I can easily
- 14:47:21edit it to the second button so what is
- 14:47:23the button Style I want I want text
- 14:47:25first of all so let me enable and let me
- 14:47:26call this text as brand so brand is
- 14:47:29there and then I go to the action and
- 14:47:31inside the action I enable the action
- 14:47:33what action I need I need a type action
- 14:47:35is bookmark and I want to show brand so
- 14:47:37whenever I click on this button I want
- 14:47:39to show brand then contrl ctrol V now
- 14:47:41this second button is going to do the
- 14:47:42same stuff but here the action I want is
- 14:47:44basically category and this means that
- 14:47:46it need to be renamed so I will go to
- 14:47:48the button text and rename it as
- 14:47:50category so we have brand as well as
- 14:47:52category buttons now control and click
- 14:47:54on brand it is brand control and click
- 14:47:56on category it is category what is
- 14:47:58happening the AIS is switching or the
- 14:48:00lay legent is switching now if this
- 14:48:02would have been the bar visuals it had
- 14:48:04been excess switching these are P
- 14:48:06visuals Legend shifting you want to
- 14:48:07change the visualization type one time
- 14:48:10it is bar one time it is table one time
- 14:48:12it is pi again bookmarks you can use so
- 14:48:14many such use cases can be done with the
- 14:48:16bookmarks these are very common use
- 14:48:18cases which you can do and bookmark can
- 14:48:20in increase the interactivity of the
- 14:48:22page and it can create a different
- 14:48:25impression of the page it looks like
- 14:48:27much more professionally handled page
- 14:48:29when you use bookmarks
- 14:48:31so now let's learn what is calculation
- 14:48:33groups calculation group is a power ba
- 14:48:37feature which will allows you to apply
- 14:48:40common calculation across multiple
- 14:48:42measures so you don't have to create
- 14:48:45measure for each and everything so this
- 14:48:47is particularly useful to simplify the
- 14:48:51measor management but the feature allows
- 14:48:54you more than that so if you simply
- 14:48:57combine the majors you can create a
- 14:48:59major slicer if you use selected value
- 14:49:02and you then create a major let's say
- 14:49:05for MTD qtd YTD you can create time
- 14:49:08intelligence measure by just using
- 14:49:09selected measures and then I don't need
- 14:49:11to create separate measures for Cog MTD
- 14:49:14Cog YTD Cog qtd next net YTD net qtd all
- 14:49:18those measures I don't need to create so
- 14:49:20what we are going to do is we going to
- 14:49:21take an example of calculation group
- 14:49:24where we are going to create two
- 14:49:25calculation groups one which will
- 14:49:27provide us time intelligence using
- 14:49:29selected major which can take a measure
- 14:49:32which is in the visual and give the
- 14:49:34value for that as MTD qtd YTD and the
- 14:49:37second calculation Group which we are
- 14:49:38going to create its item would be same
- 14:49:40as what we have net gross cogs margin
- 14:49:43Etc but the objective of that would be
- 14:49:47to give you a dynamic slicer both will
- 14:49:50give slicer that would be equivalent of
- 14:49:53major slicer we have also seen in field
- 14:49:55parameters so to do that you have to go
- 14:49:57to the model view and inside the model
- 14:50:00view very recently in the data pane on
- 14:50:03the right hand side we have been given
- 14:50:06this option model semantic model and
- 14:50:09using this semantic model you can now
- 14:50:12create calculation groups right now if
- 14:50:14you click you don't have any calculation
- 14:50:16group so we are going to create a
- 14:50:18calculation group the first calculation
- 14:50:21group to convert measures to slicer and
- 14:50:23second calculation group for time
- 14:50:25intelligence so click on the calculation
- 14:50:27groups New calculation group and this
- 14:50:30will give you a message this change will
- 14:50:33discourage implicit measures now you
- 14:50:35can't use implicit measures implicit
- 14:50:36measure means when I use a quantity
- 14:50:38column and I say it is sum okay this
- 14:50:41kind of stuff would be discouraged from
- 14:50:43now and that is why you might have seen
- 14:50:45every time I'm using something I'm
- 14:50:47creating a major this is the something
- 14:50:49which I know at some stage I'll need
- 14:50:51calculation group and I'm doing it we
- 14:50:53just discussing two use cases of
- 14:50:54calculation group but it's much more
- 14:50:56powerful feature it can be used at
- 14:50:58multiple places so one of the things
- 14:51:00which we can also use is basically to
- 14:51:04use this in small multiples to shift the
- 14:51:07measures that is also one of the uses so
- 14:51:10now let me create yes this will change
- 14:51:13this will discourage implicit measure
- 14:51:14yes let it
- 14:51:16discourage our first calculation group
- 14:51:19has been
- 14:51:20created and we are directly landed onto
- 14:51:22a calculation item okay so we can come
- 14:51:26here we can call it as major slicer we
- 14:51:32I renamed it now I go to the calculation
- 14:51:34item and there is already one item which
- 14:51:36is created with selected Imes right now
- 14:51:38I don't want to use selected Mees what I
- 14:51:40simply want is I would like to create
- 14:51:45gross gross as gross one item I added
- 14:51:48and I'm quickly going to add few more
- 14:51:50items
- 14:51:54now net
- 14:51:57net one more new calculation item
- 14:52:06so left hand side is a name right hand
- 14:52:07side is a definition cogs
- 14:52:11cogs three is sufficient and this will
- 14:52:13act as a major slicer so we can use it
- 14:52:15as a major slicer it is just the
- 14:52:17collection of measure now we again click
- 14:52:20on the calculation group and it there is
- 14:52:22a button for new calculation group we
- 14:52:24are going to use
- 14:52:25it new calculation group
- 14:52:30and this would be our TI okay time
- 14:52:33intelligence calculation group so
- 14:52:36calculation item calculation group and
- 14:52:39name it as TI time intelligence
- 14:52:41calculation
- 14:52:44group and now let's go to the
- 14:52:46calculation item and rename it as MTD
- 14:52:50left hand side rename and right hand
- 14:52:52side look at the calculation
- 14:52:54calculate selected major dates
- 14:52:59MTD date of date this is how we created
- 14:53:01time intelligence measures in the past
- 14:53:06also dates MTD date of
- 14:53:11date let's close MTD let's close
- 14:53:14calculate we got an MTD
- 14:53:17measure in the same manner we are going
- 14:53:19to create two more qtd and YTD in this
- 14:53:22calculation group now I'm using selected
- 14:53:24major so I would need a major inside my
- 14:53:27visualization to supply to this selected
- 14:53:29major to get MTD qtd and YTD let's
- 14:53:32create qtd and YTD click on the
- 14:53:34calculation items on the right hand side
- 14:53:36you will get this new calculation option
- 14:53:38click on that and create
- 14:53:41more this time we will use copy paste
- 14:53:44and couple of
- 14:53:46changes qtd
- 14:53:49qtd using dates
- 14:53:53qtd let's add one more
- 14:54:04so we got YTD we got qtd and we got MTD
- 14:54:07so now let's go ahead and use this so
- 14:54:10I'll go to report View and inside the
- 14:54:13report view I'll create a new page and
- 14:54:15first of all I'll tell you how do I
- 14:54:17create a major slicer so I can see this
- 14:54:19calculation group I'll bring this
- 14:54:21calculation item to this is showing me
- 14:54:24three names I will change this to
- 14:54:27slicer now I will go ahead and create
- 14:54:30create a matrix
- 14:54:33Visual and inside the Matrix
- 14:54:36visual what I'm going to do here is I
- 14:54:39will bring brand on the
- 14:54:41row brand on the row calculation group
- 14:54:46on the
- 14:54:47column it will not show anything because
- 14:54:49it need at least one major I'll go to
- 14:54:52the majors on the
- 14:54:55top and bring in net it doesn't mean
- 14:54:58it's going to give only net it's going
- 14:54:59to give me all three now I can check and
- 14:55:02uncheck or do multi select using control
- 14:55:05and get the measures so measor slicer
- 14:55:09this is what you have
- 14:55:10seen and this is same thing we are able
- 14:55:12to achieve using calculation group now
- 14:55:15now what we are going to do here is now
- 14:55:17let's bring in the second one TI time
- 14:55:19intelligence one again first of all
- 14:55:22using the time intelligence one let me
- 14:55:24create a
- 14:55:27slicer so we got a slicer now here what
- 14:55:30I'm going to do is I'm going to add this
- 14:55:33calculation group on the
- 14:55:36row
- 14:55:38PI right now you don't see any
- 14:55:40difference and I'll expand it the moment
- 14:55:42I expand it you don't see a value and we
- 14:55:43know time intelligence we use MTD qtd
- 14:55:45YTD so unless there is some month where
- 14:55:48we have the data we not get it so let's
- 14:55:51bring in a slicer for month
- 14:55:55here so I got a slicer and here add data
- 14:55:59on the
- 14:56:01date
- 14:56:03table month
- 14:56:05year and let's go and select a month
- 14:56:07year where we have
- 14:56:10data I'll select
- 14:56:13July so as you can see I got MTD value
- 14:56:17qtd same because in the month of July
- 14:56:19MTD and QT saved and YTD different now
- 14:56:21if I go to June I will get different MTD
- 14:56:24qtd YTD and for all three of them I'm
- 14:56:27able to get it see I have not calculated
- 14:56:28it for cogs gross and net I just
- 14:56:31calculated it for the selected measure
- 14:56:33and there are three selected measure
- 14:56:35which are coming inside this
- 14:56:37visualization and it is able to use
- 14:56:39those in this manner we are able to
- 14:56:42utilize calculation groups to reduce the
- 14:56:45measures now think about cogs gross net
- 14:56:48three into three nine Majors I needed I
- 14:56:51actually did not create nine Majors
- 14:56:52three Majors were already created which
- 14:56:54I utilized inside one calculation group
- 14:56:57and in that manner I've done it you can
- 14:56:58do some of those calculations under
- 14:57:00calculation group items you don't need
- 14:57:02to do all the calculations here as
- 14:57:04measures so this is one example now we
- 14:57:06will use one more
- 14:57:09example of calculation
- 14:57:12group where I want to use the small
- 14:57:14multiple so if I have this brand wise
- 14:57:18net
- 14:57:19visual me create a brand wise net
- 14:57:23visual what would happen here is you can
- 14:57:25usually create a small multiple using
- 14:57:28let's say category but I want want to
- 14:57:31have the small multiple using measures
- 14:57:33can I have it no because measures you
- 14:57:34can't drag a measure here and how do we
- 14:57:37create multiple measures can I use a
- 14:57:40field parameter here let's try out so we
- 14:57:42go to measor slicer we put major slicer
- 14:57:44here it takes the major slicer does
- 14:57:47nothing now let's drag the calculation
- 14:57:50Group which we have created the
- 14:57:52calculation group major slicer we put it
- 14:57:55into the small
- 14:57:56multiple and the moment I do it you see
- 14:57:58cogs gross and Nets three different
- 14:58:02visuals coming in place now let me go to
- 14:58:05the small
- 14:58:06multiples how many rows you need I will
- 14:58:09need three rows how many columns only
- 14:58:11one
- 14:58:12column each of them is on the different
- 14:58:16different rows cogs net gross do I need
- 14:58:20the titles yes I need the
- 14:58:23titles but I can go to the Y
- 14:58:27AIS and disable this shared y axis
- 14:58:31so now the Y AIS would be able to adjust
- 14:58:36itself so I removed the shared y- axis
- 14:58:38so that these values can adjust inside
- 14:58:40the each Visual
- 14:58:43and I will remove the y-axis title now
- 14:58:47cogs gross and net three different
- 14:58:49measures we are able to use using small
- 14:58:53multiples small multiples is a feature
- 14:58:56which allows you to have multiple visual
- 14:58:58using the categorical variables but
- 14:59:01calculation groups allows you to convert
- 14:59:05measures into Dimension means into
- 14:59:08categorical variables and then you can
- 14:59:10use it into the places where you could
- 14:59:12have actually used only categorical
- 14:59:14variables and one of the example is
- 14:59:16small multiples so these are the few use
- 14:59:19cases of calculation groups you can
- 14:59:21experiment with more such use cases now
- 14:59:24let's look at the feature field
- 14:59:26parameters field parameter features
- 14:59:27allows you for to create access slicer
- 14:59:30as well as major slicer before May 2022
- 14:59:33for Access slicer we used to use
- 14:59:35bookmarks or we used to unpivot the
- 14:59:38table and use to create slicers for
- 14:59:40major slicers we were using independent
- 14:59:43table and a major and then we were also
- 14:59:45using calculation groups now because of
- 14:59:47availability of all these options I am
- 14:59:49not showing you how could have you
- 14:59:51created a major Slicer in the older
- 14:59:53fashion but let's start this journey of
- 14:59:55field parameters with access slicer I
- 14:59:58added a new page and in this new page P
- 15:00:00I would like to change the access of my
- 15:00:03visual and let me bring in one visual
- 15:00:05using copy paste so I have this brand
- 15:00:08visual I'm bringing it brand and net
- 15:00:11visual is there I I'm bringing it what's
- 15:00:14happening right now it is displaying
- 15:00:15brand I can go to Home tab and change
- 15:00:18the type to column showing brand can I
- 15:00:20change it to category go here and you
- 15:00:23know bring the visualization pan and
- 15:00:25from there you change it to category but
- 15:00:28this is something which you're not going
- 15:00:29to enable for for the end users so the
- 15:00:30how end users will make it how do we
- 15:00:32make this visual more Dynamic so field
- 15:00:35parameters allows you to create Dynamic
- 15:00:37visuals By changes both A's as well as
- 15:00:39measures how do we create field
- 15:00:41parameters and how do we use it so let's
- 15:00:43start with the first thing which is XIs
- 15:00:45slicer under the modeling T we have this
- 15:00:47new parameter previously we only used to
- 15:00:49have numeric parameter something we have
- 15:00:51used in top end to make it Dynamic and
- 15:00:53there are many other use cases the
- 15:00:54second option which came in May 2022 is
- 15:00:57fields and this is what we call field
- 15:00:59par parameters let's click on that so
- 15:01:01what your variable adjust to Fields name
- 15:01:04is access I want to create access slicer
- 15:01:06so I'm giving a name as access now when
- 15:01:07you drag the fields remember when you
- 15:01:09are dragging categorical field only drag
- 15:01:11categorical when you are dragging Majors
- 15:01:13only drag Majors don't mix and match
- 15:01:16that's not the purpose here brand
- 15:01:18category subcategory and I can drag from
- 15:01:20across Dimension state and city also I
- 15:01:23can
- 15:01:24drag add slicer to the page I can click
- 15:01:27on this if you don't add then you have
- 15:01:29to go to to the data Pane and from there
- 15:01:31you have to add it so let me add it and
- 15:01:33showcase you what is happening here what
- 15:01:36this does is it creates a new table and
- 15:01:38this table is a little bit different
- 15:01:39type of what you have seen till now so
- 15:01:41if you go here on the pane you will see
- 15:01:43one table name as XIs and this table has
- 15:01:47this kind of a code which is previously
- 15:01:49not known to us brand name of item brand
- 15:01:51category name of item category
- 15:01:53subcategory name of item subcategory
- 15:01:55state name of geography state city name
- 15:01:58of geography City there is order which
- 15:02:00is 0 1 2 3 4 You Can Change you can even
- 15:02:03change the names like brand and category
- 15:02:05subcategory names you can also we got a
- 15:02:07slicer now if I click on this slicer
- 15:02:09it's not going to do any change to your
- 15:02:11visual because we have to use it so now
- 15:02:13what we are going to do is in this
- 15:02:15visual net by brand first of all build
- 15:02:17my visual and here instead of brand now
- 15:02:20I will go ahead and use access access
- 15:02:23and the moment I do it you still see it
- 15:02:25on brand sorting has Chang that is
- 15:02:27another thing you might have observed
- 15:02:28I'll tell you what to do with this
- 15:02:29sorting now What's Happening Here is
- 15:02:32basically now if I click on the brand it
- 15:02:34is brand if I click on category it is
- 15:02:35category if I click on subcategory it is
- 15:02:37sub category if I click on state it is
- 15:02:39state if I click on City it is City it's
- 15:02:42changing when I leave everything then I
- 15:02:44get this expand icon the expand icon
- 15:02:47will allow us to now expand drill next
- 15:02:49icon to go to the drill Next Level drill
- 15:02:52next icon drill down icon all these
- 15:02:54icons are available because now there
- 15:02:55are five levels which are available so
- 15:02:56if I expand it you will be able to see
- 15:02:58those levels okay but if you just wanted
- 15:03:02to keep it for the purpose of slicing
- 15:03:04the axis you can make this as single
- 15:03:06select if you have multi select you can
- 15:03:08also select more than one so now this is
- 15:03:12access slicer one of the problem with
- 15:03:14the access slicer and for which you need
- 15:03:15a solution so if you go and sort it on
- 15:03:18brand let's say now it is sorted on
- 15:03:19brand okay brand 110 but if I go to
- 15:03:22category it's not sorted on category if
- 15:03:24I go to City it's not sorted on City
- 15:03:27okay a a s l it started sorting on the
- 15:03:30major so to overcome this what you have
- 15:03:33to do is you have to take help of a
- 15:03:35major and this is the trick to make it
- 15:03:37work so axis sorting is not happening
- 15:03:39properly because axis is changing the
- 15:03:41moment axis changes it lose the sorting
- 15:03:43and it start sorting it on major so if I
- 15:03:46go to category then I go to category
- 15:03:47then I again go here and I say sort on
- 15:03:50category so now you go to Brand it is
- 15:03:52sorted on brand you go to category it is
- 15:03:54sorted again on net it is losing how do
- 15:03:56we correct it let create one major so
- 15:03:58the new major which I'm creating now
- 15:03:59what happens is first of all we need to
- 15:04:01understand how do we get the selected
- 15:04:03value because getting the selected value
- 15:04:05of field parameter is not easy so we
- 15:04:07will use sort AIS but in the S AIS first
- 15:04:09of all I'll let you know the way to find
- 15:04:12out what is selected so where underscore
- 15:04:14cell equals to selected value X's XIs if
- 15:04:18I use this and if I try to return this
- 15:04:20and let's use it on the visual card
- 15:04:23visual does it work we go here and we
- 15:04:25try to bring it it actually doesn't work
- 15:04:28now to overcome what we do is in instead
- 15:04:29of AIS we use AIS sort selected value
- 15:04:32and then what I'm going to do is Max x
- 15:04:34filter XIs XIs do order equals to
- 15:04:38selected value then give me AIS access
- 15:04:41and now let me return this so now you're
- 15:04:43getting category I'm only talking about
- 15:04:45the case when you do single select if
- 15:04:46you do multi select we have to do few
- 15:04:48little different things but getting this
- 15:04:50category is not sufficient for sorting
- 15:04:52so what we have to do is to create a
- 15:04:53major switch switch uncore cell so what
- 15:04:56happens if the cell is brand you will
- 15:04:58say Max of item brand remember item
- 15:05:01brand is already on AIS what happen when
- 15:05:03brand is brand I take a Max of it what
- 15:05:06value it is going to give me brand only
- 15:05:07that brand brand one is brand one brand
- 15:05:0910 is brand 10 brand two is brand two
- 15:05:10all those and in this manner I need to
- 15:05:12add all of them so brand category
- 15:05:15subcategories state and city for all of
- 15:05:18them we need to add so let me quickly go
- 15:05:20ahead and modify these
- 15:05:26category so what I have done here is
- 15:05:28brand I Max of item brand categories Max
- 15:05:31of item category subcategories Max of
- 15:05:33item subcategory State Max of geography
- 15:05:35State I have created a major like this
- 15:05:39now I'll tell you one trick go to this
- 15:05:40visual go to its visualization pane
- 15:05:43scroll down and in the tool tip go and
- 15:05:46add this major sort AIS now when you go
- 15:05:48to three dots it will show you one more
- 15:05:51option to sort that is sort access click
- 15:05:53on that okay now you go to Brand
- 15:05:57category subcategory state city all are
- 15:06:01descending sort if you might have
- 15:06:02observed let's go here click on this
- 15:06:05visualization sort it is descending
- 15:06:08right now ascending sorted on a state
- 15:06:11sorted on a subcategories 1 10 11 12 13
- 15:06:1514 16 and then we go 2 3 4 5 6 7 8 this
- 15:06:19is how it sorts category 1 2 3 4 5 brand
- 15:06:23110 11 12 13 no if you want to change
- 15:06:27this sort like you'll say no no this
- 15:06:28brand doesn't see seems one we do have a
- 15:06:30brand ID let's do that okay and
- 15:06:33subcategory also we have ID isn't it
- 15:06:36category our five but we can use ID now
- 15:06:40let's try what happens if I do this so
- 15:06:43I'm now using the numeric equivalent
- 15:06:45measure of that one so categories 1 2 3
- 15:06:474 5 subcategories now you see 1 2 3 4 5
- 15:06:506 7 8 9 10 11 12 13 14 brand is 1 2 3 4
- 15:06:545 6 7 8 9 10 11 12 13 14 so what has
- 15:06:56happened is we have not even set as sort
- 15:06:59column here itself we are able to do
- 15:07:02this and now this sort AIS doesn't
- 15:07:04matter because it's going to give some
- 15:07:06value which we are returning something
- 15:07:08else so what's happening here is we are
- 15:07:09able to sort it correct access sort is
- 15:07:11it done we also talked about that it
- 15:07:13gives the flexibility to change the
- 15:07:14major and how do we change the major
- 15:07:16major is still fixed it is only net not
- 15:07:18coded major here for that we will create
- 15:07:20another slicer using the field parameter
- 15:07:22and that we will call as major slicer so
- 15:07:24we will again go to modeling new
- 15:07:26parameter fields and in the field this
- 15:07:30time we will call it major Majors is a
- 15:07:33reserve or major table I already used so
- 15:07:35I'm going to call it as a major slicer
- 15:07:37when you do that please make sure that
- 15:07:40you are only taking measures don't try
- 15:07:42to bring in columns which are not
- 15:07:44summarized it's not going to work
- 15:07:46great what happen sometime you say oh I
- 15:07:49take the quantity column here now
- 15:07:51quantity column is not summarized not
- 15:07:53aggregated is going to create a problem
- 15:07:55here that's why I'm only taking measures
- 15:07:57here I've taken all the measures add
- 15:07:59slicer to this page yes I want to add a
- 15:08:01slicer click on create again a new table
- 15:08:03would be created with the name as major
- 15:08:05slicer and a slicer would also be added
- 15:08:08to the
- 15:08:08page we got a table major slicer with a
- 15:08:11similar kind of code again if you now
- 15:08:13want to rename some of these you can
- 15:08:15rename into this table you can call it
- 15:08:17net sales if you like press enter it
- 15:08:19will become net sales but still keep on
- 15:08:21working on that now again this is not
- 15:08:23going to change anything unless we go
- 15:08:25ahead and add it into the y axis we go
- 15:08:27to this visual we bring in the pan the
- 15:08:30build visual Pane and there we now go to
- 15:08:32the major slicer and from major slicer
- 15:08:35we bring in the field immediately the
- 15:08:36things have shifted margin s taes by
- 15:08:40City cogs cogs by City discount by City
- 15:08:43And one of the things which you might
- 15:08:45have observed when you were actually
- 15:08:47using that major slicer the traditional
- 15:08:49major slicer with disconnected table it
- 15:08:51has a lot of problem with changing the
- 15:08:53different type of measure now it's a
- 15:08:54percentage measure immediately it
- 15:08:55adjusted to the percentage exis normal
- 15:08:57measure I go to brand category all X is
- 15:09:00getting adjusted pretty quickly on
- 15:09:02different kind of data types so now you
- 15:09:04have fully flexible visual which you can
- 15:09:06change based on the slices you want to
- 15:09:08add two you want to you can add two or
- 15:09:11add three you can do that or if you want
- 15:09:13you can have all of them you can make it
- 15:09:16as a single select you can create two of
- 15:09:18them and have one of them online and one
- 15:09:20of them as bars you can create combo
- 15:09:23visuals so in this manner field
- 15:09:25parameters allows you to create flexible
- 15:09:27visuals and these visuals can be really
- 15:09:30interactive where you can change the AES
- 15:09:32as well as measures so add this
- 15:09:33flexibility as per the need in your
- 15:09:36powerbi reports and dashboard to get a
- 15:09:38really Dynamic experience now let's look
- 15:09:41at the feature drill through so drill
- 15:09:43through is the feature which allows you
- 15:09:45to drill from one page to another page
- 15:09:48by passing the filters drill through
- 15:09:50feature is also controlled for what you
- 15:09:53can pass from one page to another page
- 15:09:55means you have the controls and also you
- 15:09:58have to decide on which Fields you will
- 15:10:00allow drill through so let's go to one
- 15:10:03of the page here and let me copy this
- 15:10:06visual to start
- 15:10:07with on this the page one let me call it
- 15:10:10as main M1 and let me create another
- 15:10:13page where I have the visual I'll again
- 15:10:16go back to this particular one and I'll
- 15:10:18bring in D1 which is detailed one this
- 15:10:21visual now this visual I copy paste the
- 15:10:24category wise net visual is there I'm
- 15:10:27copy pasting this Visual and converting
- 15:10:28it into table Visual and in this visual
- 15:10:31I will also add
- 15:10:34brand okay so when we drill from the
- 15:10:37first visual we will be able to know
- 15:10:39what brand we have filtered also let me
- 15:10:43select both these visuals and create a
- 15:10:46page D2 and also paste these visuals and
- 15:10:49in this D2
- 15:10:53page let me have three
- 15:10:58visuals and in this visual I'm going to
- 15:11:01add one more stuff let me add State
- 15:11:05here so when I go to the first page let
- 15:11:09me add a bar visual here
- 15:11:11also on the first page category separate
- 15:11:14bar is if I right click on any of the
- 15:11:17visual you don't see any option for
- 15:11:18drill
- 15:11:20through if I click here I also don't see
- 15:11:22any option okay now go to the D1 page
- 15:11:26and inside D1 page at the page level
- 15:11:30go to the page information and Page type
- 15:11:33you can use drill through the moment you
- 15:11:35enable the drill through now this is the
- 15:11:37newer version of power Behavior it
- 15:11:39happens like this if you are on a little
- 15:11:41bit older version actually under the
- 15:11:43visualization pan itself you will get
- 15:11:45drill through option you can use that
- 15:11:47now how you want to drill through I say
- 15:11:49okay only I want to drill through from
- 15:11:51Brand so whenever there is a brand
- 15:11:52available I want to drill through so I
- 15:11:55go to item and I pick up brand I can
- 15:11:56pick up category or whatever I want now
- 15:11:59how does it going to make a difference
- 15:12:00if I go to page M1 or any of the pages
- 15:12:02for the sake wherever I have brand if I
- 15:12:04right click I will now see option drill
- 15:12:06through D1 but if I go to the category I
- 15:12:09still don't see now as of now you can't
- 15:12:12restrict this feature mean once you
- 15:12:14enable you can't say it's enabled for
- 15:12:16this page and that page so now what
- 15:12:18happens is you are in any of the page
- 15:12:19let's say whenever you have brand and
- 15:12:21this happens for single value because
- 15:12:23what ideally you can do with the control
- 15:12:24you can select two values and then you
- 15:12:26can right click then you don't see it
- 15:12:28with the control and click we can select
- 15:12:30more than one value if you have only one
- 15:12:32value selected like brand 13 is selected
- 15:12:35and you say drill through D1 the values
- 15:12:37get filtered and you can see only brand
- 15:12:4013 here you can see the categories
- 15:12:41related to Brand 1 if you further right
- 15:12:44click here though there is a brand we
- 15:12:46can't further drill from category which
- 15:12:48we can't drill okay when you drill
- 15:12:51through you will automatically get this
- 15:12:53button back button on the page where you
- 15:12:55have drill through and you can click on
- 15:12:57this control click on the desktop stop
- 15:12:59click on the powerbi service you can
- 15:13:01come back once you come back you can go
- 15:13:03to another brand and again you say drill
- 15:13:05through and D1 that will get filtered
- 15:13:07and again come back so we are able to
- 15:13:10drill through now from D1 to D2 I again
- 15:13:12further want it to drill on the D2 I
- 15:13:15click on the empty space on my
- 15:13:18page I go and make it s Del through and
- 15:13:21this time what I want here basically is
- 15:13:23let people drill from category Whenever
- 15:13:26there is a category in the visual people
- 15:13:27can drill
- 15:13:30so what would happen from M1 now from
- 15:13:32this visual I can drill through to D2
- 15:13:34now here in the drill one I only get D1
- 15:13:37I go to D1 now in D1 all both the
- 15:13:40visuals have category so either from
- 15:13:42here I can drill through now here it is
- 15:13:44not showing me brand 8 but brand 8 is
- 15:13:46there and if I go to D2 now brand 8 do
- 15:13:48got filtered out so brand 8 is also
- 15:13:51filtered it means anything which is
- 15:13:53filtered by some mean will carry on that
- 15:13:55filter to the subsequent page of the
- 15:13:57drill through now let's go back here and
- 15:13:59we can further go back on the first page
- 15:14:01I'll go to D2 now from where these
- 15:14:04filters
- 15:14:06are you go to the filter pane you will
- 15:14:08start seeing these filters on this page
- 15:14:10you can remove these filters if you want
- 15:14:12so these are the Dr through filter which
- 15:14:13are now sometime you don't want to pass
- 15:14:16everything so now what I want is when
- 15:14:17I'm coming to this page I don't want to
- 15:14:19pass the brand filter then how can I do
- 15:14:21that so you disable this keep all
- 15:14:23filters now before everything getting
- 15:14:25passed whether the brand was there on
- 15:14:27the drill through list or not everything
- 15:14:29whether it was available in the list or
- 15:14:31not it was getting passed the moment you
- 15:14:33switch off this PE all filters now only
- 15:14:36you can drill through using category and
- 15:14:37category will only pass all other values
- 15:14:39will not pass so you have to add
- 15:14:41everything you want to pass you want to
- 15:14:42pass City you have to add it you want to
- 15:14:43pass State you have to add it you want
- 15:14:45to pass brand even you have to add it
- 15:14:47now how different it is now let's go to
- 15:14:50D1 and here we say brand it and Category
- 15:14:522 now right click here drill through
- 15:14:55D2 what happens here only category 2 has
- 15:14:59been drilled through there is no drill
- 15:15:01of brand8 in this manner you can control
- 15:15:04what you want to drill through also so
- 15:15:06you can do multi-level drill you can
- 15:15:08control what you want to drill through
- 15:15:09drill through feature helps you for
- 15:15:12creating Pages which can take
- 15:15:14information from other page there is
- 15:15:16something known as drill through button
- 15:15:18also so you can go and insert a
- 15:15:20button you can name it go to button
- 15:15:25style in the text you can name it as
- 15:15:27let's say drill now when you go down in
- 15:15:30the action you can use action to drill
- 15:15:33through and important thing to note not
- 15:15:35only you can select a page let's say I
- 15:15:37can select a page you can have FX
- 15:15:38function what does this FX function does
- 15:15:41it depending on a condition you can
- 15:15:43change a page what does that mean so let
- 15:15:46first test this button and then let me
- 15:15:48tell you how to use that conditional one
- 15:15:51so click on one of them you will get
- 15:15:53this button enabled if you control click
- 15:15:55to it is disabled only one of them then
- 15:15:57control click on the button on desktop
- 15:15:59and click on the powerbi service will
- 15:16:01take you to the drill page so we said
- 15:16:04okay go to page D1 what I want is for
- 15:16:07some of them I want to go to D1 and some
- 15:16:09of them I want to go to D2 can I do that
- 15:16:11yes I should be able to do
- 15:16:13that now if I right now go there is a
- 15:16:16restriction D1 and D2 on the brand and
- 15:16:18category okay so now let me go ahead and
- 15:16:21do one thing let me create a
- 15:16:23major so I go ahead and create a major
- 15:16:26and in this one what I'll do is
- 15:16:30let's use it like this if is
- 15:16:33filtered item
- 15:16:36brand then we go to
- 15:16:39D1 as we go to
- 15:16:43D2 so if item brand is filtered then I
- 15:16:46go to D1 else I go to D2 if it is
- 15:16:48filtered or not we want to check that
- 15:16:50let's let me call this major as drill
- 15:16:56page let me go to the button
- 15:17:00and in the drill
- 15:17:02FX I'll call the drill page
- 15:17:05button I'm saying I'm going to decide
- 15:17:07the
- 15:17:09page so text is going to show us D1 or
- 15:17:12D2 and in the action
- 15:17:14also in the action I'm again going to
- 15:17:17choose a page drill page D1 and
- 15:17:20D2 so I click on the brand the brand I
- 15:17:23filter on brand single brand is filtered
- 15:17:26now brand is filtered if I click control
- 15:17:27click I go to D1 press the back button
- 15:17:31come back I click on category it is D2
- 15:17:35control
- 15:17:36click this time I went to D2 so I
- 15:17:39checked if it is filtered then I go to
- 15:17:41one page if it is not filtered I go to
- 15:17:43another
- 15:17:44page okay come back now the first time
- 15:17:47it is showing D2 because we what we have
- 15:17:49said in our major drill major is
- 15:17:54that if it is not filter show2 we can
- 15:17:57further improve upon this one you can
- 15:17:59say
- 15:18:00switch
- 15:18:02true is filtered item Rand then
- 15:18:09D1 is filtered comma is filtered item
- 15:18:14category
- 15:18:16D2
- 15:18:18else
- 15:18:20select value you say display select
- 15:18:23value now it is saying select value let
- 15:18:25make it a little bit bigger so what we
- 15:18:27have done here is in the text next we
- 15:18:29have used the same mejor so which is
- 15:18:31giving the message and in the action
- 15:18:34also we have used the same one right now
- 15:18:36there is no action anyway it is disabled
- 15:18:38now I when I click it got enabled and I
- 15:18:41can go to
- 15:18:43D2 come back so in this manner you can
- 15:18:47use Dynamic drill through button you can
- 15:18:50control the text of the button you can
- 15:18:51also control where it should land you in
- 15:18:55this manner you will be able to use
- 15:18:56drill through and you will also be able
- 15:18:58to control Pages where it goes and the
- 15:19:01values it pass now let's discuss tool
- 15:19:04tip page or report tool tip page so what
- 15:19:06happens typically whenever you go to any
- 15:19:08visualization let me go to a page where
- 15:19:10I already have some visualization you
- 15:19:11get this default tool if I go here I
- 15:19:13also get a default tool you can add few
- 15:19:15measures here but sometime what happens
- 15:19:17is you want more interactive kind of
- 15:19:19stuff what I want is basically this
- 15:19:21category Pi should be shown when on the
- 15:19:23tool tip of this BR how do I do that so
- 15:19:25for that what you need is basically a
- 15:19:27tool tip page so add a new p page click
- 15:19:29on the empty space and in that one you
- 15:19:31can go and Define a page as tool tip
- 15:19:33page when you define a tool tip Page by
- 15:19:34default it takes the tool tip page size
- 15:19:37and it you get a small page so if you go
- 15:19:39to the canvas setting you will see it's
- 15:19:40a tool tie page you can change the size
- 15:19:42if required as of now I'll keep of the
- 15:19:44same size what we can do is we can add a
- 15:19:46visual here so I can add let's say Pi
- 15:19:47visual we give the complete space you
- 15:19:49can add whatever kind of visual you want
- 15:19:51now in this visual let me add few items
- 15:19:53so build a visual enable build a visual
- 15:19:55so I'll go to Legend add item
- 15:19:59category and then I'll go to values
- 15:20:01major base net okay we can do some font
- 15:20:04adjustment and all those as per
- 15:20:06requirement so we have little bit
- 15:20:07smaller or something or I can go ahead
- 15:20:10and on this Visual and I can say I don't
- 15:20:12need a title I can go to Legend and text
- 15:20:14size and I can reduce the text size okay
- 15:20:17and similarly I can go to detail labels
- 15:20:19and values and I can reduce the size
- 15:20:22okay because on tool tip we will be
- 15:20:23having a smaller one so we can reduce
- 15:20:25that so we able to adjust this visual
- 15:20:27now if I go to a page let say I go back
- 15:20:30to that first page in this page how do I
- 15:20:33bring that tool tip page our tool tip
- 15:20:34page was enabled so click on this Visual
- 15:20:36and when you get to the format go to the
- 15:20:38properties tool tip should have been
- 15:20:40enabled so enable the tool tip and here
- 15:20:42by default it is report page and auto
- 15:20:44here now you can select a tool tip page
- 15:20:46once you select a tool tip page on this
- 15:20:48particular visual you will be able to
- 15:20:50see that and look this is changing based
- 15:20:52on the information okay now if you go
- 15:20:54here there is no change if you go here
- 15:20:56there's no change because we are not use
- 15:20:58the tool tip page there now we have used
- 15:20:59tool tip page here so it will give me
- 15:21:00tool tip now let's go to another page I
- 15:21:02go to a page where in this visual I have
- 15:21:05both brand and category let me clear
- 15:21:07this off so now what happens in this
- 15:21:08page let me on this table visual I'll
- 15:21:10add tool tip I'll switch it on page page
- 15:21:13one is a tool tip page now it will only
- 15:21:15give category because the visual is on
- 15:21:17category and the category is in the
- 15:21:18visual it will pass that I don't want to
- 15:21:20pass category one thing I'll do is first
- 15:21:22of all let me call it as tp1 tool tip 1
- 15:21:25so I rename it I go to this page and I
- 15:21:26want to do certain changes so very
- 15:21:28carefully I need to click on the page
- 15:21:30properties the canva property and here I
- 15:21:32have option keep all filters I uncheck
- 15:21:34this now what should get pass to this
- 15:21:37page all things which you want to pass I
- 15:21:39don't want to pass category here I can
- 15:21:40give all other things which it should
- 15:21:42pass so I can give a brand here I can
- 15:21:44even give a city and state whatever I
- 15:21:46want to pass so State Should pass City
- 15:21:48should pass all the things which I want
- 15:21:50on this page to pass I can give here so
- 15:21:52these things will pass to this page now
- 15:21:53if I go to this D1 page and I click here
- 15:21:56you will see multiple categories the
- 15:21:57brand is getting pass but the category
- 15:21:59is not getting passed very good now
- 15:22:00let's test it on other things I go to
- 15:22:02this interaction page I do have this
- 15:22:04page where I have cities I go to the
- 15:22:05properties I go to report page and I
- 15:22:07enable tp1 for this and you can see with
- 15:22:09the cities the categories are changing
- 15:22:11it means the cities the are getting
- 15:22:13passed it's getting passed and brand is
- 15:22:15getting passed but category is not
- 15:22:16getting passed in this manner you can
- 15:22:18create a tool tip page now while adding
- 15:22:20the tool tip page you should be really
- 15:22:22careful the moment you go on the
- 15:22:23something it will start showing this
- 15:22:24tool tip so sometime the user go and
- 15:22:26want to read a value it will create a
- 15:22:28hindrance so very carefully add tool tip
- 15:22:30page because it suddenly pops up a big
- 15:22:32value and user may not be able to pay
- 15:22:35attention to the detail when the mouse
- 15:22:36is moving so as per the need add it on
- 15:22:39the required visuals let's quickly have
- 15:22:42a look at the AI visuals so I'll add a
- 15:22:45new page and inside that new page I will
- 15:22:48add the first AI visual which I want to
- 15:22:50discuss with this Q influencer now in
- 15:22:52the key influencer I need analyze and
- 15:22:55then I need to explain it by something
- 15:22:58things so so in the ly let me add
- 15:23:01brand and in the explain by let me add a
- 15:23:04major margin
- 15:23:06percentage it goes ahead and analyze and
- 15:23:09the filter is there on the brand one
- 15:23:12right now so margin percentage goes up
- 15:23:14by 0 2% the likelihood brand being brand
- 15:23:19one increase by this is the likelihood
- 15:23:21the brand one going inre you can change
- 15:23:22it to let's say brand 10 and it's going
- 15:23:25to generate the ideas for that same way
- 15:23:27you can also add discount percentage
- 15:23:31here
- 15:23:32net and it will keep on generating the
- 15:23:36key influencers for those this is one of
- 15:23:38the AI visuals now the next AI visual is
- 15:23:42decomposition tree now decomposition
- 15:23:44tree expands you to do the root cause
- 15:23:47kind of analysis and here what you can
- 15:23:49do in the analyze by let's add a few
- 15:23:51things in the analyze by let me add
- 15:23:53major I would like to add let's say net
- 15:23:55sales and then in the explain by let me
- 15:23:58add item brand category subcategory
- 15:24:02geography City now here what I can do is
- 15:24:04I can go to this plus button and I can
- 15:24:06say you know I want to see the high
- 15:24:08values or the low values or I just
- 15:24:10wanted to see Next Step by let's say
- 15:24:12category it shows me how my category
- 15:24:14division is there then I want to say
- 15:24:16okay how my categories are doing like
- 15:24:18say by high
- 15:24:19values okay I get the subcategories the
- 15:24:22next level in the next one I can say
- 15:24:24okay what is the low values of the brand
- 15:24:27inside that one the these are the low
- 15:24:28values of the brand in this one so in
- 15:24:30this manner you can go ahead and you
- 15:24:32know keep on expanding and find out more
- 15:24:34details so let's try this let me
- 15:24:38duplicate this page remove this let me
- 15:24:42try to use M percentage measure here so
- 15:24:44I'm going to create M percentage measure
- 15:24:46here I'm going to Simply use M
- 15:24:49percentage which is nothing but divide
- 15:24:53MTD net minus lmtd comma denom minator
- 15:24:58which is again
- 15:25:00lmtd we make it as a percentage column
- 15:25:03let me use this measure here now
- 15:25:07definitely M need a month filter it
- 15:25:09can't work without that because I don't
- 15:25:11have data in the last available month so
- 15:25:13I'll put a filter for the month here
- 15:25:15here let's use December so now the
- 15:25:18change percentage are coming so category
- 15:25:20so we are having negative here so we now
- 15:25:23would like to analyze with this negative
- 15:25:26how this is performing where it is there
- 15:25:28again we see it's doing
- 15:25:30good let me remove these levels me
- 15:25:33remove this so Category 3 is doing
- 15:25:35negative let me go to the low values of
- 15:25:37Category 3 where I'm losing so I'm
- 15:25:39losing in these this is a 100% I'm
- 15:25:42losing okay so let me go ahead and check
- 15:25:45the category one remove the this one let
- 15:25:48me see in category one where I'm losing
- 15:25:50very small what are the low values uh
- 15:25:53here I'm losing
- 15:25:5493% so what I'm losing
- 15:25:57here okay so these are the brand where
- 15:25:59I'm losing so in this brand what are the
- 15:26:01subcategories where I'm what I have so
- 15:26:04only one subcategory now we know M we
- 15:26:06are not doing good so what is that
- 15:26:08causing this m not doing good so you can
- 15:26:11do a root cause analysis using this
- 15:26:13visualization next visual which I want
- 15:26:15to explain is Q&A visual really
- 15:26:17interesting visual it creates questions
- 15:26:19for you and you can ask so I can and it
- 15:26:21is already suggested one of the things
- 15:26:23which I wanted to create top customers
- 15:26:24by net I say okay give me top customers
- 15:26:27by net sales it has given me top 10
- 15:26:29customers by net sales and the good
- 15:26:31thing which you can do with this visual
- 15:26:33is not only you can ask the questions
- 15:26:35you can actually go ahead and convert
- 15:26:36this into a regular visual so here you
- 15:26:38have a sign here turn this into a
- 15:26:40standard visual it creates a visual for
- 15:26:42me I add another one and I'll ask
- 15:26:45another question or top five Brands by
- 15:26:49margin percent top five Brands by margin
- 15:26:52person and we got it we can convert this
- 15:26:54into a visual there are few settings
- 15:26:56here person SN names review question
- 15:26:59teach Q&A and suggest you can go and
- 15:27:01Define additional synonymes like net I
- 15:27:03wanted to call sales I would definitely
- 15:27:05go ahead and somewhere mentioned that
- 15:27:07net is nothing but sales whenever I use
- 15:27:10sales use net so here if I go down you
- 15:27:13can see it's already the net is
- 15:27:15basically sales so sales is used for net
- 15:27:17already it's no name if not I can add it
- 15:27:19so in this manner you can modify the
- 15:27:21setup for Q&A and can make it more
- 15:27:24effective and you can leave it for your
- 15:27:26end users to ask questions and get the
- 15:27:29answers other than that there are a
- 15:27:31couple of interesting visuals like Power
- 15:27:33app in case you are using power app you
- 15:27:34will be able to embed and you will be
- 15:27:36able to write back you will be able to
- 15:27:38start a power automate flow using the
- 15:27:41power automate for that you need to have
- 15:27:42power automate you can also embed page
- 15:27:45native report inside your powerbi
- 15:27:48desktop report or powerbi report and
- 15:27:51also publish it and then you will have
- 15:27:52the page inated report also part of this
- 15:27:54so these are the various kind of
- 15:27:55visualization other than the normal
- 15:27:57visualization which are aailable which
- 15:27:58you can use you want to use a custom
- 15:28:01visual you can click on the get more
- 15:28:02visual make sure you are signed in and
- 15:28:04your organization has allowed that and
- 15:28:06one of the very common custom visual
- 15:28:08which I use is the text filter again it
- 15:28:10is from Microsoft Corporation and let's
- 15:28:12add it now the good thing with this
- 15:28:14visual is the text visual is that this
- 15:28:18visual you can search let me add to it
- 15:28:20so basically I don't need to go and say
- 15:28:23New York I can search new it's filtered
- 15:28:25now what all cities have come let me
- 15:28:27showcase you using another visual where
- 15:28:29I create a table visual so these are the
- 15:28:31three cities which I got or where I use
- 15:28:34or all these cities I use or so this is
- 15:28:37the way you can use text there are other
- 15:28:38few visuals and one of the interesting
- 15:28:41visual which you can also try out is
- 15:28:44basically play access Visual so play
- 15:28:47access Visual is another good one which
- 15:28:49you can try out let me add this this is
- 15:28:51by some third party not from Microsoft
- 15:28:54but what you can do is you can put this
- 15:28:56play access Visual I can put month year
- 15:28:58on
- 15:28:59this and in this visual I would also
- 15:29:02like to have a visual level filter that
- 15:29:04whatever month year I want I only want
- 15:29:06those month here where net is not blank
- 15:29:10only those months and what I'm going to
- 15:29:12do here is I'm going to create a visual
- 15:29:14on which I will use margin
- 15:29:18percentage on brands or I can use
- 15:29:21cities so my Brand's margin percentage
- 15:29:25will keep on moving in a direction let's
- 15:29:27see let me play this how does it behave
- 15:29:30and the reason for this behavior is
- 15:29:32right now the interaction is highlight
- 15:29:35and let me change this interaction I
- 15:29:37click on the visual and I go to format
- 15:29:39edit interaction and I change it to
- 15:29:41filter one more thing I do is I go to
- 15:29:44the column and under the FX I go and
- 15:29:47write down a rule the margin which is
- 15:29:50basically from minus one number to zero
- 15:29:54as a number it should be red plus
- 15:29:57greater than
- 15:29:58zero number to one as a number should be
- 15:30:01green it will give you a little bit more
- 15:30:03variety right now everything is green
- 15:30:04now let's play
- 15:30:05around every month is showing the brand
- 15:30:09how they're behaving and you can start
- 15:30:10seeing the negative values now so how
- 15:30:13each brand is changing now you can see
- 15:30:16that so in this manner you can use the
- 15:30:19AI visuals and custom visual as per your
- 15:30:22requirement let's learn about the card
- 15:30:25visual so let me go to a new page and in
- 15:30:27this this page I will add this new card
- 15:30:30visual now this new card visual came
- 15:30:32very recently in 2023 it has feature of
- 15:30:36card visual along with some Advanced
- 15:30:38feature like you can add images you can
- 15:30:40have multiple Majors inside the card
- 15:30:43visual so let me make it little bit
- 15:30:44bigger and I will start adding content
- 15:30:47to it so let me add net gross discount
- 15:30:51and calls on that so I can add these
- 15:30:54different kind of measures here so this
- 15:30:56is one simple way now it has lots of
- 15:30:58formatting properties let me click on
- 15:31:00the format and inside that size and
- 15:31:03style is common title is if you want to
- 15:31:05add a title you can add as usual we have
- 15:31:07seen we have title and then we have
- 15:31:09subtitle then we have divider I don't
- 15:31:12think we require a title unless we want
- 15:31:14to give it I don't want to give some
- 15:31:16Title Here let me disable that shape yes
- 15:31:18the it is rectangular shape I like
- 15:31:20rounded rectangular shape so I'll do
- 15:31:23that but yes I can change the rounding
- 15:31:25or I can use some custom style custom
- 15:31:28style means I need to decide what I want
- 15:31:30for each and every corner I don't want
- 15:31:32to do that but I just want to decrease
- 15:31:35it so I will decrease the rounded then
- 15:31:37comes the layout what kind of layout you
- 15:31:40need single row multi row grid and
- 15:31:42sometime you might not want single rows
- 15:31:45so you can have a grid and once you give
- 15:31:47grid it can ask you how many rows and
- 15:31:49columns I need I can let's say two rows
- 15:31:51and two columns just right now for the
- 15:31:54testing purpose let's do that then the
- 15:31:56next is go to call out values inside the
- 15:31:59call out values if you switch it off you
- 15:32:01will stop seeing the values so and on
- 15:32:03which series you want to take a decision
- 15:32:05you can take a decision of font color
- 15:32:08the conditional formatting all those
- 15:32:10decisions can be taken on based on the
- 15:32:12values you can want to align them
- 15:32:14centrally right align left align display
- 15:32:17unit Auto or none you want to display
- 15:32:20completely then you can say none then
- 15:32:22decimal places I can set up to zero I
- 15:32:25don't want any decimal places if there
- 15:32:27is no value then what should I show na
- 15:32:30or blank I can do that then comes the
- 15:32:32label which is on I can switch off the
- 15:32:34label and I will not see any names there
- 15:32:37right now I'm seeing the names so this
- 15:32:39one name I want to make these name
- 15:32:40Bolder I can do that I can want to do
- 15:32:43conditional formatting on the name I can
- 15:32:45do I want them above or below so the
- 15:32:47names could be below like this it was
- 15:32:49above previously I likeed this one if
- 15:32:51they are bigger you can use text strap
- 15:32:53and align Baseline if you want to align
- 15:32:55to the Baseline on and off then comes
- 15:32:57the reference label reference label for
- 15:32:59what net for cogs or what let's try to
- 15:33:03add a reference label for net we have
- 15:33:05lot of reference label so we have MTD
- 15:33:07net lmtd net let me add net MTD net so
- 15:33:11first of all let me add a slicer here on
- 15:33:14the page for month here let me select a
- 15:33:16particular month now I have certain set
- 15:33:18of values now let me go ahead and add
- 15:33:21some reference labels so for net I
- 15:33:23wanted to add a reference label let me
- 15:33:26try to add MTD major and as you can see
- 15:33:30I'm able to see the MTD I can enable the
- 15:33:32title so that I see the MTD value now I
- 15:33:35can also enable details details will
- 15:33:38give me one more major I can have here
- 15:33:40let me add m m measure I can add here in
- 15:33:43the details now to add this measure what
- 15:33:45you have to do basically is here when
- 15:33:47you have added this MTD you have to go
- 15:33:50ahead and select this MTD and then when
- 15:33:53you come down you will be able to add a
- 15:33:55major a without that you can't add
- 15:33:57unless you selected now this value is
- 15:33:59something which is you know you might
- 15:34:01not be able to format it here so what I
- 15:34:03need to do is I need to create a
- 15:34:05formatted major for this one so I'll go
- 15:34:08and create a new major I'll call it m
- 15:34:11icon and let me first do without icon so
- 15:34:14format M percentage comma hash do 0% I
- 15:34:20want that and let me use M icon now here
- 15:34:23if you want to use M then you can go and
- 15:34:25use the display basically none so now
- 15:34:27let me replace this with M icon so I'm
- 15:34:31able to see the percentage change here
- 15:34:33and or I can change it to percent so it
- 15:34:36is showing the percentage I was using
- 15:34:39the one decimal place so it was showing
- 15:34:41that much so this is now 9% now in case
- 15:34:44you need some icon so then what we can
- 15:34:46do is we can use certain uni a
- 15:34:48characters let me bring in a uni a
- 15:34:50character for you and modify this mejor
- 15:34:53I had a previous code which I want to
- 15:34:55bring it here I want to append icon so
- 15:34:57so I'll use M perent to string now
- 15:35:00there's a change percentage for which I
- 15:35:02have identified few uni a I'm going to
- 15:35:04use this m percentage there so if it is
- 15:35:06greater than zero I'm using a particular
- 15:35:08kind of uni if it is less than zero I'm
- 15:35:11using a particular kind of enar so let
- 15:35:13me see what happens now I'll commit this
- 15:35:15UniCare gives us small small icons which
- 15:35:17we can use it's giving me these kind of
- 15:35:19icons now I want to change the color
- 15:35:21also isn't it based on my M chain
- 15:35:23percentage I can go to the font color
- 15:35:25and I can click on FX and I'll use the
- 15:35:28rule based color I'll use M percentage
- 15:35:31if M percentage is less than minimum to
- 15:35:34less than zero it's red plus M
- 15:35:36percentage is greater than Zer or equal
- 15:35:39to Zer and less than Max we can write
- 15:35:41down Max here then I want to show it a
- 15:35:43green here and let's click on okay it's
- 15:35:45red because it's coming negative I can
- 15:35:47change few months and check it out here
- 15:35:49it is positive negative so you can see
- 15:35:51and similar manner I can add a few more
- 15:35:54additional details here to make it
- 15:35:56little bit more attractive one thing
- 15:35:58which I observed if your reference
- 15:36:00labels are giving blank value the
- 15:36:02properties might go away seems like uh
- 15:36:05there is a null value handling issue now
- 15:36:07let's go further down you have option
- 15:36:09for background on or off so if you don't
- 15:36:11need the background color you can do it
- 15:36:13and then there are certain properties
- 15:36:15which may be applicable at the all level
- 15:36:17so if you select all the labels and you
- 15:36:19come down then you have few properties
- 15:36:21which you can basically it's always on
- 15:36:24that but you can use the transparency
- 15:36:26stylish solid width is 1 pixel ignore
- 15:36:30padding all those things you can you can
- 15:36:32change then background you can change
- 15:36:34the background color you don't want the
- 15:36:36gray color you can have some other color
- 15:36:38now one more thing you can do is you can
- 15:36:39add images now again images are
- 15:36:42individual to the major so for
- 15:36:45particular major you can have add a
- 15:36:47image you can browse the image and can
- 15:36:49add it or you can go ahead and add a
- 15:36:52image from the URL so let me add a image
- 15:36:55from the desktop
- 15:36:58I have some images let me just take one
- 15:37:00of these image nothing represent new but
- 15:37:02let's take one of them this is a real
- 15:37:05big image so fit we can decide let's say
- 15:37:07use a fit or we'll use a fill and then
- 15:37:10we can go and decide the
- 15:37:12size I use 150 pixel side but it's
- 15:37:16reducing my font and giving the problem
- 15:37:19so let me use 100 100 pixel is perfectly
- 15:37:21suitable so same way for others I can
- 15:37:24also give icons so this new card visual
- 15:37:27offers you lot of flexibility lot of
- 15:37:30options which you can use and make it
- 15:37:33really engaging and using this you can
- 15:37:36add lot of value to your visualization
- 15:37:40and powerbi is continuously improving on
- 15:37:43these kind of visualization whether it
- 15:37:46is new card visual or new slicer so you
- 15:37:50can go ahead and try these out inside
- 15:37:53your Microsoft powerbi report pages and
- 15:37:57create really give a new level of look
- 15:37:59and fee to your
- 15:38:01pages new card visual was released
- 15:38:04sometime back and in November 2024 small
- 15:38:08multiples for new card visual has been
- 15:38:10released these features allow you to
- 15:38:13have small multiples for the new card
- 15:38:15visual this feature is in preview as of
- 15:38:18now and let's look at the details of
- 15:38:21this
- 15:38:22feature so let's have a quick look at
- 15:38:24what we plan to discuss in this video
- 15:38:27first of all we will go ahead and look
- 15:38:29at the release notes of November 2024 to
- 15:38:33understand what is small multiples for
- 15:38:35new card visual then we will go ahead
- 15:38:39onto the power ba dtop and we will
- 15:38:41enable the new card visual under options
- 15:38:44and setting and options then we will
- 15:38:46explore small multiples on the new car
- 15:38:49Visual and finally we will play around
- 15:38:52with various settings available for the
- 15:38:54new card visual small multiples
- 15:38:58so let me jump onto the release notes of
- 15:39:00November
- 15:39:022024 so I am here on the November 2024
- 15:39:08powerbi feature summary and in this
- 15:39:11feature summary when you scroll little
- 15:39:13bit down you will find the feature which
- 15:39:16is small multiple for new card visual
- 15:39:20review Once you click on that you will
- 15:39:22find the details about that with this
- 15:39:25month's update we are announcing the
- 15:39:27card visual with a new version that
- 15:39:29retains all the familiar features and
- 15:39:31update while adding the advanced
- 15:39:34functionality and improved user
- 15:39:36experience with all multiple this
- 15:39:38feature is currently preview and the new
- 15:39:41card visual offering is an excellent
- 15:39:43opportunity to experience the
- 15:39:45capabilities of the feature small
- 15:39:47multiples are a series of similar card
- 15:39:50ties displayed together in Grid format
- 15:39:54each representing a category or
- 15:39:56dimension of data allowing for
- 15:40:00easyr comparison and analyzing multiple
- 15:40:03feeds you will be able to use the small
- 15:40:06multiples means the cards will Repeat
- 15:40:08based on categorical variable which you
- 15:40:10will to provide the newly feature in has
- 15:40:13the data organization visual Clarity and
- 15:40:16performance making it easier analyze and
- 15:40:19present data fact to try it navigate to
- 15:40:23options and setting options preview
- 15:40:25features new card visual and make sure
- 15:40:28it is enabled that is something which we
- 15:40:30have enabled in the past and the car
- 15:40:31visual has arrived if you are not using
- 15:40:34the new car visual you have to enable
- 15:40:36that another advantage of new small
- 15:40:38multiples feature is extensive
- 15:40:41customization it offers including small
- 15:40:44multiple layout and choose from single
- 15:40:47column single row or grid and customize
- 15:40:49the number of small multiple r or column
- 15:40:52displayed Advanced formatting option
- 15:40:54featur such as font styes color coding
- 15:40:57and traditional format borders and grid
- 15:41:00lines the enable individual controls for
- 15:41:03border and grid lines permits the
- 15:41:05customization of style fit and
- 15:41:08transparency overflow style options
- 15:41:11include continuous scrw or pagination to
- 15:41:14smoothly navigate through the multiple
- 15:41:16card without overwhelming the visual
- 15:41:17space headers toose from the horizontal
- 15:41:21or vertical orientation top or left
- 15:41:24position customizable alignment F color
- 15:41:27transparency padding plus background
- 15:41:29color and image these are the few of the
- 15:41:32features which we going to explore into
- 15:41:34the powerbi so this is the summary of
- 15:41:38the notes now time has come that we jump
- 15:41:41onto the powerbi
- 15:41:43desktop on the power ba desktop first of
- 15:41:47all let me showcase you my schema under
- 15:41:50the data model view it contains my usual
- 15:41:53sales model which contain a central
- 15:41:56sales f
- 15:41:57joined with item Dimension customer
- 15:42:01Dimension geography Dimension and dat
- 15:42:05table all the joins are one too many and
- 15:42:08mostly single directional me go back to
- 15:42:11the report View and add a page to start
- 15:42:16today's demo but before I start today's
- 15:42:19demo I would like to tell you the
- 15:42:21setting to enable the new card visual in
- 15:42:25case you have not enabled it previously
- 15:42:27ly file options and setting
- 15:42:32options and in the options under the
- 15:42:34preview features inside the preview
- 15:42:36feature I have already enabled new card
- 15:42:38visual in case you are doing it for very
- 15:42:41first time it was uncheck press on okay
- 15:42:45and continue in my case I can press on
- 15:42:47cancel and continue when you press okay
- 15:42:50you might have to close and open your
- 15:42:53file again in case it is asking for that
- 15:42:58back onto the power VA page and let's
- 15:43:01call this new page as C
- 15:43:05is on this page I'm going to add a new
- 15:43:07card visual so first of all I'll open
- 15:43:09the build visual P from my right hand
- 15:43:12side where I have see all the panes and
- 15:43:15from here I'm going to add a new card
- 15:43:17visual or in this card visual I can add
- 15:43:21multiple measures but I want to add one
- 15:43:24measure to start with I have added the
- 15:43:26one major and as you can see the net
- 15:43:29value is displayed on the new card
- 15:43:32visual I will go ahead and add brand
- 15:43:36onto the small multiples and you can see
- 15:43:39option of small multiple has also been
- 15:43:42provided into the new car visual as I
- 15:43:46add that you observe that my new car
- 15:43:49visual is showing brand but because of
- 15:43:52the space limitation it's not showing it
- 15:43:54properly time has come to provide this V
- 15:43:57visual more
- 15:43:58space make it little bigger now you're
- 15:44:01able to see the brand and the net it's
- 15:44:05only showing the three rows as of now
- 15:44:08and we are going to adjust it using the
- 15:44:10new format properties which we have got
- 15:44:13for small multiples let's click on the
- 15:44:15format and you have got two properties
- 15:44:18here small multiples layout and a small
- 15:44:21multiples header first of all let's look
- 15:44:24at the layout so single column layout
- 15:44:26let right right now we can continue with
- 15:44:28that and we use five multiple for
- 15:44:31displaying the multiples when the reason
- 15:44:33I'm not showing 10 because I would like
- 15:44:36to show you the scrolling as well as the
- 15:44:39vertical headers here it's single column
- 15:44:42I could have gone for single row which
- 15:44:44will look like something like this I
- 15:44:45need to do width adjustment in that case
- 15:44:49and I can make it a little smaller if I
- 15:44:51want like that that's the G or I could
- 15:44:54have made it as a grid once I made it a
- 15:44:57grid so the values like this brand one
- 15:45:00brand 10 Brand 11 brand 12 brand 13 I
- 15:45:03can choose the layouts like how many
- 15:45:06rows and columns I
- 15:45:08want I can make it a 4x4 matrix by
- 15:45:11choosing four rows and four
- 15:45:13columns now depending on the values and
- 15:45:16the font size you can make it little
- 15:45:18different so let's go back to the single
- 15:45:21column layout keep it five we have the
- 15:45:24borders you can see I can add the
- 15:45:26additional bord if I add the Border I
- 15:45:28can change the color or I can change the
- 15:45:31width Etc if I add the Border I can CH
- 15:45:34the width and if I start changing the
- 15:45:35WID we'll be able to see the B grid
- 15:45:38lines in case you want grid lines go use
- 15:45:40grid lights pay attention
- 15:45:42here you don't use gr grid lines what
- 15:45:46happens overflow AG inated
- 15:45:50orous scrw so let me change it to
- 15:45:52continuous scrw now you can see on and
- 15:45:55if I make it paginated you see small
- 15:45:58icon here and then scroll down and you
- 15:46:00can scroll up using the pagination
- 15:46:03pagination could be vertical and
- 15:46:05horizontal that what you can do the
- 15:46:08background in case you want to change
- 15:46:10the background I'm not interested in
- 15:46:12changing the background as of now and
- 15:46:14the shape shape could be a little bit
- 15:46:17rounded Corners here you can observe the
- 15:46:19rounded Corners now it is column wise
- 15:46:22with single measure so I can reduce the
- 15:46:24width Cas we add more measure we have to
- 15:46:27increase the width according to that so
- 15:46:31these are the properties which I have
- 15:46:33inside the small multiples and the
- 15:46:35various stuff which I can change out I
- 15:46:38can make the single column single row or
- 15:46:40grid layout and I can play around with
- 15:46:43when I go to the small multiple headers
- 15:46:45I have you know whether I want the this
- 15:46:48for one series or for all the series as
- 15:46:50of now I wanted to do the changes for
- 15:46:52all the serieses so let's me go ahead
- 15:46:55and change the orientation to orient
- 15:46:57ation to vertical and this is something
- 15:46:59you were asking for long now that we
- 15:47:02need to display it vertically you have
- 15:47:05option in the small multiple header for
- 15:47:08the
- 15:47:09orientation position is left or top
- 15:47:12right now it is left and I when I make
- 15:47:14it top you will stop seeing the data and
- 15:47:17this top position will for suited if you
- 15:47:19go to let's say the single Row the top
- 15:47:23position is more suitable for the single
- 15:47:25row rather than the single column option
- 15:47:30depending on the requirement we can play
- 15:47:32around with the single row single column
- 15:47:35as well as left and top it is just
- 15:47:39basically based on the need what suits
- 15:47:42most for your
- 15:47:44requirement it doesn't look so good so
- 15:47:47let's change it back to the five and
- 15:47:49let's go down and make it from the top
- 15:47:52to left there are scenarios where single
- 15:47:54row will look better than the single
- 15:47:57column when you have lot of values it
- 15:48:00may be little better to have the single
- 15:48:04row along with the left this is giving a
- 15:48:08different look and feel and if you want
- 15:48:11you can continue with that but let me
- 15:48:14make it little smaller we'll go down and
- 15:48:17change the position to the top now for
- 15:48:21the top display I have to again do
- 15:48:23little bit of visual size adjustment
- 15:48:26vertical orientation let me change the
- 15:48:29number of small multiple from 5 to 8 is
- 15:48:33not the most suitable UI for what I'm
- 15:48:35displaying right now but I just wanted
- 15:48:37to Showcase you the properties let me
- 15:48:40play around little bit and go back to
- 15:48:42the single column View and back on the
- 15:48:45single column left
- 15:48:47layout now on the headers what we can
- 15:48:50also do is do the change of the color so
- 15:48:53background is on off I can have a
- 15:48:56background color and the background
- 15:48:58color a little lighter color I can
- 15:49:01choose a background color or I can
- 15:49:03choose a background
- 15:49:05image one can play around with the call
- 15:49:08out value enable and disable that to
- 15:49:10disable the values also we can play
- 15:49:13around with the label if you have only
- 15:49:15one major you might not want to display
- 15:49:18the label but yes if uh I have more than
- 15:49:21one value if I add other major which is
- 15:49:24gross along with net
- 15:49:27now in such case I would definitely like
- 15:49:30to have a label I'm having gross and net
- 15:49:33now so I need to go ahead and change the
- 15:49:35layout position to single Row in this
- 15:49:37case now this is the layout position of
- 15:49:40the card you have a multiple card visual
- 15:49:44this is not the layout position of small
- 15:49:46multiple this is only layout which we
- 15:49:48get with the card Visual and we can
- 15:49:51change it when we use more than one
- 15:49:54measure to display it correctly can
- 15:49:58choose between the style card and table
- 15:50:00and when I choose card you will see the
- 15:50:02small differences of individual card
- 15:50:05display in
- 15:50:07this you can try out the various
- 15:50:10properties and the option which has been
- 15:50:12provided with this small multiple option
- 15:50:15of new car visual powerbi is putting lot
- 15:50:19of effort these days to enhance your
- 15:50:22visual experience so keep a eye on every
- 15:50:25month's update what powerbi has stored
- 15:50:29for you in the future why don't you go
- 15:50:32ahead and try this
- 15:50:36out now time has come that we understand
- 15:50:39what is power query so power query you
- 15:50:41can say is one of the PowerHouse in
- 15:50:44Microsoft powerbi power query is the
- 15:50:47data transformation and data preparation
- 15:50:49engine so basically when you talk about
- 15:50:52you know how do I manipulate the data
- 15:50:54how I do I going to make it into shape
- 15:50:57we talk about that you know in power ba
- 15:50:59we need to have a star
- 15:51:01schema then if it is not in a star
- 15:51:04schema how do we transform and put it
- 15:51:06into a star sign if our data is not
- 15:51:08clean how we are going to make it clean
- 15:51:10and going to put it into a format where
- 15:51:13powerb can understand it easily or the
- 15:51:15Dax engine can work better so that is
- 15:51:18where the role of power query comes in
- 15:51:19everything which you are bringing in
- 15:51:21into the powerbi is typically coming in
- 15:51:24via the power query layer so we have the
- 15:51:28power query layer post that the what
- 15:51:31transform data we got from the power
- 15:51:33query layer that comes to the models on
- 15:51:35those models we create relationship
- 15:51:37create Dex measures and then create
- 15:51:40visualizations power query comes with a
- 15:51:42graphical interface for getting data
- 15:51:43from the sources and a power query
- 15:51:45editor for applying the transformation
- 15:51:47so you will see that you know it has a
- 15:51:48UI interface basically which is going to
- 15:51:50help you to do various operations so
- 15:51:53those operations are pretty easy but for
- 15:51:55everything what you are seeing there
- 15:51:57there is a basically code behind that
- 15:52:00which you can open into the advanced
- 15:52:01editor and can check it out because the
- 15:52:03engine is available in many products and
- 15:52:05services the destination where the data
- 15:52:07will be stored depends on where the
- 15:52:09power query was used basically power
- 15:52:11query is not only use in powerbi in case
- 15:52:14of Microsoft fabric we have data flow
- 15:52:16Gen 2 in case of Azor we have Azor data
- 15:52:18flow there is a data flow in the powerbi
- 15:52:21service also so there are different
- 15:52:23places where you know you can have a
- 15:52:25destination like Microsoft fabric power
- 15:52:28data flow Gen 2 which is also using
- 15:52:30power query to provide a destination
- 15:52:32option to you using power query you can
- 15:52:35perform the EXT transform and load ETL
- 15:52:38process for data so basically in powerbi
- 15:52:42if you wanted to do ETL it's natively
- 15:52:45power VI ETL then you have to use power
- 15:52:48query so let's talk a little bit about
- 15:52:50power query experience the power query
- 15:52:52user experience is provided through
- 15:52:53Power query editor user interface the
- 15:52:55goal of it this interface is to help you
- 15:52:58apply transformation you need simply by
- 15:53:01interacting with the user friendly set
- 15:53:03of ribbons menus buttons and other
- 15:53:05interactive components so you have set
- 15:53:07of menus like home transform data custom
- 15:53:10column Etc using that you can do tons of
- 15:53:12operations all these operations are
- 15:53:14pretty intuitive they have been given a
- 15:53:17name by which you can understand them
- 15:53:19and there are step which perform quite a
- 15:53:21few complex operations like when you go
- 15:53:22to pyot data or unpivot data they are
- 15:53:24performing real complex operations but
- 15:53:26for you it's just one click power query
- 15:53:29experience you will get it two Place
- 15:53:31definitely one is you are getting in
- 15:53:32powerbi desktop another one you are
- 15:53:33getting powerb online so powerb online
- 15:53:36you will found the integration such as
- 15:53:39powerb data flows Microsoft fabric data
- 15:53:41flow Gen 2 Microsoft Power Platform data
- 15:53:44flows AZ data factory rangling data
- 15:53:47flows and many more that provides the
- 15:53:50experience through the online web pages
- 15:53:53these are online experiences and as you
- 15:53:55know your favorite power query for
- 15:53:57desktop found integration such as power
- 15:54:00query for Excel and powerb desktop so
- 15:54:02both in Excel and powerb desktop we do
- 15:54:03have the power query
- 15:54:06experience what power query use
- 15:54:09internally so power query use a language
- 15:54:11which is known as M language which is
- 15:54:13basically for the transformation so the
- 15:54:15power query engine uses scripting
- 15:54:17language behind the scenes for all power
- 15:54:19query transformation the power query
- 15:54:21formula language it's known as m m
- 15:54:23language is data transformation language
- 15:54:25of power query and anything that happens
- 15:54:27in the query is ultimately written in m
- 15:54:29so basically if you're doing a operation
- 15:54:31pyot Operation so there is some function
- 15:54:33of M which is getting execute and then
- 15:54:35you getting that so what will happen
- 15:54:36when you open the Advan editor you will
- 15:54:38be able to find out the code so right
- 15:54:40now at this stage we'll not discuss is
- 15:54:42what is inside this Advanced editor as
- 15:54:44you become the advanced power VI
- 15:54:45developer you will be able to see that
- 15:54:47code inside that one and in our beginner
- 15:54:49series we have discussed quite a few
- 15:54:51functions all the power query functions
- 15:54:54which you can use has been discussed in
- 15:54:56the beginner series all the table
- 15:54:58function the list function all these has
- 15:55:00been discussed in detail there so please
- 15:55:02go ahead and also watch that series
- 15:55:04means once you are a little bit
- 15:55:05comfortable with this one there are
- 15:55:07quite a few videos in the beginner
- 15:55:08series which you will be able to watch
- 15:55:10so let's move ahead if you want to do
- 15:55:12Advanced transformation using power
- 15:55:13query engine you can use Advanced Editor
- 15:55:15to access the script of the power query
- 15:55:18and modify it as you want as I said you
- 15:55:20know Advanced editor is there and we do
- 15:55:22manually write down the script if needed
- 15:55:24you can modify the script as per our
- 15:55:25requirement is all we can do it it is
- 15:55:27not only the graphical user interface
- 15:55:29which is going to do everything for us
- 15:55:31if user interface function and the
- 15:55:33transformation won't perform the exact
- 15:55:36changes you need use the advanced editor
- 15:55:38or the M language to fine-tune your
- 15:55:40functions and transformation we can go
- 15:55:42ahead and you know change these things
- 15:55:44and sometime we solve the complex
- 15:55:46problem at that time we realize okay
- 15:55:47it's really difficult if I simply try to
- 15:55:49combine some steps so we go ahead and
- 15:55:51you know write down manually the power
- 15:55:53query code and so now what we are going
- 15:55:55to do we going to go ahead ahead and
- 15:55:56look at basic operations of power VI
- 15:55:59which you must know as a beginner and
- 15:56:01then from there you can pick up and can
- 15:56:03do more and more complex transformation
- 15:56:06you can combine transformation and solve
- 15:56:07some problems you can go ahead and write
- 15:56:09down you know nested functions of M
- 15:56:11language and you know create your own
- 15:56:13Solutions around it let's understand
- 15:56:16data transformation and which is also
- 15:56:18known as power query so what happens is
- 15:56:21when we start data loading especially in
- 15:56:23the import mode in the powerbi the data
- 15:56:26when it get imported the first place
- 15:56:28where it LS it is into the data
- 15:56:30transformation mode but what happens is
- 15:56:32most of the time we just simply load the
- 15:56:34data so we are not aware that the data
- 15:56:36was actually passed through the power
- 15:56:38query layer or the data transformation
- 15:56:40layer power query transformation or the
- 15:56:42transform data layer is really strong
- 15:56:44and we can do a lot to improve the
- 15:56:47quality of the data it is kind of a ETL
- 15:56:49data quality improvement data
- 15:56:51transformation engine so let's begin by
- 15:56:54using the power query typical way to
- 15:56:56reach power query is transform data so
- 15:56:59when you do this you will reach power
- 15:57:00query layer but when you load a new data
- 15:57:02also you can instead of loading the data
- 15:57:04you can use transform data and in that
- 15:57:06manner you can also reach to power query
- 15:57:09and we will use the same method for this
- 15:57:11part of the video what we are going to
- 15:57:13do is we are going to use this file pyot
- 15:57:15data. XLS which is again available on my
- 15:57:17GitHub account and you'll get a link
- 15:57:19right click on the raw copy link and go
- 15:57:22to Power query click on get
- 15:57:24data web
- 15:57:26give the URL click on
- 15:57:29okay you got a popup there are quite a
- 15:57:31few things which are available in this
- 15:57:33file and what I'm going to do is I will
- 15:57:36take most of these things and instead of
- 15:57:38load now I will use transform data
- 15:57:41transform data will take me to the power
- 15:57:44query module and power query module
- 15:57:46which can be used to transform data also
- 15:57:49sometime when you have huge amount of
- 15:57:51data you don't want to load it directly
- 15:57:52you can come to this module and reduce
- 15:57:54it the data not in final shape just like
- 15:57:57the data we have loaded right now you
- 15:57:59can come to this place transform it and
- 15:58:01then start loading it you have option
- 15:58:03here for close and apply which you can
- 15:58:06use once you done with the
- 15:58:07transformation apply stay here and
- 15:58:08continue close and apply means close and
- 15:58:10the changes would be apply and you can
- 15:58:12go ahead and analyze that various tabs
- 15:58:14and the most important tabs which you're
- 15:58:16going to use for the transformation is
- 15:58:18Home tab the tons of transformation
- 15:58:20available here then the transform tab
- 15:58:22this include lot of transformation add
- 15:58:24columns not only you can add The Columns
- 15:58:26but other than that there are
- 15:58:28transformation which can be done while
- 15:58:30adding the column you can do that then
- 15:58:32inside the view you have the column
- 15:58:34quality column distribution column
- 15:58:36profile if you are now looking at the
- 15:58:38data you might be seeing that you know
- 15:58:39it is showing the column distribution
- 15:58:41right now distribution means how many
- 15:58:43distinct value you have and how many
- 15:58:44unique value you have might ask what is
- 15:58:46the difference between distinct and
- 15:58:48unique distinct means how many distinct
- 15:58:50value I have like a b c d nine values I
- 15:58:52have distinct values then what's the
- 15:58:54difference between distinct and unique
- 15:58:55the dis distinct value which are non-
- 15:58:57repetitive if you look at the second
- 15:58:59column it is saying there are only two
- 15:59:00values which are basically non
- 15:59:03repetitive so if you see 78 it is
- 15:59:05actually repeating okay if you look at
- 15:59:0756 it is actually repeating so one of
- 15:59:10the value distinct value is 56 but it is
- 15:59:12repeating if you look at 90 it is one of
- 15:59:14the values which is disting but
- 15:59:16repeating 80 and 45 are the values which
- 15:59:20are the distinct which will become part
- 15:59:21of the distinct values but they are not
- 15:59:23repeating so that's how unique and
- 15:59:25distinct are different then you can also
- 15:59:27add column quality column qualities give
- 15:59:29you valid error and empty so the data
- 15:59:32which I have is empty but if you have a
- 15:59:34data like this one you have the empty
- 15:59:35rows 25% of rows are empty for this
- 15:59:38particular column then then comes the
- 15:59:40column profile now column profiling is
- 15:59:42pretty strong it provides you a lot of
- 15:59:44information like count error empty
- 15:59:47distinct unique empty string min max and
- 15:59:50if you have a number column let's go to
- 15:59:51a table where you have a number column
- 15:59:53also so here in this one we a number
- 15:59:56column so in the case of number column
- 15:59:58it will also give you min max average
- 16:00:00standard deviation odd even so so many
- 16:00:03things it will tell you so if you want
- 16:00:04to know more about your data then you
- 16:00:07can use column profiling column quality
- 16:00:10and column distribution Under The View
- 16:00:12tab now you learned about these column
- 16:00:15profiling column distribution let's also
- 16:00:17pay attention to the panes on the left
- 16:00:19hand side we have pain where all the
- 16:00:21queries has been given on the right hand
- 16:00:23side all the steps have been given
- 16:00:24whatever you are doing here here every
- 16:00:26step is getting captured other than this
- 16:00:28observation of profile so how this data
- 16:00:31came in what was the source the Excel
- 16:00:34kind of a source we had then how the
- 16:00:36navigation has happened you selected a
- 16:00:37sheet fail sheet then promoted the
- 16:00:40headers the headers have been promote
- 16:00:42change type type has changed now any
- 16:00:44transformation you do any column you add
- 16:00:47other than the rename queries everything
- 16:00:48is getting tracked and what would happen
- 16:00:51all these steps you can look what was
- 16:00:53previous stage what is the current stage
- 16:00:55and these can be reverted middle steps
- 16:00:57can also be deleted provided the next
- 16:01:00two step can adjust to each other
- 16:01:02otherwise it they will give error so
- 16:01:04everything what you're doing is
- 16:01:05trackable here unlike Dex where you
- 16:01:07create a formula you know the formula
- 16:01:09but you don't know whether you created a
- 16:01:11formula a before or formula B before you
- 16:01:13don't know but here anything you do you
- 16:01:15do rename you do transformation like we
- 16:01:18are going to do pivot data unpivot data
- 16:01:21merg data append data everything will
- 16:01:23get tracked here so it is not process
- 16:01:26where you are not aware of the steps
- 16:01:28every step will be captured and will be
- 16:01:30shown to you now let's look at this data
- 16:01:33the pyot data is it in the final shape
- 16:01:35and ready to be analyzed no it is not
- 16:01:38the data is basically pivoted in the
- 16:01:40Excel somebody has moved the subjects on
- 16:01:43the columns and this is a pivoted data
- 16:01:46and to make this data more suitable for
- 16:01:49analysis we have to unpivot it so we
- 16:01:52have to go to transform data and there
- 16:01:55we have option for for unpivot unpivot
- 16:01:57columns unpivot other columns means
- 16:02:00other than what you have selected like
- 16:02:01right now I can do unpivot other columns
- 16:02:03I selected name I can unpivot other
- 16:02:05columns unpivot selected column unpivot
- 16:02:08columns First Step can decide whether it
- 16:02:10need to do other two unpivot selected
- 16:02:13columns whatever I select let's say if I
- 16:02:15select from here to here math to English
- 16:02:19then I will have to go and say unpivot
- 16:02:21selected columns when do I use other
- 16:02:24columns or when do I use selected column
- 16:02:26what happens if you have something known
- 16:02:28as month on the top it is possible that
- 16:02:30number of months are going to increase
- 16:02:31so you will get more months in the
- 16:02:33columns in such cases select the name
- 16:02:36kind of the column or the fixed
- 16:02:38categorical column and use unpivot other
- 16:02:40columns now you may come back and say no
- 16:02:42no no the column which need to unpivot
- 16:02:44remain same but the attributes may
- 16:02:46increase so with the name I can get age
- 16:02:49tomorrow I can get some other property
- 16:02:50the subjects are going to remain
- 16:02:52consistent in such case we will use
- 16:02:54unpivot only selected column so here
- 16:02:56we'll click on the name and use unpivot
- 16:02:58other column once I unpivot it it is
- 16:03:01going to give me attribute and value
- 16:03:03column and these attribute and the value
- 16:03:05columns are the one which has made my
- 16:03:07data now more suitable for analysis what
- 16:03:09I can do here is basically in the last
- 16:03:11step of unpivot other columns I can go
- 16:03:14ahead and change the name to subject and
- 16:03:18marks but don't do this in all the power
- 16:03:21query steps unless you understand that
- 16:03:23you can change them
- 16:03:26let's have a look at this data is there
- 16:03:28something wrong with this data now this
- 16:03:30data you can work with but there's
- 16:03:31something wrong actually the majors
- 16:03:33which I have they should be the columns
- 16:03:36but they are on the rows so sales and
- 16:03:38the margin both editable this is margin
- 16:03:40number not percentage they're actually
- 16:03:43in the rows instead of column and that's
- 16:03:45the problem with this data so basically
- 16:03:47this data is something which is already
- 16:03:49unpotted and I want to pyot it and to
- 16:03:53correct this data what I'm going to do
- 16:03:54is I'm going to select m and value I'll
- 16:03:56go to transform and I'll use this pivot
- 16:04:00data option I click on the pivot data it
- 16:04:04will ask what is the value column which
- 16:04:06is the column you want to Aggregate and
- 16:04:07then what is the kind of aggregation now
- 16:04:09here I have one value which is doubled
- 16:04:11up so if you don't have any value which
- 16:04:13is doubling up you can use don't
- 16:04:15aggregate but there is one value which
- 16:04:16is doubled up and that's why I wanted to
- 16:04:18First select don't agregate and want it
- 16:04:20to show you that is going to show me an
- 16:04:22error for that so if I use don't
- 16:04:24aggregate it will going to show me error
- 16:04:26because there are two values for this
- 16:04:27particular combination so it says this
- 16:04:30it's getting a list so what I'm going to
- 16:04:31do here is I can go to the gear icon
- 16:04:34here at the last there is a gear icon I
- 16:04:36can click on that I can go to the
- 16:04:37Advance option and instead of don't
- 16:04:39aggregate I can use some or you can
- 16:04:41delete this step and edit again let me
- 16:04:43do the sum and now I'm getting the
- 16:04:45correct pivoted table the data was UN
- 16:04:47pivoted from The Source I pivoted it I
- 16:04:50can use now close and apply to use this
- 16:04:53data but we'll continue to do more
- 16:04:54transformation
- 16:04:59what's wrong with this data quite a few
- 16:05:01things the header is not placed
- 16:05:02correctly there are full blank rows and
- 16:05:05sometime what happen you are bringing in
- 16:05:06Excel data you may get full empty rows
- 16:05:09at the end somebody might have traveled
- 16:05:11through that Excel sheet created those
- 16:05:13empty rows so how do we remove those
- 16:05:15completely empty rows the problem
- 16:05:16doesn't end here in this data I see
- 16:05:19complete duplicate rows the rows are
- 16:05:22completely duplicated so I want to
- 16:05:24remove by data doesn't have complete
- 16:05:26duplicate rows that's kind of data I
- 16:05:28want it to have and these are few
- 16:05:30transformation which I need so let's
- 16:05:31start doing these transformation so
- 16:05:33First Transformation I want to do is I
- 16:05:35want to make the first row as the header
- 16:05:37under the Home tab we option use first
- 16:05:40row as header let's do this
- 16:05:42transformation promoted headers
- 16:05:44transformation has been done along with
- 16:05:45the change type now the second
- 16:05:47transformation which I need want to
- 16:05:48remove the blank rows so under the Home
- 16:05:51tab we have remove rows and keep rows
- 16:05:54this time we are going to use remove
- 16:05:55rows under the remove rows you have
- 16:05:57removed top row remove bottom rows you
- 16:05:59can give the number of rows you want to
- 16:06:00remove sometime what happens you have a
- 16:06:02report where some additional stuff is
- 16:06:04there and then you are using that you
- 16:06:06might have additional R than the top
- 16:06:07there is a report where bottom something
- 16:06:09is written you don't want so remove the
- 16:06:10top and the bottom rows remove alternate
- 16:06:12rows remove duplicates which is the next
- 16:06:14step you want to do remove blank rows
- 16:06:16the step which you want to do right now
- 16:06:18and remove errors if there are some
- 16:06:19error rows let's remove those so remove
- 16:06:21blank rows completely blank rows we are
- 16:06:24going to remove and it removed the blank
- 16:06:25rows now the next thing which so now
- 16:06:27there are no blank rows now I want to
- 16:06:29remove the complete duplicate but when
- 16:06:31you are doing this operation you need to
- 16:06:33be little bit careful because if you
- 16:06:34select a column and try to do that
- 16:06:36operation it is going to be little bit
- 16:06:38different than the operation which you
- 16:06:40want to do using the complete table so
- 16:06:42here because my rows are exactly
- 16:06:45duplicate what I need to do here is
- 16:06:47basically click on this so that no no
- 16:06:50rows is selected and then go to remove
- 16:06:52rows and use remove duplicates look at
- 16:06:54what it is done table do distinct remove
- 16:06:57blank rows this is the step I want when
- 16:07:00I want to remove complete blank rows but
- 16:07:02let me go to another one here if you see
- 16:07:05in this row I have 9 90 duplicate there
- 16:07:07are few null values if you go here
- 16:07:09remove rows and use remove duplicate you
- 16:07:12see what has happened just taken a
- 16:07:14column name the duplicates are not the
- 16:07:16row duplicate it is the particular
- 16:07:18columns duplicate which has been so you
- 16:07:20know the difference between two the
- 16:07:22column would be column duplicate it may
- 16:07:24happen that there are no row duplicates
- 16:07:26but when you delete it on the column the
- 16:07:28duplicates get removed so the column
- 16:07:30duplicates because of that the complete
- 16:07:32row got deleted so be careful about that
- 16:07:34I don't need that right now and the
- 16:07:36beauty with power query is remove the
- 16:07:38step back at the previous position
- 16:07:41so now what's wrong with this table
- 16:07:44actually there's nothing wrong this is
- 16:07:45perfect table but there is something
- 16:07:47which you want to learn it's not the
- 16:07:48best example of the table what we can
- 16:07:50have here I want to learn something
- 16:07:51known as in the transformation fill up
- 16:07:53and fill down in the maths if you see
- 16:07:55after 90 I don't have any marks and what
- 16:07:57I wanted to do is sometime you have what
- 16:07:59happens in Excel you create those five
- 16:08:00kind of a table 90 is repeating so only
- 16:08:03one 190 will come now I want to do the
- 16:08:04fill down so it should fill in the 90 so
- 16:08:07under the transform tab you have this
- 16:08:09fill fill down so 90 will repeat now in
- 16:08:11the case of physics there's only upward
- 16:08:13movement means there are blank rows and
- 16:08:14then we have a number so here I will use
- 16:08:16fill up under the transform tab again
- 16:08:18fill up now in this column I could do
- 16:08:20any of these operation in this I can
- 16:08:22also do any of these operation so fill
- 16:08:23up and fill down it takes the value on
- 16:08:25the top if there is anything which is
- 16:08:27blank it's going to replace those value
- 16:08:28with the last available value and very
- 16:08:30useful transformation very difficult to
- 16:08:32do otherwise but Power query made it
- 16:08:34easy so this kind of transformation is
- 16:08:36something which enables you to improve
- 16:08:38your data quality they available inside
- 16:08:40the power
- 16:08:43query now let's come to this table and
- 16:08:46in this table we wanted to learn the
- 16:08:47feature of replace value now first of
- 16:08:49all this table is not in the proper
- 16:08:51shape so what I'm going to do here is
- 16:08:53now instead of going to those options I
- 16:08:55click CLI on this table icon and there
- 16:08:56are options here and the one of the
- 16:08:58option which is there is use first row
- 16:09:00is header and I'm going to use that now
- 16:09:02I want to learn replace values and the
- 16:09:04objective is twofold how do we replace
- 16:09:06null values how do we replace any other
- 16:09:08value and how do we replace some value
- 16:09:10with the null value so we have this
- 16:09:12replace value option on the right click
- 16:09:14we have replace value but it is going to
- 16:09:15replace in this particular column only
- 16:09:17what I can do is I can select multiple
- 16:09:18columns also with the shift and under
- 16:09:21the transform tab I also have replace
- 16:09:22values or right click replace values so
- 16:09:24you can go go to replace values what I
- 16:09:26want to replace here in both the columns
- 16:09:28what I want to replace there is a value
- 16:09:29called known as GG I want to replace
- 16:09:31this value with a b c it's available in
- 16:09:33both the columns if observe that here
- 16:09:35and here now there are Advanced options
- 16:09:37match the entire cell content replace
- 16:09:39using special characters so I can use
- 16:09:41the first option now but I don't want to
- 16:09:43use let it replace so you will see there
- 16:09:45was Triple G here and because there was
- 16:09:47a triple G here and it replaced the only
- 16:09:492 G's you can go to the back previous
- 16:09:51stab and see this is Triple G where only
- 16:09:52two G's were replaced the first match
- 16:09:54was get
- 16:09:55how do we replace the null values or how
- 16:09:57do we replace something with a null Val
- 16:09:59if you see here this column also have
- 16:10:00null values this column also have null
- 16:10:02value click on both of these column with
- 16:10:03shift replace values and for null you
- 16:10:05have to write down Nu L and then you can
- 16:10:07replace it with the value na but if this
- 16:10:09null is n l null text then I'll tell you
- 16:10:12the one quick fix for that so once you
- 16:10:14do this fix and you can see the null
- 16:10:16values are replaced with na now if this
- 16:10:18null is a string you can do the same
- 16:10:20step and come back here and put this
- 16:10:21null into double quotes you will see the
- 16:10:23formula here and this is the step in
- 16:10:25that step you can go ahead and replace
- 16:10:26if I do here right now this will not
- 16:10:28find any null value not replace it the
- 16:10:30null text value go ahead and change this
- 16:10:32now what I would like to do here is this
- 16:10:34hyphone I want to replace this value I
- 16:10:36clicked on that and I say I want to
- 16:10:38replace this value with what I want to
- 16:10:39replace this with n null replace with
- 16:10:42null click okay so it's again giving
- 16:10:45replace table do replace value in the
- 16:10:47last step see every time it use the last
- 16:10:49step Hyun with null replacer do replace
- 16:10:52values item category column only in that
- 16:10:54particular column we have done it but if
- 16:10:55you look at the previous steps you find
- 16:10:57that it has been executed on multiple
- 16:10:59columns you can give n number of columns
- 16:11:01and then you can execute on that so this
- 16:11:02is replace value for
- 16:11:07you so what is wrong with this data the
- 16:11:09data itself is transposed so the rows
- 16:11:12are on the column The Columns are on the
- 16:11:14rows the date should have been in the
- 16:11:15rows they are in columns the major sales
- 16:11:18and margin should have been the columns
- 16:11:19there in the rows so we need to
- 16:11:21transpose this so click on this table
- 16:11:23icon so that nothing is selected supp
- 16:11:25that go to transform Tab and use the
- 16:11:28option
- 16:11:29transpose the data will get transposed
- 16:11:31but still it is not correct or the final
- 16:11:34shape of the data the first row contains
- 16:11:36the header and to overcome that you will
- 16:11:38go to the Home tab and inside the Home
- 16:11:40tab on the right hand side you have an
- 16:11:42option use first row as header also when
- 16:11:46you click on the down arrow you have the
- 16:11:48reverse option also use headers as first
- 16:11:50row sometime it may happen that you
- 16:11:52bring in the data and you don't have
- 16:11:54headers it may create the first row as
- 16:11:56header we want to revert it so as of now
- 16:11:58I'm going to use the use first row as
- 16:12:00header so the first row which I have the
- 16:12:02row number one should become the header
- 16:12:04and this is add an additional
- 16:12:06transformation for promote data and
- 16:12:08after the promote data powerb do try to
- 16:12:10change the data type to correct your
- 16:12:12data types automatically and as you can
- 16:12:15see in this step it has automatically
- 16:12:17detected the correct data type so this
- 16:12:19is the additional step which has been
- 16:12:20added and because of this step you now
- 16:12:23have the correct data type and you have
- 16:12:24the correct format
- 16:12:28Also let's now learn the operation merge
- 16:12:31which is basically the operation merge
- 16:12:33what it does it it can join the two
- 16:12:35tables you can use any kind of joint
- 16:12:36like inner joint left join right join
- 16:12:39and anti joints also I'll explain you
- 16:12:41what those are and can combine two
- 16:12:43tables so I have couple of tables which
- 16:12:45I want to merge basically and the merge
- 16:12:47is basically the you matches the rows
- 16:12:49and then you merge it's not up and one
- 16:12:50below each other that's not the merge
- 16:12:52here so merge here is basically you join
- 16:12:54them so what you call in the SQL joining
- 16:12:56two tables using the joins here actually
- 16:12:58we going to create a new table or new
- 16:13:00query when we join them in the power
- 16:13:02query you usually call it query when we
- 16:13:04join and execute so I basically have two
- 16:13:06tables here the first table is master
- 16:13:08table it's not true Master it has couple
- 16:13:10of duplicates and I have knowingly kept
- 16:13:12those duplicate that what impact
- 16:13:13duplicates can have pay attention to the
- 16:13:15category IDs which we have 1 2 3 and 5
- 16:13:18the second table which I have is the
- 16:13:19detailed table along with which I want
- 16:13:21to merge this pay attention to the
- 16:13:23category IDs 1 2 3 and four so five is
- 16:13:27there which is not here and four is here
- 16:13:29which is not there and I have kept it
- 16:13:31for a purpose and category ID 1 is
- 16:13:33repeating here or couple of rows
- 16:13:35category ID 2 is repeating but not going
- 16:13:38to play such a major role because it is
- 16:13:40expected in the detail it is repeating
- 16:13:41but the one is repeating in the master
- 16:13:43also so now let's start our journey we
- 16:13:45can click on any of these tables I'll
- 16:13:47start by clicking on Master go to the
- 16:13:49Home tab and use merge queries I will
- 16:13:52use this down arrow because it giv me
- 16:13:54two options merge queries and merge
- 16:13:55queries as new if I use merge query it
- 16:13:58the data would be merged in this current
- 16:13:59table but I would like to use merge
- 16:14:01queries as new this will allow me to
- 16:14:04create new tables and I'll keep on
- 16:14:05explaining you different kind of joints
- 16:14:07merge queries as new master table we got
- 16:14:09it let's click on detail table how do we
- 16:14:12join click on category ID and go and
- 16:14:14click on cat ID if you have multiple
- 16:14:16columns assume you have then Control
- 16:14:18Plus click will give you the options so
- 16:14:21here again Control Plus click you want
- 16:14:22to remove again control and click so I
- 16:14:25only want to do one so I'm doing only on
- 16:14:27one column but you can do it on multiple
- 16:14:29columns the first join I want to do is
- 16:14:30inner join and what does the inner join
- 16:14:32do only matching columns whatever rows
- 16:14:34are matching it is going to do that once
- 16:14:36after selecting this I'll click on after
- 16:14:38selecting this I'll click on okay it is
- 16:14:40showing how much is matching and
- 16:14:42definitely not everything is going to
- 16:14:43match because we have some missing IDs
- 16:14:45on both sides so let me click on okay
- 16:14:47and as you can see it has given me a
- 16:14:48table and right away in the table table
- 16:14:50first is going to be complete and table
- 16:14:52two we need to expand but you can see
- 16:14:53the missing id5 here let me expand and
- 16:14:56see does it make it any difference so
- 16:14:57when I expand it it ask me what all you
- 16:14:59want right now I can choose to get
- 16:15:01everything and also I'll uncheck this
- 16:15:03because this is going to prefix the
- 16:15:04table name otherwise so I'll uncheck
- 16:15:06this use original column name as prefix
- 16:15:09so I got this data now if you see here
- 16:15:12observe this the cat ID one is now four
- 16:15:15rows two from the header and two from
- 16:15:17the detail so it became four cartisian
- 16:15:18product is happening 2x two so that is
- 16:15:21why we our master table should never
- 16:15:22have duplicate we could have done remove
- 16:15:24duplicate before this now this is inner
- 16:15:26join and because of the inner join we
- 16:15:28have lost four and five four in the
- 16:15:30details and five in the header now let's
- 16:15:32go back and let me rename this table
- 16:15:34first of all double click or right click
- 16:15:36rename inner join as you might have
- 16:15:38observed that this has not added a step
- 16:15:40it means this thing cannot be reverted
- 16:15:42now let's go back to the master again
- 16:15:44follow the same flow merge queries merge
- 16:15:46queries as new master table is already
- 16:15:48there select the detail table category
- 16:15:51ID cat ID and this time we are going to
- 16:15:53do left joint what does left joint means
- 16:15:55all from the first and matching from the
- 16:15:57second so whatever is matching and if
- 16:15:59there are multiple rows getting
- 16:16:00generated because of that it will
- 16:16:02generate that but whatever is left out
- 16:16:04which is not joined if it is part of the
- 16:16:06table one it will bring that and all
- 16:16:08those corresponding value from the table
- 16:16:10two would be null for that so that's
- 16:16:12left joint from you all from the first
- 16:16:14and matching from the second it is
- 16:16:15showing how much match you're going to
- 16:16:17get and let me click on okay now again
- 16:16:19we get the first table columns and
- 16:16:21expansion for details I'll expand it and
- 16:16:24let me click on okay it has unchecked
- 16:16:26that because last time I unchecked so it
- 16:16:27will remain unchecked and let me click
- 16:16:29on okay now and as you can see we got
- 16:16:31category ID five from the header for
- 16:16:33which we don't have any corresponding
- 16:16:35data in details but because of the left
- 16:16:37join it is coming in let's rename this
- 16:16:39table as left join right click rename
- 16:16:41left join let's go back again to the
- 16:16:44master table merge queries merge queries
- 16:16:46as new master table let's take the
- 16:16:48detail table category ID cat ID the join
- 16:16:51and right join right join means all from
- 16:16:53second so the missing ID so the
- 16:16:55additional ID four is going to come now
- 16:16:57but we will miss five because five is on
- 16:16:59the left hand side but what we are
- 16:17:00saying all the matching things will come
- 16:17:02from the details plus additionally
- 16:17:04whatever the details contain that will
- 16:17:05also come let me click on okay now this
- 16:17:07time you start seeing a null row already
- 16:17:09it means there's something which is
- 16:17:11coming for which we don't have a value
- 16:17:13in the left hand side of the table table
- 16:17:14on the top is here in the left I expand
- 16:17:17the details using this expand icon I'll
- 16:17:19include all the column just press okay
- 16:17:20and as you can see we have one row where
- 16:17:23we have category ID 4 which was not
- 16:17:25present in our table the master table
- 16:17:27let me rename this right join let's do
- 16:17:29the journey again merge queries merge
- 16:17:31queries as new master table detail table
- 16:17:34category ID cat ID and this time we'll
- 16:17:36use full join from both matching will
- 16:17:38match and whatever is not going to match
- 16:17:40from both the tables is going to come
- 16:17:42and again it showing what is matching
- 16:17:43what is not matching let's click on okay
- 16:17:45you see a blank row you see category
- 16:17:47five also expand once you expand you can
- 16:17:49get all the column in and you will see
- 16:17:51now both the rows one from the left side
- 16:17:53having blank because category ID 4 only
- 16:17:56exist in second table one having Blanks
- 16:17:58on the right hand side no blank on the
- 16:18:00left because Category 5 does not exist
- 16:18:02in the detail table so this is full
- 16:18:04outer joint for you or full joint for
- 16:18:06you let's rename this as full joint
- 16:18:08double click rename let's continue to
- 16:18:10now two interesting kind of joins click
- 16:18:12on master table merge query down arrow
- 16:18:14merge query as new master details
- 16:18:17category ID cat ID and the most
- 16:18:19interesting join which we could use is
- 16:18:21left ENT and right ENT let me use left
- 16:18:23ENT this time row on only from first
- 16:18:25something which exist in the table one
- 16:18:28or the table on the left hand side which
- 16:18:31is not present in the right hand side
- 16:18:33table is typically category id5 which is
- 16:18:35not matching is going to come that two
- 16:18:38for the left table so non-matching rows
- 16:18:40is come if you remember we have
- 16:18:42something known as except or minus set
- 16:18:45operation something which is present in
- 16:18:48the table one or table a and not present
- 16:18:50in table two or table B so you will see
- 16:18:54we are having the category 5 row is
- 16:18:56coming in and we know there's not going
- 16:18:57to be any match data in the details but
- 16:18:59anyway we can expand and check it out
- 16:19:00actually after this join there is no
- 16:19:02benefit of expanding but to understand
- 16:19:03this we have expanded it so this is left
- 16:19:05ENT now let's go back to the master
- 16:19:08again and try the last join we wanted to
- 16:19:10have in the Marge queries Marge queries
- 16:19:12as new and we are going to try write ENT
- 16:19:15with the detail table so master in
- 16:19:17detail category ID cat ID right and join
- 16:19:20only the rows available at the right
- 16:19:22table the bottom table here in this case
- 16:19:25whatever is only available in this table
- 16:19:27which is not matching with the master
- 16:19:29table is going to come here let's click
- 16:19:31on okay it shows one row with a blank
- 16:19:33and when we expand the detail we will
- 16:19:35see category ID 4 coming in here and
- 16:19:38there is no data on the left for that so
- 16:19:41the row which is not having a matching
- 16:19:43data which is on the right hand side is
- 16:19:45coming here and that is right anti joint
- 16:19:48for you let's
- 16:19:49rename you can use these Marge to
- 16:19:52combine the tables in powerbi we prefer
- 16:19:54start star schema and sometime you may
- 16:19:56come across a situation where the tables
- 16:19:58are not in Star schema in such cases you
- 16:20:01can use power query to create star
- 16:20:03schema if required sometime you may want
- 16:20:05to duplicate the tables to do that
- 16:20:07because in the star schema facts are
- 16:20:09self-sufficient so let's say you have a
- 16:20:11header table header act as a dimension
- 16:20:13as well as it need to be merged with the
- 16:20:15detailed table in such cases you can
- 16:20:17duplicate the table and use it so how do
- 16:20:19we duplicate click on any of the table
- 16:20:21let's say I have this detailed table I
- 16:20:23want to duplicate it right click
- 16:20:24duplicate don't use reference it going
- 16:20:26to reference that so you can call it as
- 16:20:28detail 2 it's getting duplicated and
- 16:20:31then you can do your Marge
- 16:20:36operations we had this detailed table
- 16:20:39and we duplicated and created another
- 16:20:41detail table to let me go ahead and add
- 16:20:44one more column here how do we add a
- 16:20:46column we can simply add some formula or
- 16:20:49I can split it or to add a column or I
- 16:20:52can duplicate it so you can right click
- 16:20:54and duplicate a column and let me call
- 16:20:57it as a name Tool and why am I'm doing
- 16:21:00this I want to show you something known
- 16:21:01as operation upend Operation now upend
- 16:21:04operation is typically you want to Union
- 16:21:05the data you want to combine that so the
- 16:21:08operation which is upend here is kind of
- 16:21:09a union all mean it's just going to
- 16:21:11append the rules second is unlike the
- 16:21:13SQL Union or the Dex Union where you
- 16:21:17need the same size of the table or the
- 16:21:18same number of columns in the table it's
- 16:21:21not necessary and that is why when I had
- 16:21:23a detail and detailed I just
- 16:21:25additionally added a column in the click
- 16:21:27on any of the column click on any of the
- 16:21:29table and then go to append again you
- 16:21:31have two options upend queries and upend
- 16:21:34queries as new so what I want to do here
- 16:21:36is basically I want to use the append
- 16:21:37queries as
- 16:21:39new so let me use append queries as new
- 16:21:43now detail is the first table if you
- 16:21:45have three or more you can use this
- 16:21:46particular UI for two tables you can use
- 16:21:48this UI first table and you can select
- 16:21:50the second table and the second table
- 16:21:52which I wanted to select is basically
- 16:21:53the details table details table and
- 16:21:56details two table let's click on
- 16:22:01okay and as you can see that the both
- 16:22:03the tables are appended one after
- 16:22:05another one they just comb just
- 16:22:07combining the tables with all the
- 16:22:09possible column there's no deletion of
- 16:22:11duplicate here and definitely I have now
- 16:22:13created a new additional column so it's
- 16:22:15not going to delete any duplicates as
- 16:22:17you know we have removed duplicate
- 16:22:19option in case we wanted to do a union
- 16:22:21all kind of operation we can do that now
- 16:22:24in this case you can see that the
- 16:22:27additional column do have come which is
- 16:22:30part of only one table and the rows are
- 16:22:33blank for the table for which it was not
- 16:22:35available and the other table where it
- 16:22:36was available it has come now post
- 16:22:39this if you want to delete duplicate now
- 16:22:42the delete duplicate can happen based on
- 16:22:44ID column or based on the complete table
- 16:22:47now here I would like to delete the
- 16:22:48duplicate based on the ID column I can
- 16:22:50click on the ID column I can go to
- 16:22:52remove rows and remove duplicates so I'm
- 16:22:56trying to do kind of a union operation
- 16:22:59in the SQL world where you actually
- 16:23:01don't have duplicates now in this case
- 16:23:03definitely it has taken a decision to
- 16:23:05take some set of columns from the of the
- 16:23:07tables when there are multiple values
- 16:23:10available so in this case this has taken
- 16:23:12the name to where the null values are
- 16:23:14there you can append you can remove
- 16:23:16duplicates and create a union or Union
- 16:23:18all kind of a scenario based on the
- 16:23:22requirement let's learn how to create a
- 16:23:25custom column in power query and for
- 16:23:27that what I'm going to do is I'm going
- 16:23:29to add the same file here the sales file
- 16:23:32which we have used and the reason for
- 16:23:34that is basically because I want to show
- 16:23:37you the same formula which we created
- 16:23:38there so let me go to the github.com and
- 16:23:41in GitHub this is the file which we are
- 16:23:43using say data used in video right click
- 16:23:45on the raw copy link come back to the
- 16:23:48powerb and now I'll tell you directly
- 16:23:50from the power query under the Home tab
- 16:23:52if you click on the new source you will
- 16:23:54be able to add new sources from here go
- 16:23:57to new sources click on web which is
- 16:24:00available directly into the menu give
- 16:24:03the URL click on
- 16:24:05okay and I load only the sales
- 16:24:08here and now you don't see the button of
- 16:24:11load data and transform data this is
- 16:24:12only okay button because when we opened
- 16:24:15it from Power query it's going to put us
- 16:24:18back onto the transform data mode only
- 16:24:21because it has put us into the transform
- 16:24:23data mode it is not asking for the
- 16:24:25option whether you want to load the data
- 16:24:27or transform the data so we have to
- 16:24:29transform the data sometime we may get
- 16:24:31this kind of error you can simply
- 16:24:32refresh now if you remember we created
- 16:24:33few columns there so same column we
- 16:24:35wanted to create here we will take one
- 16:24:37or two example of such columns and also
- 16:24:39create some different kind of new custom
- 16:24:41column so once you are on the table you
- 16:24:43can go to add columns and inside the add
- 16:24:45column you have column from example
- 16:24:47custom column invoke function
- 16:24:49conditional column index column now the
- 16:24:51first of let's learn index column what
- 16:24:53is the index column sometimes what
- 16:24:54happens you are bringing in a table and
- 16:24:55you don't have row numbers and row
- 16:24:57number is required sometime because I
- 16:25:00want to create it as a dimension means I
- 16:25:02I went ahead and I remove the duplicate
- 16:25:04and I created a dimension I need a
- 16:25:06unique number then how do I do that I
- 16:25:08can add index column sometime you
- 16:25:09require row number just because in a
- 16:25:11visual you want to display and power
- 16:25:13always summarized so you need one unsm
- 16:25:15column so in that case you can add index
- 16:25:17column so you can add index column from
- 16:25:19zero or from one or you can even modify
- 16:25:21it so I added an index column it is a
- 16:25:23unique rule number column for me I can
- 16:25:26decide from where it should start how
- 16:25:27much increment it should have so if I
- 16:25:29want let's say two to increment I can
- 16:25:31make it two what would happen here is it
- 16:25:34will become odd numbers I want to start
- 16:25:36it from let's say three I can make it
- 16:25:38three and it will start from
- 16:25:41three these changes I can do let me make
- 16:25:44it one and one now this is one type of
- 16:25:46custom column let's go ahead and add
- 16:25:48another kind of custom column which is
- 16:25:49basically custom column B what I want to
- 16:25:52gross what is my definition of gross is
- 16:25:54quantity multiply by price now here uh
- 16:25:58we have no option to select the data
- 16:25:59type but in the power query online
- 16:26:01version the data flows we are getting
- 16:26:03that option to select the data types
- 16:26:05here we don't have so let's click on
- 16:26:06okay and you will see it doesn't take a
- 16:26:09data type here so what I can do is
- 16:26:10whatever data type I want I can give
- 16:26:12that as a last argument so be on that
- 16:26:15step put a comma and use type let's say
- 16:26:18I want in 64 or decimal so here I can
- 16:26:20give type number on numeric and let's
- 16:26:24try this out and it has become the
- 16:26:25number data type so in this manner if
- 16:26:27you remember the type you can give the
- 16:26:28type otherwise you have to use the
- 16:26:31option here you click on this number
- 16:26:33column or ABC what was written and you
- 16:26:35choose the data type and it will add a
- 16:26:36step for that to avoid the step I simply
- 16:26:39written type number because I remember
- 16:26:41that it can be added like a number same
- 16:26:42way you can add another custom column
- 16:26:44for cogs and that is nothing but
- 16:26:46quantity multiply by cost now you can if
- 16:26:49you use this here you click on this
- 16:26:51number column or ABC what was written
- 16:26:53and you choose the data type see it add
- 16:26:54additional step but that is why just to
- 16:26:57avoid this additional step I had this
- 16:27:00script I can remove
- 16:27:03this and go ahead and put a comma and
- 16:27:05put the third argument which is not
- 16:27:06available
- 16:27:08here now the new column which you
- 16:27:10created you can again use them in
- 16:27:12creation of columns like discount amount
- 16:27:14you can go here and create discount
- 16:27:16amount you can use the column which is
- 16:27:18previously created which is nothing but
- 16:27:20gross multiplied by discount percentage
- 16:27:22divide by 100 if you remember
- 16:27:25the discount percentage is absolute and
- 16:27:27that is why we need to divide it by 100
- 16:27:30again I can change the data type now if
- 16:27:33you want to create a conditional column
- 16:27:34you have option here to create a
- 16:27:36conditional column so you can click on
- 16:27:38that and you can write down a
- 16:27:40conditional script so if let's say sales
- 16:27:43date equals or less than equal to or is
- 16:27:47after we say before what date we say
- 16:27:51okay it is before 2019
- 16:27:56let's go by
- 16:27:58years now go by month Double Arrow take
- 16:28:01years is before 1 January 2019 then one
- 16:28:06else zero so Data before 2019 and after
- 16:28:092019 so you can create a conditional
- 16:28:11column so it will give you values and
- 16:28:14what all values we have if you they are
- 16:28:16not loading we can click on load so we
- 16:28:17have both one and zero values depending
- 16:28:20on the dates we will have value it will
- 16:28:22always load a sample side of hous and
- 16:28:25rows and based on that it will do the
- 16:28:26column profiling here at the end if you
- 16:28:29see but if you want all the rows you can
- 16:28:32actually click here and you can use on
- 16:28:34entire data set it is especially useful
- 16:28:36when you go to the view and you do this
- 16:28:38column distribution column profiling
- 16:28:40then you can use that now again I can
- 16:28:42change the data type but right now I'm
- 16:28:44leaving that now I can add this column
- 16:28:46manually also actually I can go to the
- 16:28:48custom column and I can write down the
- 16:28:50condition of my choice so let's say test
- 16:28:52if quantity equals to one then unit one
- 16:28:58else many so I'm saying if quantity is
- 16:29:01equal to one then one else many this
- 16:29:03kind of condition I can give and I can
- 16:29:04have multiple if else to create complex
- 16:29:08conditions so one and many one and many
- 16:29:11usually I have quantity one two and
- 16:29:12three so I'll get one and many for many
- 16:29:14for two and three I'll get in this
- 16:29:16manner you can create quite a few custom
- 16:29:18columns now some cases you have this
- 16:29:20additional column which you can create
- 16:29:23you can add a column um so you want to
- 16:29:25measure a length let's say you want to
- 16:29:26measure the length of this column but I
- 16:29:28don't want to use a transformation I
- 16:29:30don't want to change this column I want
- 16:29:31a new column you can go to extract and
- 16:29:33say length so it will actually give you
- 16:29:36the length of this column same way other
- 16:29:38operation on length like first character
- 16:29:40last character range text before delimer
- 16:29:42text after delimer text between delim so
- 16:29:45what happens in all such cases it will
- 16:29:47actually go ahead and add a new column
- 16:29:49so instead of transforming the current
- 16:29:51column sometimes you don't want to
- 16:29:52transform the current column you
- 16:29:53actually want the information in the
- 16:29:55next column so this is really helpful
- 16:29:57here same way for parsing if you have a
- 16:29:59XML or Json column you can par and other
- 16:30:02one you can like format like I want this
- 16:30:04upper case or lower case but I don't
- 16:30:05want to transform this column I want a
- 16:30:07new column so I can go ahead and use
- 16:30:09this so this will add a new column just
- 16:30:11for an example let me use this lower
- 16:30:13case and this time instead of making
- 16:30:16this test as lower case it actually
- 16:30:18created a new column lower case in this
- 16:30:20manner you can add custom columns in
- 16:30:22power query so most of the column where
- 16:30:25you require multiplication kind of a
- 16:30:27stuff you can add them in power query
- 16:30:30conditional column you can add them in
- 16:30:31power query other transformation which
- 16:30:33are needed at row level you can pretty
- 16:30:35much do all such columns in power query
- 16:30:37there are formulas which can only be
- 16:30:38done on the aggregated data for that we
- 16:30:42cannot use this one they are better
- 16:30:44suited on measure so there is a option
- 16:30:47of colum by example you can create a new
- 16:30:49column by example how that I'm going to
- 16:30:51give you one example now there could be
- 16:30:53more us is have little complex data also
- 16:30:55you can use it what I'm going to do is
- 16:30:57I'm going to go to this text operation
- 16:30:58table and in this text operation table
- 16:31:01I'll go to a column is my column key to
- 16:31:04I'll right click on that and then there
- 16:31:06is option add column from exam now I'll
- 16:31:09click on this option add column from
- 16:31:11examples and here it is asking example
- 16:31:14let's say I put one one what does it it
- 16:31:16identify it that I am asking for text
- 16:31:19before delimiters and based on that it
- 16:31:21is creating everything like text before
- 16:31:24delimiter let me go ahead and replace
- 16:31:25this with 333 now what is happening it
- 16:31:28now identified that I need text after
- 16:31:30delimiter after which delimer it is
- 16:31:32identifying that I need it after the
- 16:31:34third delimer and that is why you are
- 16:31:36see in the second row it is using
- 16:31:3933355 now the same manner you go and
- 16:31:41type 222 what it will realize is that I
- 16:31:44need Tex between Eliminator hyon and hyp
- 16:31:47creating the next also it is creating to
- 16:31:49and one to one Etc in this manner it is
- 16:31:52identifying that I need X between
- 16:31:54delimiter and it is creating data like
- 16:31:56that now let me click on it would be
- 16:31:58added as a new column and then you can
- 16:32:00look at the formula this formula which
- 16:32:02has been Tex between has been used hyph
- 16:32:05and H So based on the example I try to
- 16:32:08do that operation and based on that
- 16:32:09operation you will now get taex before
- 16:32:12delimiter or Tex after delimiter or
- 16:32:14there could be any other operations
- 16:32:16which has been identified we done here
- 16:32:18these are the various way in which you
- 16:32:20can create a new column in power query
- 16:32:23and once once you are done with those
- 16:32:24columns from the home you can go and
- 16:32:27click on close and apply or simply apply
- 16:32:29and those columns would be added at part
- 16:32:32of your query which will be known as a
- 16:32:34table when we visualization part the
- 16:32:37next operation which we wanted to learn
- 16:32:39is under the transform and that
- 16:32:41operation is basically Group by now the
- 16:32:43group by operation is something which
- 16:32:45can create a group col basically you
- 16:32:46have a complete table and group a data
- 16:32:48at a particular level use this group by
- 16:32:50so basically summarized table or
- 16:32:52aggregated tables if you you can take
- 16:32:54help from group by now you have
- 16:32:56summarize in tax which can do the
- 16:32:58similar job there are other functions
- 16:33:00also like summarize callums the job grp
- 16:33:02by can also do the job so now here in
- 16:33:04power query we are going to use group so
- 16:33:06what I'm going to do is I'm going I'm
- 16:33:08going to click on the sales table and
- 16:33:09after that I'm going to click on group
- 16:33:10buy once I click on the group buy it
- 16:33:13gives me two option basic and advanc in
- 16:33:15basic it is asking for one group buy and
- 16:33:17it is only asking one column now what I
- 16:33:19can do here is basically I can go to the
- 16:33:21Advance the advance I can add grouping
- 16:33:23of my own choice so I can say Okay I
- 16:33:25want to group this data let's say a city
- 16:33:27and then here in the count columns I can
- 16:33:29give a name of the column where the
- 16:33:31count has been written here then I can
- 16:33:33choose the operation sum average median
- 16:33:35min max count rows count District all
- 16:33:38rows Etc we start with a simple example
- 16:33:41we'll say we want to sum here and what I
- 16:33:43would like to sum I want to sum actually
- 16:33:45quantity here now here I'll say sum uty
- 16:33:49so this is the first kind of aggregation
- 16:33:50I want to create now I would like to add
- 16:33:53another then I can go ahead and do it
- 16:33:54let's say I want average price now
- 16:33:56average price is not the best thing to
- 16:33:58have it here but let's go ahead and do
- 16:34:00that so we say average and then we'll
- 16:34:03use so you got a aggregated table now or
- 16:34:07grouped by table now which is now giving
- 16:34:09you g ID sum of quantity and average
- 16:34:11price now you can see the code here
- 16:34:14table. Group by at what it is
- 16:34:16doing so C ID it is grouped on that and
- 16:34:20based on that we have list. sum which is
- 16:34:22used on the some of quantity has been
- 16:34:25done and a of price I can click on the
- 16:34:27setting icon back again here and I
- 16:34:30reached back to the setting again and
- 16:34:32what I can do here is I can say add
- 16:34:33grouping and in this add grouping I can
- 16:34:35let's say I add item ID I want two group
- 16:34:38by is not one group I want aggregated
- 16:34:40table which is based on city ID and Item
- 16:34:42ID and how I'm getting my data based on
- 16:34:44the city ID and Item ID in this manner I
- 16:34:47can get it now there is one more option
- 16:34:48which is there and that would be helpful
- 16:34:50when you are going to do something like
- 16:34:52you know sub index or sub rank that kind
- 16:34:54of operation that would be helpful and
- 16:34:56for that what you have to do let's go
- 16:34:58back to the setting again now here in
- 16:34:59the ad grouping let me remove this and
- 16:35:02here I instead of some operation I'll
- 16:35:05say all rules I can give it any name
- 16:35:07whichever I want Let Me Call It All Pro
- 16:35:11only when you go here so City ID and
- 16:35:14item id the data is grouped and what
- 16:35:17happens is is going to have a table here
- 16:35:19so now there is a table which is at the
- 16:35:21city ID and item id level and if you add
- 16:35:23a column here let's say add index here
- 16:35:26in this table and now we have to write
- 16:35:27down the formula to do that not going to
- 16:35:29be that I simply go ahead and write it
- 16:35:31here add index for that we have to use
- 16:35:33the M language and using the M language
- 16:35:35we have to create a custom column and
- 16:35:36there we in this table itself the table
- 16:35:38which is inside we have to add a index
- 16:35:40column and then you have to expand it
- 16:35:42back again you can expand this table to
- 16:35:44get all the data so you will expand and
- 16:35:45then you'll get the complete sales table
- 16:35:47again and then you will get the sub
- 16:35:49index these kind of operations I have
- 16:35:50explained on the channel so you can
- 16:35:52check that out so in this manner you can
- 16:35:54group all the rows and then you can do
- 16:35:55operation inside the group to data so
- 16:35:57this is Group by for you we I have shown
- 16:35:59you a few options but there are further
- 16:36:01more options which you can explore out
- 16:36:03to create aggregated or what we call
- 16:36:05summarized
- 16:36:07tables we will come across a scenario in
- 16:36:11power query where we would actually like
- 16:36:13to split a column we have quite a few
- 16:36:15option to split a column so we can split
- 16:36:17by D limiter we can split by number of
- 16:36:19character we can split by position lower
- 16:36:22case upper case digit non-digit
- 16:36:24non-digit and digit now I come up with
- 16:36:26this one data where I'm going to show
- 16:36:29you split by Del limiter but this data
- 16:36:31is really interesting because it's
- 16:36:32nquire double split and you will not
- 16:36:34realize unless I do it so for first of
- 16:36:36all even before I use do use first row
- 16:36:39as header I need to split this data okay
- 16:36:41because name and ranks are two different
- 16:36:43column but I need to split this data and
- 16:36:45how do I need to split it I need to use
- 16:36:48under the Home tab split column and buy
- 16:36:50delimiter and space is my dmit it is
- 16:36:53automatically identified for each
- 16:36:55occurrence in this case it is the left
- 16:36:57most occurrence or that's the only
- 16:36:59occurrence but you can decide if you
- 16:37:00have more than one occurrence leftmost
- 16:37:02or rightmost or each occurrence and then
- 16:37:04you can go to the advance and decide
- 16:37:06whether you want columns or rows in this
- 16:37:08case I want two columns and that's
- 16:37:09correct it has automatically identified
- 16:37:11that but in case you want to check you
- 16:37:13go ahead and check that out in case of
- 16:37:15rows there's no limitation it can split
- 16:37:17and give any number of rows but
- 16:37:19definitely columns we have to specify
- 16:37:21let's press okay now we got the two
- 16:37:23columns so now at this stage I can use
- 16:37:25first row as header so the moment I do
- 16:37:27first row as header you might have
- 16:37:29realized that this change type has
- 16:37:30changed the game for us it actually has
- 16:37:32detected it as integer and removal of
- 16:37:34comma that's what we don't want so what
- 16:37:36we have to do is we have to go to this
- 16:37:37step transform columns either we remove
- 16:37:40it or go and copy this type text and in
- 16:37:43the rank also you use type text so that
- 16:37:45it remains as a text now it is a text
- 16:37:47now we can continue to use it now the
- 16:37:49rank column is something which we
- 16:37:51further wanted to split we again go to
- 16:37:53split column split by D limiter and this
- 16:37:56time for each occurrences of the D
- 16:37:58limiter it has correctly detected that
- 16:38:01in the advance option I'm going to use
- 16:38:03rows no more columns I want multiple
- 16:38:05rows for that I don't want columns this
- 16:38:07time and in the rows it is not going to
- 16:38:09ask you how many rows create that many
- 16:38:11rows which is required columns the
- 16:38:13number is limited and let's press on
- 16:38:15okay and now the data is in the shape
- 16:38:18where we can use it for analysis we've
- 16:38:21taken a case where we actually applied
- 16:38:24the same function twice in two different
- 16:38:26Manner and get the data into the shape
- 16:38:28now there are other ways to split also
- 16:38:31and for that what I've done is I have
- 16:38:33this table text operation which you can
- 16:38:35use I can show you some of those
- 16:38:38operations so let's say you click on
- 16:38:40this key one and you can say split by
- 16:38:43number of characters I can split I can
- 16:38:45get the ear first four are ear so by
- 16:38:47number of characters I can say once far
- 16:38:50as left I only want the first four
- 16:38:52characters and rest I want into the
- 16:38:54second column I don't want the
- 16:38:56repetition number of columns here is
- 16:38:58going to be two because I only want once
- 16:39:00if it repeatedly you need to tell how
- 16:39:02many columns I only wanted once I'll go
- 16:39:04ahead and press I'll select once as far
- 16:39:08left as possible the left hand side and
- 16:39:10multiple columns and there going to be
- 16:39:12two columns this time so we are able to
- 16:39:14split and take out the ear from this one
- 16:39:17so this is split by number of character
- 16:39:19now then there is a split by position so
- 16:39:21split by position position from 0 to 6
- 16:39:25so power query start with indexing start
- 16:39:27with zero and then there are Advanced
- 16:39:28option columns or rows you say okay fine
- 16:39:300 to 6 let's split that so now you got
- 16:39:33another split based on that and now this
- 16:39:35change data type on the First Column we
- 16:39:37don't need actually we need type text
- 16:39:39only and because of that only it's not
- 16:39:41showing what value we actually got this
- 16:39:43is the value we actually got then you
- 16:39:45have the upper case lower case and all
- 16:39:48those combination I will just show you
- 16:39:50one of them so this is uppercase and
- 16:39:52lower case so you can go and split by
- 16:39:54column by lower case to uppercase or
- 16:39:56uppercase to lower case so let's execute
- 16:39:58one of them lower case to upper case so
- 16:40:00when the things change from lower case
- 16:40:02to upper case at that time we will split
- 16:40:04so this was lower case and post that
- 16:40:05there was an upper case so it got split
- 16:40:07there is upper case and after that
- 16:40:09there's a lower case there's nothing got
- 16:40:10split this is these were three were
- 16:40:12lower case and after that we got upper
- 16:40:14case so it got splitted similarly digit
- 16:40:16and no digit split you can go ahead and
- 16:40:19use by non-digit and digit or by digit
- 16:40:21and non-digit so let me use one of them
- 16:40:23let's use the second option non-digit to
- 16:40:25digit so you will only see split where
- 16:40:27first there was a non-digit and then
- 16:40:29digit in this manner there are multiple
- 16:40:31things which we can do there are next
- 16:40:33set of operations basically here we have
- 16:40:35lower case upper case capitalize the
- 16:40:38word trim clean add prefix add suffix
- 16:40:41now let me go to this table and I'll go
- 16:40:44to column two and let me try to now to
- 16:40:47understand this format options now very
- 16:40:50easy to understand this lowercase and
- 16:40:52uppercase you click on any any of the
- 16:40:53column you go here and say lower case I
- 16:40:55go to this column everything is already
- 16:40:57in uppercase so I can go here and say
- 16:41:00format capitalize each word so first
- 16:41:02letter would be Capital now this is all
- 16:41:05in lower if you see here the the column
- 16:41:07name the first row is in the lower case
- 16:41:09I can go and click on the format and
- 16:41:11uppercase it will do an uppercase now
- 16:41:13let me use first row as header and then
- 16:41:15do other operations now I can go here
- 16:41:18again and under the transform format I
- 16:41:20can use add prefix it will add a prefix
- 16:41:22to the column let me add Hy and in case
- 16:41:25I want to add a suffix I can go to the
- 16:41:27format and I can add a suffix also let
- 16:41:29me add at theate here and it's not doing
- 16:41:32that operation on the null value please
- 16:41:33remember that now what is this clean and
- 16:41:35trim trim you might have understand what
- 16:41:37what is this clean to understand the
- 16:41:38clean let me go to the Home tab and
- 16:41:41create one enter data script and here
- 16:41:43let me and a shift enter enter enter a
- 16:41:46SP b space c d d d enter enter enter B A
- 16:41:50FG now next one I'll go here and space
- 16:41:53space space a space space space next one
- 16:41:56I'll space space space b c v VC and then
- 16:42:00here no space b and space space space
- 16:42:03space and let me say let me rename this
- 16:42:05now and edit I got some data you can see
- 16:42:08the values here lying here and there now
- 16:42:11there is cleaning required so first
- 16:42:13operation which I want to do here is
- 16:42:14basically I'll go to transform format
- 16:42:17and I'll do clean operation the clean
- 16:42:19operation removes the non-printable
- 16:42:22character especially the the enter you
- 16:42:23can see now the data has come into the
- 16:42:25one row but it has not removed the white
- 16:42:27spaces before and after it they are
- 16:42:29still white spaces like here if you go B
- 16:42:31and do have white spaces okay vbb do
- 16:42:34have white spaces in the beginning now
- 16:42:36I'll go on this column and I'll use the
- 16:42:38format trim operation and once I do the
- 16:42:41trim it removes the white spaces from
- 16:42:43left and right and I'll get the trimmed
- 16:42:45version of this one now you see there's
- 16:42:47no nothing before and after it's only B
- 16:42:50and only vbb so these are the operation
- 16:42:52which allow ows you to improve the data
- 16:42:54quality so the transformation the data
- 16:42:57quality improvement all these can be
- 16:42:59done after that you have some operations
- 16:43:01to take out the date part and all those
- 16:43:03if you go to this date time table and
- 16:43:05you want to take out the time only it
- 16:43:08will give you time only you want to take
- 16:43:10out the date only you will get the date
- 16:43:12only you want to take out part of the
- 16:43:13day year month quarter you will get
- 16:43:15those also you can extract the date
- 16:43:17Parts again these kind of transformation
- 16:43:19you can do here so these are the various
- 16:43:21kind of transformation you can do in
- 16:43:23power query once you are done with all
- 16:43:25your transformation or maybe don't
- 16:43:27always wait for all the transformation
- 16:43:29to happen you should keep on doing this
- 16:43:31in between you should keep on applying
- 16:43:33the changes so that it doesn't take too
- 16:43:34much of time at the end to do it but
- 16:43:37right now the time has come that I'll
- 16:43:38you use close and apply and once I do
- 16:43:41close and apply what it's going to do is
- 16:43:43all the tables is going to process again
- 16:43:45the complete data will be loaded and
- 16:43:48processed again and that is something
- 16:43:50which power query does it basically
- 16:43:53actually go to load the data model and
- 16:43:55go to process by each step by step and
- 16:43:57go to do it and it has processed
- 16:44:01everything now the tables are now
- 16:44:02available for analysis and if you go to
- 16:44:05the table view you will see the data
- 16:44:07into the final shape so if you go to the
- 16:44:09pyot table or unpivot table you will not
- 16:44:12see the data in the initial shape what
- 16:44:14you had you see the data into the final
- 16:44:17shape so power query helps us in
- 16:44:20creating transformed cleaned data data
- 16:44:23which can be used for data analysis so
- 16:44:26the next set of transformation which we
- 16:44:29actually wanted to learn is basically
- 16:44:31how to do multiple unpivot or double
- 16:44:33unpivot here what happens is you don't
- 16:44:36have a single column which is repeating
- 16:44:38actually there are more than one column
- 16:44:39which are repeating so let's say there
- 16:44:41is a set A1 A2 then there is a set B1 B2
- 16:44:44then there is a set C1 C2 but that is
- 16:44:46the set which is repeating it is not
- 16:44:48that I have A1 A2 A3 A4 A5 A6 and I just
- 16:44:51want I that such scenario how we are
- 16:44:54going to unpivot that is what we have to
- 16:44:56learn so let's look into this example
- 16:44:59and see how can we do double and pyot or
- 16:45:02multiple and pyot so let me showcase you
- 16:45:05my data which I'm plan to use for today
- 16:45:08uh so I have added this to the P data
- 16:45:10file and I will been loading this file
- 16:45:12to the GitHub so here as you can see I
- 16:45:15have item on My First Column and then I
- 16:45:20have state and value combination
- 16:45:23in the column so I have state one value
- 16:45:26one state two value two state three
- 16:45:28value three state four value four state
- 16:45:305 value five this is the combination
- 16:45:32which I have now this is not a simple
- 16:45:36unpivot user case where I have the stage
- 16:45:39and I simply unpivot it and then I can
- 16:45:41use the data so this require a special
- 16:45:45treatment or maybe I first unpivot the
- 16:45:48data and then P it so let's go ahead and
- 16:45:51see how we convert this data into the
- 16:45:54best suitable data for data analytics or
- 16:45:58for powerbi so I have already open
- 16:46:01powerbi and let me jump out of the that
- 16:46:04and I'll say get data and inside the get
- 16:46:06data I'll bring my Exel sheet and that
- 16:46:10Excel sheet is nothing other than pyot
- 16:46:12data and you will be getting this on my
- 16:46:16GitHub account
- 16:46:24and here you see that I got this unpivot
- 16:46:28pyot data so just take this sheet
- 16:46:30unpivot pyot data sheet and that instead
- 16:46:34of loading use transform data why would
- 16:46:36use transform data because this data is
- 16:46:38not in a shape where we wanted to use so
- 16:46:41why to load and then go to the transform
- 16:46:43data and do the transformation why don't
- 16:46:44we directly go to the transform data so
- 16:46:47so I'll click on the transform data at
- 16:46:49the bottom of the popup and it will
- 16:46:51directly take me me to Power
- 16:46:54query let me bring in power query window
- 16:46:57on this screen so the power query window
- 16:47:00has opened and now we have this data in
- 16:47:02front of us so what action we wanted to
- 16:47:05do so first of all I'll select item and
- 16:47:08I'll go to transform and inside the
- 16:47:11transform I'll use unpivot columns and
- 16:47:14I'll see unpivot other columns once I do
- 16:47:17you can see I have state value in rows
- 16:47:20but I don't want like this the best way
- 16:47:22is state
- 16:47:23as a column and value as a column now to
- 16:47:25do that I need to do a next step in the
- 16:47:28next step I would use one more
- 16:47:30transformation and the transformation
- 16:47:32which I plan to use is split column and
- 16:47:36in the split
- 16:47:38column split column is again available
- 16:47:40under the transform tab I want to use
- 16:47:43split by dor in this case you may have
- 16:47:46little bit complex case so you have to
- 16:47:48find out how you would plan to split
- 16:47:49that and here I'll click on the advance
- 16:47:51option and I'll say I want to split into
- 16:47:53two columns that's the most appropriate
- 16:47:56for this
- 16:47:57data for each occurrence yes or sometime
- 16:48:01may you may have to use leftmost
- 16:48:03delimiter so first delimiter which it
- 16:48:06gets on that and you have to say okay
- 16:48:09now what you see here is state number
- 16:48:12has been separated out now you can give
- 16:48:15it as a separate name there but that we
- 16:48:17will do later but you can click on now
- 16:48:19attribute and
- 16:48:21value and you you can go to P what
- 16:48:25column again under the transform
- 16:48:27data and which column is the value
- 16:48:30column yes value column is the value
- 16:48:33column Advance option what I wanted to
- 16:48:36do is I'll say don't agregate but I
- 16:48:40would prefer to do max if required so
- 16:48:44you can take a count
- 16:48:48here and once you load this data instead
- 16:48:51of list count you click on
- 16:48:54the the bar where we are seeing this
- 16:48:59formula you send this. Max and now you
- 16:49:03can see State and value we could we
- 16:49:05could have used to aggregate but in case
- 16:49:07don't aggregate doesn't work you can use
- 16:49:08max like this so I got State I got value
- 16:49:11and this could be state number or type
- 16:49:14let me call it type now this data is in
- 16:49:17a proper shape for analysis now so this
- 16:49:20is how you deal with the data where you
- 16:49:23think it require multiple
- 16:49:27unpivot now what we would like to do
- 16:49:29here is we like to understand how can we
- 16:49:31do cross join in power query now you
- 16:49:33have seen an example where we have
- 16:49:35actually done cross join in Dex now how
- 16:49:39do we do cross join in our query because
- 16:49:41there's no function cross join if you
- 16:49:44remember we had merge which can do
- 16:49:45different kind of join like Left Right
- 16:49:48full and full is not cross join and then
- 16:49:51we have and joins also but how do we do
- 16:49:54cross joint cross join means every row
- 16:49:57of a table will get populated against
- 16:49:59every row of another table one has three
- 16:50:01rows and table two has three rows end up
- 16:50:03getting nine rows so this is what the
- 16:50:06cross join is and we would like to
- 16:50:08understand how can we do that in our
- 16:50:09query so let me take you through powerbi
- 16:50:12and let me explain you the function the
- 16:50:15cross joint function which is there in
- 16:50:17the DXs and then the question is how do
- 16:50:20we do that in power query so let me do
- 16:50:24one thing is basically in
- 16:50:26powerbi desktop I'm going to use enter
- 16:50:30data which is under the Home
- 16:50:33tab and I'm going to create two
- 16:50:38tables and in the table one let me have
- 16:50:40that say number I'm going to have some
- 16:50:42numbers let's say 1
- 16:50:472 3 and four and let me call it D1 the
- 16:50:51table D1 I'm renaming it and I'm going
- 16:50:54to say
- 16:50:56load very a simple table once this table
- 16:50:59get loaded we will load another
- 16:51:05table so now let me add another table
- 16:51:08now the table which I'm going to add is
- 16:51:10basically having the let's say text so
- 16:51:14let me call it
- 16:51:17value and let me add value let's say
- 16:51:20a b
- 16:51:23and see only three values and let me
- 16:51:27call this table as D2 and let me a load
- 16:51:30very simple stuff two tables having one
- 16:51:32one
- 16:51:33column now I go to the table View and
- 16:51:36I'll show you these tables so D1 as 1 2
- 16:51:383 4 D2 as a BC now how do we do a cross
- 16:51:42joint so in the Dax in we go to the
- 16:51:44table tools when we click on any of the
- 16:51:46table we'll get the table tool and in
- 16:51:48the table tool you have new table click
- 16:51:50on the new table
- 16:51:53and say cross the name left hand side is
- 16:51:56the name and then we have function cross
- 16:51:58join we can give tables so I give D1
- 16:52:02comma D2 two tables and I just press
- 16:52:06enter now what you see is uh 1 2 3 4 A A
- 16:52:10A A 1 3 4 bb bb 1 3 4 c c c c now I want
- 16:52:15same thing in power query how do I do
- 16:52:17that so I go to my report view or I
- 16:52:20could have done from there also and I go
- 16:52:22to transform data which is in the middle
- 16:52:25of the Home
- 16:52:29tab and there I have another option
- 16:52:31transform data which will take me to
- 16:52:32Power
- 16:52:33query let me bring in the power query
- 16:52:35window
- 16:52:40here now how do I do it in power query
- 16:52:43so if you remember we have something
- 16:52:44known as merge queries under the Home
- 16:52:46tab of power query on the right but here
- 16:52:49when you go to the merge queries
- 16:52:53you don't have any option for cutan and
- 16:52:56even if you do full outer join it's not
- 16:52:59going to serve a purpose especially
- 16:53:02there is no joint column here so how do
- 16:53:04I do that but to do that what I can do
- 16:53:07is I can take any one of these
- 16:53:09table and go ahead and create a new
- 16:53:11column add column I call it custom
- 16:53:14column and let me call it tab two and
- 16:53:18let me simply give here D2
- 16:53:22D2 is a
- 16:53:26table so it starts showing me the
- 16:53:29table my once I get a table in a column
- 16:53:32it start giving me an expand
- 16:53:35icon I'll expand
- 16:53:38this and it ask what all column I say I
- 16:53:41will say value column I need and I'll
- 16:53:43uncheck this use original column name as
- 16:53:46prefix
- 16:53:52then we press okay now as you can see
- 16:53:55the moment I expand it gives me AB C ABC
- 16:53:59ABC ABC because I done it with D1 that's
- 16:54:02how it's going to happen so for Value
- 16:54:04one A B C or then if you see for a it is
- 16:54:071
- 16:54:082 3 and four anyways I I could have done
- 16:54:12the same thing in D2 it would have given
- 16:54:14me uh a 1 2 3 4 b 1 2 3 4 c 1 2 3 4 so
- 16:54:19this is how you do a cartisian product
- 16:54:21across join in power query so when I was
- 16:54:24trying to save this it given me some
- 16:54:26error so what I've done is basically I
- 16:54:28change it to Value one the reason it is
- 16:54:31giving error because D1 and D2 we are
- 16:54:32again using in the cross joint they the
- 16:54:34value column and so because of that it
- 16:54:38was giving errors in power query it is
- 16:54:40possible to do much more complex
- 16:54:42operation than what we have done so far
- 16:54:45right now what we are doing is we are
- 16:54:47combining certain set of operation and
- 16:54:49try to achieve the complex operation but
- 16:54:51once we are able ble to understand all
- 16:54:53the complex M function we can do much
- 16:54:55more powerful operations than what we
- 16:54:58have done so far so let's understand
- 16:55:00basics of M for now m is a case
- 16:55:03sensitive language what do you mean by
- 16:55:05case sensitive language in case
- 16:55:06sensitivity what happens let's say you
- 16:55:08write down sales and in one of the sales
- 16:55:10you write down S capital that is
- 16:55:12different from the sales where s is
- 16:55:15small as m is case sensitive so your
- 16:55:18column names with the title case or
- 16:55:20small case or upper case are different
- 16:55:22from each other same is true for the
- 16:55:23tables so when you are using them into
- 16:55:26your formulas or into your calculation
- 16:55:29you need to take care of them what is
- 16:55:30the process of working on M language
- 16:55:33what is the syntax every language has a
- 16:55:35syntax let's say you are working with C
- 16:55:37or Java in case of C you create a main
- 16:55:40function where you write down the code
- 16:55:42in case of java you start with a class
- 16:55:45and then you have the main function so
- 16:55:47every language has a particular kind of
- 16:55:49syntax so what is the syntax we have for
- 16:55:51m to create an M query in the query
- 16:55:54editor you have to follow these basic
- 16:55:56process first is create a series of
- 16:55:59query formula steps that start with let
- 16:56:01statement so let is the first statement
- 16:56:03each step is defined by a variable name
- 16:56:05so every step you will have a variable
- 16:56:07name and L variable can be included by
- 16:56:10space using hash character as HH double
- 16:56:13codes step name so basically what
- 16:56:15happens if you don't have the space in
- 16:56:17your variable names it could be simply a
- 16:56:19name but if you want to give a space
- 16:56:20then you have to use has hash and in the
- 16:56:23double codes you to give the name with
- 16:56:25the space so let's say my name of the
- 16:56:27step is rename columns so I'll give hash
- 16:56:30double code rename space columns this is
- 16:56:33how I will give the variable name if it
- 16:56:35requires space a formula step can be a
- 16:56:38custom formula please note that the
- 16:56:40power query formula language is case
- 16:56:42sensitive so power for query formula
- 16:56:43language is case sensitive it means if
- 16:56:45you write down let's say rename column r
- 16:56:48capital c capital is different from R
- 16:56:50small and C Small in case of M query
- 16:56:52each formula steps buil upon a previous
- 16:56:55step by referring the step by its
- 16:56:57variable name so what happens when you
- 16:56:59look at the code which is automatically
- 16:57:01generated by power query you will find
- 16:57:03that each step is referring to the
- 16:57:05previous step that is not necessary when
- 16:57:07we start the coding I'll showcase you
- 16:57:09that it is not necessary you refer it to
- 16:57:11the immediate step you can do some
- 16:57:13calculation and post that you can also
- 16:57:14refer it but typically what happens in
- 16:57:17power query when we are autogenerating
- 16:57:18most of the steps are generating tables
- 16:57:20and the table in the step one is getting
- 16:57:22referred by the step two and so on
- 16:57:24finally what we do is we output a query
- 16:57:27formula step using the instatement so
- 16:57:30basically you will give a variable name
- 16:57:33finally after the in generally the last
- 16:57:35step in used in the final data set
- 16:57:38result so what happens whatever is the
- 16:57:39last step you actually try to return the
- 16:57:41result of the last step however it is
- 16:57:43not compulsory but in a logical flow
- 16:57:46that would actually happen so let's take
- 16:57:49an example code in this example code you
- 16:57:51can see the code start with the let
- 16:57:53statement and in the next line you have
- 16:57:55variable name equals to expression means
- 16:57:58you are assigning the expression to the
- 16:57:59variable name in the next one you have
- 16:58:01hash variable name equal to expression
- 16:58:03two which you are assigning to a
- 16:58:05variable name which is basically having
- 16:58:07the space and finally you end up
- 16:58:09returning the variable name here see we
- 16:58:11are not returning the last step we are
- 16:58:13returning a step before so that is also
- 16:58:15possible just like every other language
- 16:58:17we have the data types here we call it
- 16:58:19primitive values A Primitive value is a
- 16:58:22single part value such as number logical
- 16:58:24text or null a null can be used to
- 16:58:28indicate the absence of any data me if
- 16:58:30the value is not present that's what we
- 16:58:32call null so let's say binary is
- 16:58:34something like 0 0 and something like
- 16:58:35that date is your all your dates date
- 16:58:38and time date along with the time date
- 16:58:41time zone it will also include date time
- 16:58:44as well as time zone duration now
- 16:58:46duration is not same as time duration
- 16:58:48will have Day hours minutes and seconds
- 16:58:53then you have logical which is true and
- 16:58:54false null means you have null value
- 16:58:57number you can have 1 2 3 4 or you can
- 16:58:59have decimal numbers text you can have
- 16:59:01ABC or any kind of text which you want
- 16:59:03text can have numbers also and then time
- 16:59:06and time is different from dur time will
- 16:59:08have only time for of 24 hours it will
- 16:59:11not have the day component which
- 16:59:12duration
- 16:59:15has in power query we can use functions
- 16:59:19a function is a value that when invol
- 16:59:22with argument produces a new value means
- 16:59:24you have to give the argument and when
- 16:59:25you invoke it it will produce a new
- 16:59:27value functions are written by listing
- 16:59:30the functions parameter in the
- 16:59:31parenthesis so in the parenthesis you
- 16:59:33have to give the parameters followed by
- 16:59:35goes to symbol means this equal to an
- 16:59:38arrow is known as goes to symbol
- 16:59:40followed by the expression defining the
- 16:59:42function for example to create a
- 16:59:44function called my function that has two
- 16:59:47parameter and perform a calculation on
- 16:59:49parameter 1 plus parameter 2 so this is
- 16:59:51an example which has been given so first
- 16:59:53statement is let my function equals to
- 16:59:55the parameters parameter 1 and parameter
- 16:59:582 you can have more than two parameters
- 17:00:00that's not limitation that's just an
- 17:00:01example and then the goes by or the
- 17:00:03arrow symbol then you have in the
- 17:00:06parenthesis parameter 1 plus parameter
- 17:00:08two means we are first adding them and
- 17:00:10then dividing it by two so this function
- 17:00:11is going to return the combined half
- 17:00:14value if when we invoke it and then in
- 17:00:17my function you are returning the value
- 17:00:19which
- 17:00:19is finally returned by my
- 17:00:22function we have some structure data
- 17:00:24values that include list record table
- 17:00:27and some additional structure Now list
- 17:00:30is something which is uh like a column
- 17:00:32so basically a set of values is known as
- 17:00:35list so a table column is also
- 17:00:36considered as a list record is a record
- 17:00:39which where we have a column name and a
- 17:00:41value column name and a value it's
- 17:00:42basically like a row so you can consider
- 17:00:44a table row as a record and a table
- 17:00:47column fully qualified table column name
- 17:00:50is considered as a list now there are
- 17:00:52differences we cannot always use the
- 17:00:54same term but this is just an example
- 17:00:56what we will do when we actually go
- 17:00:58ahead and do the coding we will use the
- 17:01:02table column as a list also and we'll do
- 17:01:04the list operation on that so these are
- 17:01:06the few data types which are really
- 17:01:08important and there are tons of
- 17:01:09operations around list record text
- 17:01:12number and dates and if you are able to
- 17:01:15practice those functions you will be
- 17:01:17able to solve many complex Logics and
- 17:01:19most of these functions are already
- 17:01:20discussed on my YouTu YouTube channel so
- 17:01:22you can take advantage of that in this
- 17:01:24series and video we are going to
- 17:01:26consider some of them so that you can
- 17:01:28create foundation for using other
- 17:01:35functions let's jump on to the new Power
- 17:01:37ba file I already opened a new power v
- 17:01:39file and how do we reach power query so
- 17:01:41we click on the transform data and under
- 17:01:43that we again have the transform data
- 17:01:46and from there we will reach the power
- 17:01:48query once we open the power query you
- 17:01:50will find nothing is there it is empty
- 17:01:53what we have to do is we have to add a
- 17:01:55new source for that we are going to use
- 17:01:57the new source option under the Home tab
- 17:01:59and from there we will go to blank query
- 17:02:02and add a blank query what happens when
- 17:02:04you create the blank query it creates it
- 17:02:06with default steps and we have to modify
- 17:02:09those default step how do we reach there
- 17:02:11reach either you can use right click
- 17:02:13Advance editor or there is an advanc
- 17:02:16editor option in the Home tab also I
- 17:02:18will use the right click advanc editor
- 17:02:21Let me open that now here in the source
- 17:02:23let's say I can write down an integer
- 17:02:25one then we click on done now you can
- 17:02:28see it is returning one every time you
- 17:02:30return return anything other than table
- 17:02:32it gives you an option to convert that
- 17:02:33to a table if it is not a list it can
- 17:02:35give you convert to a list or to a table
- 17:02:37but the list it will only give you
- 17:02:39convert to a table it is returning right
- 17:02:41now one which is of number data type
- 17:02:43every time you do an operation based on
- 17:02:46that operation's return type it is going
- 17:02:48to return that particular data type I
- 17:02:50can go here Advance editor again and I
- 17:02:53can make it let's say double
- 17:02:55codes a b c and if I return now now it
- 17:02:59is rning a string and the moment I
- 17:03:01return the string I have different
- 17:03:03option like format it identifies the
- 17:03:06written type and based on that it gives
- 17:03:08the different options to us same way we
- 17:03:10can perform some operation right click
- 17:03:12go to advance editor and this and it is
- 17:03:14not necessar the name need to be source
- 17:03:16so let's create a variable a = to 1
- 17:03:19comma next line B = to 2 comma e = to a
- 17:03:24+ b and let's return return C let me
- 17:03:27click on done to close the Advan editor
- 17:03:29and get the results just like any other
- 17:03:31programming language I'm getting the
- 17:03:32results of C which is a plus b equals to
- 17:03:353 same way again we can go ahead right
- 17:03:38click advance editer and we can modify
- 17:03:40it let's say to multiply this but for
- 17:03:42multiplication let's take little bit
- 17:03:43different numbers let's take a is equal
- 17:03:45to 3 balal to a mtip by B and let's
- 17:03:49click on the done and we are getting the
- 17:03:50expected result 6
- 17:03:52it is not that we can do the operations
- 17:03:54on number only we can do it on text also
- 17:03:56so let's go back again using the Advan
- 17:03:59editor let's change these two strings
- 17:04:01now hey I'm going to give in double
- 17:04:03codes Microsoft without space second one
- 17:04:06we'll call this power B turn on let's
- 17:04:09try to add them so a m% base m% B let's
- 17:04:14written P so C is appending Microsoft
- 17:04:17and power B in the space click on the
- 17:04:19done and let's check the result the
- 17:04:21result is Microsoft powerbi and it is a
- 17:04:23text and we are getting option to edit
- 17:04:25the text in this manner you can do some
- 17:04:28basic operation so let's name this right
- 17:04:30now as q1 query one I can double click
- 17:04:33or rename right click or rename these
- 17:04:35are various options are there and as you
- 17:04:37see every step has been given here
- 17:04:40applied steps and these steps can be
- 17:04:42deleted or added between steps can be
- 17:04:45added as per right let's understand in
- 17:04:47more detail what all steps we have
- 17:04:48created so let's go back to the Advance
- 17:04:50editor again and in advanced editor you
- 17:04:53can see in the step one we have assigned
- 17:04:55a value step two we assigned a value and
- 17:04:57step three we appended this value and
- 17:04:59finally in the end we have given back
- 17:05:01that value so how we have done it let
- 17:05:04variable and the data variable and the
- 17:05:06data variable and the operation and then
- 17:05:09finally in the in we have the variable
- 17:05:11which we plan to return so this is what
- 17:05:13we have done let variable variable
- 17:05:15operation and R and then finally press
- 17:05:17done now let's go ahead and try more
- 17:05:20stuff so what I would like to now here
- 17:05:22is let me try to create list so for list
- 17:05:25let's start again by creating a new
- 17:05:27query we go to the open
- 17:05:29tab we'll take a blank query right click
- 17:05:33and want editor let me create a list
- 17:05:36list is something where we give data
- 17:05:38into the angular brackets now it's a
- 17:05:40list of mix 1 2 3 a that's a mixed list
- 17:05:44I wanted to create I to return the same
- 17:05:46but you can see list of mix which have
- 17:05:48created create one more list go back to
- 17:05:50the tab new source BL
- 17:05:54query again right click
- 17:05:57adance and let's create list of
- 17:06:00numbers so Source equals to list of
- 17:06:03numbers how do we give a list in the
- 17:06:04angular bracket if you give the comma
- 17:06:06separated value that is list if you are
- 17:06:08giving numbers read of double code if
- 17:06:10you want to give the text then you have
- 17:06:11to give them in double code we creating
- 17:06:13a list angular brackets when we use it
- 17:06:15creates a list press on done and let's
- 17:06:19return this we got a list 1 2 3 again
- 17:06:22now this time if you look at here you
- 17:06:24have option as it is a list there is
- 17:06:26only one option two table there is no
- 17:06:28option to list here let's take one more
- 17:06:30example this time we are going to create
- 17:06:32a list of list again new source lank
- 17:06:34query right click Advance editor and
- 17:06:37here inside the angular bracket what I'm
- 17:06:39doing is angular bracket 1 2 3 angular
- 17:06:42bracket 4 5 6 and then again angular
- 17:06:45bracket list of list I'm creating click
- 17:06:48on done and you can see there's a list
- 17:06:51if you click on that look at below you
- 17:06:53will get the data and this do allow you
- 17:06:55to expand so once you convert it into a
- 17:06:57table this will allow you to expand the
- 17:06:59list and further do more operations
- 17:07:01let's create list of text also new
- 17:07:04source land query right click Advance
- 17:07:06editor in the envelope brackets a b c e
- 17:07:10e fi and let's click on now we got a
- 17:07:14list of text now we would like to create
- 17:07:17something which is little bit more
- 17:07:18interesting we want to create a how do
- 17:07:20we create a record let's go go to the
- 17:07:21Home tab new source blank query let's
- 17:07:24right click andan enter now in the
- 17:07:27square bracket we to write down the
- 17:07:29record the square bracket you can write
- 17:07:31down the record and the record what you
- 17:07:34name of the column and the value name of
- 17:07:36the column and the value name of the and
- 17:07:38the value this is how you write down in
- 17:07:39the square bracket now there is no
- 17:07:41currently here give square bracket click
- 17:07:43on done how you going to record Now
- 17:07:45record when we convert to a table it
- 17:07:47let's take example here actually
- 17:07:49converts it into like four record we
- 17:07:51have to actually ask whoose it now who
- 17:07:53knows
- 17:07:55it and this is the step which is
- 17:07:57automatically added and let's look at
- 17:07:58here advanc editor and now you will
- 17:08:01understand that you know how the
- 17:08:02previous step is refer this was the
- 17:08:03previous step and when we convert it to
- 17:08:06the table here if you look record to
- 17:08:08table this step has been referred here
- 17:08:10we have referring source is refering to
- 17:08:12the source of the last step and then in
- 17:08:14is referring to the last step name this
- 17:08:17is how we refer steps in subsequent
- 17:08:19steps now let's take one more example
- 17:08:21and this time what we are going to
- 17:08:23create is list of record new sports
- 17:08:26blank query right click Advanced editor
- 17:08:29here now square ones are the records and
- 17:08:32comma separated list of Records inside
- 17:08:34the angular bracket creating the list
- 17:08:37click on done you got records you can
- 17:08:40see your records here let's convert it
- 17:08:42into two table okay you select the
- 17:08:45option then you can see you got two
- 17:08:47records and now you can expand the
- 17:08:49record expand the record and you will
- 17:08:51get a table like this in this manner
- 17:08:54these are the steps so now remember
- 17:08:56these functions are automatically added
- 17:08:58by menu let me show you those into the
- 17:09:01advanced editor but you can also
- 17:09:03manually write down these steps if you
- 17:09:06know the function like table from list
- 17:09:08table from expand record you will be
- 17:09:10able to write down all these and in the
- 17:09:12beginner tutorial series I covered most
- 17:09:14of these then go ahead and try that out
- 17:09:16now everywhere you see the reference of
- 17:09:18the last
- 17:09:20step returning the last step in this
- 17:09:23manner the entire flow is happening now
- 17:09:26let's take an example how do we create a
- 17:09:27table now there are multiple ways to
- 17:09:29create table table from record table
- 17:09:31from list but let's take one of the
- 17:09:33example when you wanted to create table
- 17:09:36and the function which we are going to
- 17:09:38use is Hash table the new source blank
- 17:09:41query right click Advance editor and
- 17:09:44here we are going to write down hash
- 17:09:45table now after the hash table what is
- 17:09:47the syntax you need to give first a list
- 17:09:50a list which will contain the column
- 17:09:51names and then you get need give a list
- 17:09:54of lists which will contain your each
- 17:09:57row the list then list of list the two
- 17:09:59arguments one is list and then list of
- 17:10:02list these are the two argument hash
- 17:10:03table requires putting his hash table
- 17:10:05into the SCE and we are rning click on
- 17:10:07done and you will get your table and you
- 17:10:10got a table directly we got a table
- 17:10:12let's try one more example this example
- 17:10:15again we are going to use hash table but
- 17:10:16with a little bit different again blank
- 17:10:18query new source blank query right click
- 17:10:21editor here in the hash table first we
- 17:10:24say type table then we give a record the
- 17:10:27record contains the data type also now
- 17:10:30here previously we have not mentioned
- 17:10:31the data type here we are mentioning
- 17:10:33order ID is number customer ID is number
- 17:10:35item is text price is number and then
- 17:10:37giving list of list so the only thing is
- 17:10:40first argument we have changed and the
- 17:10:42first argument we giving type table we
- 17:10:44are telling the record where we are
- 17:10:46telling the column name and the data
- 17:10:48type and then we are giving list of list
- 17:10:50let's click on that again you got the
- 17:10:52table let me add one more query here
- 17:10:55land query in this query let's take an
- 17:10:57example of list of Records so new source
- 17:11:00blank query right click Advance editor
- 17:11:03The Source equals to
- 17:11:07list and inside the list we have records
- 17:11:09so list of Records what we are trying
- 17:11:11and inside the record as usual the
- 17:11:13column name the value column name and
- 17:11:15value let's click on done we got list of
- 17:11:18Records we can convert this into table
- 17:11:21will expand the records and can get our
- 17:11:23full
- 17:11:24table now we will look at example where
- 17:11:27we wanted to create table from Recon so
- 17:11:30let's create one more query home new
- 17:11:33sources L query right click Advan editor
- 17:11:36and so here what we are doing is in the
- 17:11:38source we are getting table from records
- 17:11:41this is the function and inside this
- 17:11:43function we are giving a list of Records
- 17:11:45that's what we have to give every list
- 17:11:47has records every record has columns and
- 17:11:49the values different data type and
- 17:11:51different names can be there then
- 17:11:53another record then one more record we
- 17:11:55can have as many records as we want then
- 17:11:57you click on that now you have learned
- 17:11:59how can we create numbers text list
- 17:12:03records table table from records table
- 17:12:06from list and so many things now we have
- 17:12:09to learn few more things for few things
- 17:12:12you cannot simply write down a value let
- 17:12:14let's take an example of date how are
- 17:12:16you going to write down dates let's add
- 17:12:18a blank query and right click advance
- 17:12:21editor for some of those we have
- 17:12:23shortcut hash functions like for date we
- 17:12:26have hash
- 17:12:28date you seen hash table we have hash
- 17:12:31date here
- 17:12:322024 0101 click on
- 17:12:36done you got a date similarly right
- 17:12:39click Advance editor you can date time
- 17:12:42are you going have six argument 14 Z
- 17:12:46click on
- 17:12:48done you have date time and you can see
- 17:12:50check the data type it is showing now
- 17:12:52date
- 17:12:53time and then it is giving option for
- 17:12:56date separation time separation now
- 17:12:58let's create duration
- 17:13:01also new
- 17:13:03query right click Advance editor as
- 17:13:07duration and these are all small
- 17:13:09typically it is case sensitive and you
- 17:13:11will always find the functions names are
- 17:13:13in title case like table do record and
- 17:13:15all those but here is all small when it
- 17:13:18is coming with hash hash table hash date
- 17:13:20hash date time hash duration and
- 17:13:22duration you can give first day then
- 17:13:24hour minutes
- 17:13:27seconds click on done and you got a
- 17:13:30duration now you before to create a list
- 17:13:32of duration or list of time you can
- 17:13:34right click do Advance editor if angular
- 17:13:37bracket and in the angular bracket one
- 17:13:40of that click on done get the list of
- 17:13:44duration we can create table from it
- 17:13:47these are some of the basic functions
- 17:13:49and operation you must remember
- 17:13:52now before I tell you little bit more
- 17:13:55about some of the functions which could
- 17:13:57be really useful I would like to import
- 17:13:59one file again and show you what are the
- 17:14:02steps which file creates and again for
- 17:14:05that I'm going to take out our favorite
- 17:14:07file T data used in videos by bringing
- 17:14:11this file we would like to understand
- 17:14:13what all steps is going to create I'll
- 17:14:15bring in the sales data us video again
- 17:14:17so new source B give the URL click on
- 17:14:21okay and we don't need to bring in all
- 17:14:23the sheet can bring in one sheet let's
- 17:14:26bring in customer click on
- 17:14:29okay and there was no load button or
- 17:14:31transform button this time because we
- 17:14:33are in power query so we are going to
- 17:14:34each here only we are not interested in
- 17:14:36what is coming here on the table view we
- 17:14:39are more interested in right click
- 17:14:41Advance editor and what is happening
- 17:14:43here is basically there is a let this is
- 17:14:45the first step where we are getting the
- 17:14:47Excel sheet now from the Excel sheet
- 17:14:49these ports we are getting the
- 17:14:51data of sheet customer sheet item
- 17:14:54customer kinda sheet data so we are
- 17:14:56getting the sheets data after that
- 17:14:58promote header and look for what promote
- 17:15:00header is refering it is referring to
- 17:15:02the customer sheet what customer sheet
- 17:15:04is referring is refering to for the
- 17:15:06function which has been used on for then
- 17:15:08we have change type change type if you
- 17:15:10see it is referring to the promoted
- 17:15:12address which is the last and finally
- 17:15:14the page type is the one which is
- 17:15:16getting R in this matter what is
- 17:15:18happening is basically each step you
- 17:15:21getting a data and next step is that
- 17:15:23transformation to the next level what we
- 17:15:25think in such cases that every time it
- 17:15:27is referring to the last step but if
- 17:15:29that is not completely true sometime it
- 17:15:31may happen just like we have done in our
- 17:15:33older example that it can refer to the
- 17:15:36previous step or previous to previous
- 17:15:38step we might have a couple of step and
- 17:15:40after that the output will be used in
- 17:15:42another step so those combinations are
- 17:15:44also possible most of the time what
- 17:15:46happens it is T table at the each step
- 17:15:48so what we think is it is table in the
- 17:15:50first step it is table which is carrying
- 17:15:51on the next step next step it is table
- 17:15:53and then further more table table is
- 17:15:55referring to the last step which is
- 17:15:56table and again giving us table but that
- 17:15:59is not completely true just like any
- 17:16:01other programming language we can have
- 17:16:02steps which can have different kind of
- 17:16:04variables and those can be combined to
- 17:16:07create a result T and because finally we
- 17:16:11want a table for analysis that is why
- 17:16:13most of our power query final output
- 17:16:16would be a table now there are functions
- 17:16:19where we will be able to Loop the
- 17:16:20function funs which will allow you to
- 17:16:22Loop through each row of the table there
- 17:16:24are functions which allow you to Loop
- 17:16:26through the each element of the list and
- 17:16:28using those functions you will be able
- 17:16:31to create Loops or able to process row
- 17:16:33by row data so just like any other
- 17:16:35programming language we have lot of
- 17:16:37things which we can use here but in this
- 17:16:39series and video we'll might not be able
- 17:16:41to cover everything but we'll try to
- 17:16:43give you a overview which would help you
- 17:16:46to use other functions let's also
- 17:16:49understand what are Power query
- 17:16:50functions
- 17:16:51so to understand that let's go back to
- 17:16:53the file which we are right now already
- 17:16:55in progress and in this file what I'm
- 17:16:57going to do here is I'm going to go to
- 17:16:59the Home tab new query blank query and
- 17:17:02inside that blank query let me create a
- 17:17:04function let me do go ahead and do right
- 17:17:06click Advance editor you want to create
- 17:17:09a simple function function which is
- 17:17:10going to do is my function or I can give
- 17:17:12it as any name I don't need Source in
- 17:17:14that case I need to return this my
- 17:17:16function so let me call it addition FN
- 17:17:20addition function what addition function
- 17:17:23equals to the parameters X and Y and
- 17:17:25what the operation they should do X and
- 17:17:27Y are actually summing up this can do
- 17:17:29any other complex operation now let's
- 17:17:31return return this addition function
- 17:17:34done let's rename this query also now if
- 17:17:37you want to test you can give here let's
- 17:17:39say three and four and those invoke and
- 17:17:42it will give you answer as s and it has
- 17:17:46actually created a new query if you see
- 17:17:48when you use invoke right click advance
- 17:17:50and return it has actually created Force
- 17:17:53addition function this is the query name
- 17:17:54please remember if your query name is
- 17:17:56different from your function name you
- 17:17:58have to use the query name query name
- 17:18:00not the function name so whenever you're
- 17:18:01creating the function make sure your
- 17:18:03function name and query name is same so
- 17:18:04that you don't get confused with two so
- 17:18:07addition function T comma 4 and integ
- 17:18:09instead of I go ahead and doing that it
- 17:18:12has created that so in could have done
- 17:18:15that bland query tested it or you can
- 17:18:17use this function now in any other query
- 17:18:19which you are doing so in this this
- 17:18:20manner you can create functions which
- 17:18:22you can actually use in your other
- 17:18:25operations so let's take one more
- 17:18:27example of the function go to BL tab
- 17:18:29Force blank query and in this blank
- 17:18:31query advanc editor let's use source as
- 17:18:34a function equals to a comma
- 17:18:39B goes to a m per p m per B so if you
- 17:18:46remember what we have written in the
- 17:18:47past and let's call this aend function
- 17:18:49aend a Capital fnend function let's
- 17:18:52create an append function c contr v WR
- 17:18:55append in the in now we got an append
- 17:18:58function we name this query as a pan
- 17:19:00function let's give a as Microsoft b as
- 17:19:06power B let's use it the Microsoft
- 17:19:09powerbi it has it has created a query
- 17:19:11for us and which is giving us the result
- 17:19:13in this manner you can create power
- 17:19:14query function which can do some complex
- 17:19:17transformation and or solve some kind of
- 17:19:19operation and you can you call those
- 17:19:21functions into other queries this is a
- 17:19:24brief overview of power query functions
- 17:19:26power query offers you tons of functions
- 17:19:29which you can use to improve your
- 17:19:33transformation these functions include
- 17:19:35list function table function record
- 17:19:38function text function number function
- 17:19:42Etc now it is not possible to cover all
- 17:19:46of these functions in this series and
- 17:19:49video so what I'm I'm going to do is I'm
- 17:19:51going to cover some of these functions
- 17:19:53uh in this particular video I will cover
- 17:19:56some basic list function which can help
- 17:19:58you understand how to perform list
- 17:20:01operation and based on that you can go
- 17:20:04ahead and perform more operations by
- 17:20:08looking at the documentation of
- 17:20:10different
- 17:20:11functions most of these functions are
- 17:20:14covered on my channels in the beginner
- 17:20:16tutorial series you can go ahead and
- 17:20:19learn from there
- 17:20:21every function is fit for a purpose and
- 17:20:23if you are able to learn most of these
- 17:20:26functions you will be able to perform
- 17:20:29many transformation with
- 17:20:31ease let's jump back to the powerbi and
- 17:20:35the first thing which I would like to do
- 17:20:37here in power ba file is I would like to
- 17:20:39click on close and apply and once that
- 17:20:41is done means the data is loaded I will
- 17:20:44save this file and once this file is
- 17:20:46saved we will go back to the power query
- 17:20:49and start doing some list
- 17:20:52Transformations data loading is done now
- 17:20:55time has come that we save this file let
- 17:20:57me click on the save icon on the left
- 17:20:59top give this file name as N2
- 17:21:02n14 and click on the save button to save
- 17:21:06this file so let's go back to the power
- 17:21:08query using transform data transform
- 17:21:11data and here now we will try to learn
- 17:21:13some list operations Home tab new source
- 17:21:18blank query right click on the new query
- 17:21:21open Advance editor and in advance
- 17:21:23editor we are going to create a list
- 17:21:25inside the angular brackets let me
- 17:21:27create list of numbers by giving 1 2
- 17:21:315 6 7 3 and 4 don't want to give it in
- 17:21:36the order so that later on I can
- 17:21:38showcase you list. sort let's click on
- 17:21:41done I got a list what I can do is I can
- 17:21:45open this Advanced editor again here on
- 17:21:48this step or on the next step I can do
- 17:21:49this list
- 17:21:52dot there are so many operations this
- 17:21:55dot I have sum I have count I have min
- 17:21:59max all those functions are there let me
- 17:22:02use list. sort to sort this
- 17:22:05list first let's try list. sort and in
- 17:22:09this function I have to give list only
- 17:22:11one argument it takes that's a list list
- 17:22:13is something which we have in the
- 17:22:14envelope bracket let's click on done and
- 17:22:17as you can see the list is sorted in a
- 17:22:19proper order now instead of going back
- 17:22:21here I'm seeing the list I can use list.
- 17:22:23sum and you will see I get a sum now it
- 17:22:26is wring a number it's not no more a
- 17:22:28list similarly I can try list dot Max
- 17:22:31here will give me maximum of the is
- 17:22:347even in Max you Dy Min list do Min Min
- 17:22:39function you come
- 17:22:41here the list. Min it is list IFA as any
- 17:22:45comparison criteria all those arguments
- 17:22:47you can give we will get the minimum
- 17:22:50value from the list that is one so we
- 17:22:52are getting one so if we have something
- 17:22:54known as count also we can use count
- 17:22:57list. count let's see what all
- 17:22:58argumented need the list argument and it
- 17:23:01will return return us seven now let's go
- 17:23:03ahead and add one more list item so that
- 17:23:06it gives us eight and we are able to
- 17:23:08differentiate between the Max and the
- 17:23:10count now we are interested in couple
- 17:23:12more operations and those operations are
- 17:23:15one which will allow us to Loop through
- 17:23:17the list and do additional operations
- 17:23:20let we add blank query for that new
- 17:23:22source blank
- 17:23:24query right click open Advance editor
- 17:23:27and we are now going to learn the
- 17:23:28function list. number list. number needs
- 17:23:33three argument first argument is
- 17:23:35basically start so from where you want
- 17:23:38to start so I want to start with one how
- 17:23:40many numbers you need 100 and increment
- 17:23:42by which is I want one in this case so
- 17:23:44it will give me 1 to 100 numbers so this
- 17:23:48is a continuous number series in case
- 17:23:50you want a odd number series what you
- 17:23:53can do is you can increment by two and
- 17:23:55it will become a odd number series and
- 17:23:57it is going to give you 100 number it is
- 17:24:00Count total numbers you need not like
- 17:24:03your generate Series where 1 to 100 is
- 17:24:06start and end limit this is not the
- 17:24:08limit this is the count now in case you
- 17:24:10want even number series then you can
- 17:24:13start with two for odd number series you
- 17:24:16can start with one let's start with the
- 17:24:18first argument two comma 100 100 numbers
- 17:24:20I need and then increment by two and
- 17:24:24this will give me now even number series
- 17:24:27a list of 100 even num starting from two
- 17:24:30there are more such functions so let's
- 17:24:31go to the new source blank query
- 17:24:34rightclick Advan editor and here we are
- 17:24:38going to now use list. dates it can
- 17:24:41generate list of dates that will help us
- 17:24:44to create calendar but we do have the
- 17:24:47functions like list. dat time we do have
- 17:24:50list. duration that can give us
- 17:24:52continuous duration but at this time we
- 17:24:54will focus at list. dates so list. dates
- 17:24:58would require three arguments the first
- 17:25:00argument is date for that I'm going to
- 17:25:02use shortcut hash date it again required
- 17:25:04three argument here which is 2022 month
- 17:25:0801 and day 01 comma the count of dates I
- 17:25:11need 365 dates almost for an Year and
- 17:25:14that the duration again I'll use the
- 17:25:16shortcut function hex duration and in
- 17:25:19the duration the first argument is day
- 17:25:20and because I require a date table I'll
- 17:25:22use one then hour minutes and second I'm
- 17:25:25going to use zero and I'll click on done
- 17:25:28and this will give me a series of dates
- 17:25:32which will help me in creating the date
- 17:25:35table so I am now getting continuous
- 17:25:38dates to create a date table we also
- 17:25:41have another powerful function list.
- 17:25:43generate which we can also use so let's
- 17:25:46start again with a new query Home tab
- 17:25:49new source blank query right click Advan
- 17:25:53editor and here we are going to use the
- 17:25:55powerful function list. generate list
- 17:25:59dot
- 17:26:00generate and it requires three arguments
- 17:26:03and all three are functions the initial
- 17:26:05function the condition function and the
- 17:26:07next function so what is the first
- 17:26:09argument the first argument is a
- 17:26:10function without any parameters goes by
- 17:26:14means the arrow and the value which I
- 17:26:16want to give to this function is a
- 17:26:18static value of t to start with the next
- 17:26:22argument is condition and the condition
- 17:26:24is each underscore greater than zero
- 17:26:29here generate is creating a loop and
- 17:26:31each is giving us each value to compare
- 17:26:34and take a decision third argument is
- 17:26:37increased and how we will give it each
- 17:26:40underscore minus one means from each row
- 17:26:43supp the one one value it will give us
- 17:26:47reducing
- 17:26:48list so generate function generate a
- 17:26:51list of values using provided function
- 17:26:54the initial function generates the
- 17:26:56starting candidate value which is then
- 17:26:58tested by the condition if the candidate
- 17:27:01value is approved then it's returned as
- 17:27:03a part of the resulting list and the
- 17:27:05next candidate value is generating by
- 17:27:07passing the newly approved value to the
- 17:27:10next so we have a initial value of 10
- 17:27:13tested every time for greater than zero
- 17:27:16and every value is reduced for minus1 to
- 17:27:20generate a list of values and let me
- 17:27:24click on done and now we are getting
- 17:27:26values from 10 to 1 decreasing by one in
- 17:27:29each row if you want a increasing number
- 17:27:31list you can start with one and say
- 17:27:34underscore less than 100 and then we can
- 17:27:38change the increment by + one each
- 17:27:41underscore + one here the underscore
- 17:27:44represent the value in each time we are
- 17:27:49calculating it each time we are looping
- 17:27:51that value is the underscore value where
- 17:27:53we are adding the one we got a list of
- 17:27:56number using list. generate function
- 17:27:59this time so we have understood few list
- 17:28:02functions we have tons of list function
- 17:28:05that include list. sum mean Max count
- 17:28:08contains contains all distinct date date
- 17:28:11time duration intersect distinct last
- 17:28:16last 10 matches all there are so many
- 17:28:19functions which we can discuss but it is
- 17:28:21not possible to discuss all of them as
- 17:28:24part of this video or series what you
- 17:28:26can do is you can watch beginner
- 17:28:28tutorial series on the channel and can
- 17:28:30take advantage of all of these functions
- 17:28:33discussed there there are other power
- 17:28:35query functions which deal with date
- 17:28:37number text table record
- 17:28:44Etc let us learn some text function in
- 17:28:47power query and to do that let's go back
- 17:28:49to the the same file again the file N2
- 17:28:52n14 and I have already opened power
- 17:28:54query in that in that file we have
- 17:28:56created the list of dates using the list
- 17:29:00functions which I've explained in the
- 17:29:02previous video already what I'm going to
- 17:29:05do is first of all let me call it as
- 17:29:07dates list
- 17:29:10and now let me convert this into a table
- 17:29:13to convert this into a table will
- 17:29:15automatically add a step and that step
- 17:29:18is nothing but list from table
- 17:29:20this is the table function which use
- 17:29:22source which is basically a list
- 17:29:24splitter. split by nothing null null
- 17:29:27extra values or error these are the
- 17:29:29things which has to be provided table
- 17:29:32from list power query function help us
- 17:29:35to convert a list into table with
- 17:29:38required arguments this list has been
- 17:29:40converted into a table let me rename
- 17:29:42this as dat also let me change data type
- 17:29:45by clicking on the left top of the
- 17:29:48column where ABC is written and change
- 17:29:51it to date you can observe that the data
- 17:29:54type is date now to start this journey
- 17:29:57first of all I'll convert this date into
- 17:30:00the text and we will use some text part
- 17:30:03functions to get different parts of the
- 17:30:06date we have text function which are
- 17:30:09text.art text. middle and text. end to
- 17:30:14take out different parts from a text so
- 17:30:17let's start this journey by creat
- 17:30:19creating a new column using the custom
- 17:30:23column so add column new custom column
- 17:30:26and let's create a text date column to
- 17:30:30achieve this we are going to use the
- 17:30:33function date. to text so that function
- 17:30:38will convert the date into a text date
- 17:30:41and the first argument which we supposed
- 17:30:43to give is the date column comma and the
- 17:30:46second argument is the format which we
- 17:30:49are going to give into the double quotes
- 17:30:51y y y y four times double M that would
- 17:30:54be in the capital and DD in the small so
- 17:30:57this is the format we supposed to give
- 17:30:59our query is case sensitive so check out
- 17:31:02the documentation when to give capital
- 17:31:04letter and when to give small letters in
- 17:31:06the format click on okay and check the
- 17:31:08data so let's scroll down into the data
- 17:31:11and check it out let's scroll down to
- 17:31:13another month and check yes this format
- 17:31:15is correct so the format which we have
- 17:31:17used here is 4 y in the small 2 m in the
- 17:31:21capital and 2D in the small and this has
- 17:31:23worked for this use case data type is
- 17:31:26any as of now and we need to change it
- 17:31:28now to change what I'm going to do is
- 17:31:30this add column function itself I will
- 17:31:33go and give the third argument so comma
- 17:31:35the third argument needs a type so here
- 17:31:38I'm going to give text Dot type so it's
- 17:31:42going to give the text data type and
- 17:31:45once I give this argument I will press
- 17:31:47enter this argument has corrected the
- 17:31:50data type in the same manner you can
- 17:31:52give number. type or in 64. type to
- 17:31:56correct your data type as per the need
- 17:31:59for the required column we will start
- 17:32:02the process of converting this text into
- 17:32:04date for that we will require a date
- 17:32:07function and we will also require the
- 17:32:09test function to take out the start
- 17:32:11middle and the end part we might also
- 17:32:13require conversion of text into integer
- 17:32:16click on ADD column custom column to
- 17:32:19create a new column and I'm going to
- 17:32:21call this new column as date one so let
- 17:32:23me replace the name with the date one in
- 17:32:26this one I'll use hash date function
- 17:32:29first of all which takes three argument
- 17:32:31year month and
- 17:32:33day first argument is here for that we
- 17:32:37need the first four characters so for
- 17:32:39that we are going to use the function
- 17:32:42text Dot start now the first argument in
- 17:32:47this function we need to give the text
- 17:32:49date so we will give text date as the
- 17:32:52first argument comma we need four
- 17:32:54characters so we need to give four and
- 17:32:56then we can close the parenthesis so the
- 17:32:58next argument which we are going to use
- 17:33:00is text. middle and in the text. middle
- 17:33:04we need three argument so the first
- 17:33:07argument which we need to use in the
- 17:33:09text. middle is the text date then we
- 17:33:13need the starting point which is five in
- 17:33:15our case the four characters of ear and
- 17:33:18hyphen and then the the next character
- 17:33:20to start because it start from zero so
- 17:33:22five we need two characters of month so
- 17:33:24two close parenthesis comma need day in
- 17:33:27the last argument so the function we are
- 17:33:29going to use here is text Dot and to get
- 17:33:33the last two character in the string so
- 17:33:36the first argument here is going to be
- 17:33:38the text date and then we need two
- 17:33:40characters from the end so we are going
- 17:33:42to give two and then we will close the
- 17:33:46parenthesis and then we got the date now
- 17:33:49we can click on okay to check it out it
- 17:33:51is giving error the reason it is giving
- 17:33:54error is because we need the three
- 17:33:56arguments as whole number or integers
- 17:33:59but all the three arguments what we have
- 17:34:00given are the text so what we need to do
- 17:34:03is we need to convert this text into the
- 17:34:05number the start the middle and the end
- 17:34:08for that we have function number from
- 17:34:12text let's use the function number from
- 17:34:16text on all the three arguments I have
- 17:34:18knowingly given as space after the
- 17:34:20parenthesis because when we try to
- 17:34:23select the function sometime it replaces
- 17:34:26the existing function if you don't give
- 17:34:28the space so this function number from
- 17:34:31text we need to use on all the three
- 17:34:34arguments to convert them into the
- 17:34:36number so that the date function can use
- 17:34:40them once we completed our formula you
- 17:34:42can see that we got all the dates
- 17:34:45correctly now the dates are displayed
- 17:34:47currently my format is the US date
- 17:34:50formats and based on that format the
- 17:34:52dates are displayed in case you are
- 17:34:55using the UK or Australia format you
- 17:34:58will get the date into that default
- 17:35:01format are some of the basic text
- 17:35:03function which we have used here but
- 17:35:06there are lot many text function and I
- 17:35:08have covered quite a few of them on my
- 17:35:11channel in different videos which you
- 17:35:14can go ahead and explore some of the
- 17:35:17functions which were available at part
- 17:35:19of the menus are also available as
- 17:35:22function so that we can do complex
- 17:35:25transformation by using those individual
- 17:35:27functions and we will continue to
- 17:35:30explore these functions in different
- 17:35:32different
- 17:35:34videos we have created a date table
- 17:35:37index in the past now time has come that
- 17:35:40we create the date table in power query
- 17:35:44we have learned some of the power query
- 17:35:46function and time to learn some new
- 17:35:48functions to create the date table our
- 17:35:51Dex power query table is pretty
- 17:35:53comprehensive and we can create such a
- 17:35:56comprehensive table using power query
- 17:35:58also or even more comprehensive by using
- 17:36:01additional functions so let's begin our
- 17:36:03journey of creating the date table in
- 17:36:05power query I'm going to jump on the
- 17:36:07existing file which we have created and
- 17:36:09to n and14 I'll go to the transform data
- 17:36:12which will open the power query module I
- 17:36:15would like to add a new query so I'll go
- 17:36:17to Home tab new query blank query and
- 17:36:21this will add a blank query I would now
- 17:36:23like to rename this so right click and
- 17:36:26rename is one option double click and
- 17:36:29you will go inside the query and you can
- 17:36:31rename it I will rename it as date table
- 17:36:34and press enter and let me open the
- 17:36:36advanced editor now first of all we will
- 17:36:39Define two dates because we wanted to
- 17:36:41have a calendar between two dates but
- 17:36:43the function which we plan to use list.
- 17:36:46dates does not take two date arguments
- 17:36:49it take a date argument and number of
- 17:36:51days so we need to learn how do we take
- 17:36:53the difference between two dates to
- 17:36:55provide to this particular function so
- 17:36:58first let's start with the start date
- 17:37:00start date as a variable equals to a
- 17:37:03value this is how you define a variable
- 17:37:06here so start date equals to Hash date
- 17:37:10hash date function requires three
- 17:37:12argument the first argument it require
- 17:37:14is year second is month third is day so
- 17:37:17first argument I'm going to give is 20
- 17:37:192018 which is year 01 is the month 01 is
- 17:37:22the day close parenthesis give a comma
- 17:37:25and go to next line to start new
- 17:37:27variable now let's define underscore end
- 17:37:30dat equals to HH date
- 17:37:342012 is the year comma 12 month comma 31
- 17:37:40as a day the next step is to get the
- 17:37:43list of dates for that we are going to
- 17:37:46use list. dates function so let's define
- 17:37:49variable underscore date equals to list.
- 17:37:53dates now list. dates function requires
- 17:37:56three argument first argument is the
- 17:37:58start date second argument is Count
- 17:38:01means number of days third argument is
- 17:38:04Step means how many days it should jump
- 17:38:07between each list
- 17:38:09items I am going to give the start date
- 17:38:12as the first argument which we have
- 17:38:15created some time back so the first
- 17:38:17argument is underscore St start date for
- 17:38:20the second argument we need number of
- 17:38:24days the count and that can come from
- 17:38:27the difference of end date minus start
- 17:38:30date which is pretty easy in power query
- 17:38:34but that's returns as duration not dat
- 17:38:38so let me Define a new variable
- 17:38:40underscore diff which will contain the
- 17:38:43difference of these two dates so
- 17:38:45underscore diff equals to underscore and
- 17:38:49date minus underscore start date and
- 17:38:54this will return me the difference
- 17:38:57between two days in duration now I need
- 17:39:01to use a function duration. days to get
- 17:39:05the days out of this duration now I will
- 17:39:09get number of days between these two
- 17:39:12dates using this function plus one to
- 17:39:15cover up the subtraction difference to
- 17:39:17get the exact days back to the list of
- 17:39:20dates let's give the second argument
- 17:39:22which is underscore diff number of days
- 17:39:25or count third argument is the step
- 17:39:27which is required in duration so we are
- 17:39:30going to use a function hash duration
- 17:39:33which can provide us the duration so
- 17:39:36function hash duration require four
- 17:39:39argument the first argument is day and
- 17:39:42that is what is most important for us so
- 17:39:44one day 0 hours 0 minutes and 0 seconds
- 17:39:48and now we are done this is the last
- 17:39:50step in our course so copy this and
- 17:39:53return it using the in so inore date is
- 17:39:56going to return return the list of dates
- 17:39:58let's click on the create to complete
- 17:40:01this query now we got the required list
- 17:40:04of date we can scroll and check it out
- 17:40:06all the dates are available here we can
- 17:40:09sort it descending to see what is the
- 17:40:12end date which we wanted but every time
- 17:40:15we do anything it adds an step as we
- 17:40:18don't need this step app I'm going to
- 17:40:20remove it by pressing on the cross
- 17:40:22button let's convert this list into the
- 17:40:24table so right click Advan editor and
- 17:40:27then we will enter here underscore date
- 17:40:31table was the last step it was giving
- 17:40:34error means last step was not closed so
- 17:40:37now let's use table from list
- 17:40:40function what I've done is actually
- 17:40:42copied it from the last one so table
- 17:40:44from list now last step is dates list of
- 17:40:47dates which I need list of dates then
- 17:40:51splitter do split by nothing that's
- 17:40:53because we don't want to split null null
- 17:40:55extra values. error there the argument
- 17:40:57which need the main argument is list and
- 17:40:59then splitter. split by nothing there is
- 17:41:02a way we need to split this list we want
- 17:41:04to give that we can use but here we
- 17:41:05don't want to by anything we are giving
- 17:41:08other two arguments we are giving
- 17:41:09nothing and then exra value error and
- 17:41:12let's return this now if I still return
- 17:41:14the date it will not convert it into a
- 17:41:16table let date table click on create few
- 17:41:19things we have to change so first of all
- 17:41:21using the left top Corner change the
- 17:41:24data type to date so data type of this
- 17:41:27column should be date so let's convert
- 17:41:29that into date now double click inside
- 17:41:31the column to rename it rename it to
- 17:41:34date date table required many columns
- 17:41:37which I'm going to add now one by one to
- 17:41:40do that we can use the add colum tab
- 17:41:44inside the add column we have custom
- 17:41:46column that I'm going to use again and
- 17:41:49again to add new columns whenever I need
- 17:41:52a new column in this table so let me add
- 17:41:56the First Column by clicking on custom
- 17:41:59column the column I want to add is start
- 17:42:02of month means I want to get the first
- 17:42:04date of the month we have a function
- 17:42:07available for that the function is date
- 17:42:10do start of month and this function
- 17:42:15start of month require only one argument
- 17:42:19that is date and based on that it can
- 17:42:22give us the start date of the month one
- 17:42:26argument is needed to give us the start
- 17:42:29of the month or the first date of the
- 17:42:31month let's press okay so we got a new
- 17:42:34column start of month which is giving us
- 17:42:36the first date of the month we need to
- 17:42:39correct the data type of this so we can
- 17:42:41add the third argument to the add column
- 17:42:44and there we can use date. type it
- 17:42:47requires a type to convert it into the
- 17:42:50correct type and let's press enter to
- 17:42:52get the correct data type let's quickly
- 17:42:55add one more column and the column this
- 17:42:57time I would like to add is end of month
- 17:43:00I want to get the last date of the month
- 17:43:03very simple function date dot end of
- 17:43:08month which requires only one argument
- 17:43:12that is date which I'm going to provide
- 17:43:14it close the parenthesis and now I can
- 17:43:17get end of month date let's press okay
- 17:43:20to get it the data type of this column
- 17:43:23is also not correct and as you know we
- 17:43:26need to add the third argument let me
- 17:43:28copy it from the previous column and add
- 17:43:31it as the third argument comma date.
- 17:43:34type to get the correct data type so
- 17:43:37data type is corrected time has come to
- 17:43:39add more columns add the new column and
- 17:43:42the new column is start of quarter means
- 17:43:45the first date of quarter is what we
- 17:43:47need here so function we are going to
- 17:43:49use is date dot start of quarter very
- 17:43:53simple function it also required only
- 17:43:55one argument at that argument is date so
- 17:43:59we'll provide the date argument close
- 17:44:01the parenthesis and this function will
- 17:44:03going to give us the start of the
- 17:44:05quarter date click on done to get the
- 17:44:09new column the new column is the start
- 17:44:11of the quarter date and now I would like
- 17:44:14to add one more column and the column
- 17:44:17will be end of quarter means the last
- 17:44:20date of quarter let's quickly add a new
- 17:44:23column end of qtr means end of quarter
- 17:44:27and we are going to use a function date
- 17:44:30do and of quarter again this function
- 17:44:33require only one argument and that
- 17:44:36argument is date so let's provide the
- 17:44:38date argument and click on okay to get
- 17:44:41the new column so now let's look at the
- 17:44:44data look at the very first row we are
- 17:44:46getting the start of the month and end
- 17:44:49of the month start of the quarter and
- 17:44:51end of the quarter for that particular
- 17:44:53given date we scroll down go to another
- 17:44:56month we are getting different start of
- 17:44:58the month and end of the month but as of
- 17:45:00now we are getting the same quarter
- 17:45:02start date and same quarter end date if
- 17:45:04we scroll down further till the April
- 17:45:06month we will be able to see a different
- 17:45:10start of the quarter and end of the
- 17:45:12quarter so for the two dayses you can
- 17:45:14compare the quarter is also changing
- 17:45:17let's go ahead and add start start of
- 17:45:19year and end of year so first I'm going
- 17:45:21to add start of year and the function
- 17:45:24I'm going to use for that is date dot
- 17:45:28start of year unlike the Dex function
- 17:45:32which can take a second argument for the
- 17:45:34financial start date the date do start
- 17:45:37of year function only takes one argument
- 17:45:40that is date and it always give you the
- 17:45:42calender year start date it doesn't take
- 17:45:45the second argument let's press okay to
- 17:45:48get the new column you can scroll and
- 17:45:52validate the different ears which you
- 17:45:54have got but the easier way is the click
- 17:45:56on the down arrow and see all the values
- 17:45:59you can use press cancel to come out
- 17:46:01let's add one more column and this time
- 17:46:03we are going to add end of year the
- 17:46:07function which I'm going use here is
- 17:46:09date do end of year so date do start off
- 17:46:13here I copied I'm going to change it to
- 17:46:15end again this function also take only
- 17:46:18one argument
- 17:46:19it doesn't take end of year
- 17:46:21argument so let's press okay to complete
- 17:46:25what end of year you can just click on
- 17:46:27the values and use load more all the end
- 17:46:30of
- 17:46:30year uh for financial year we have to
- 17:46:33write down a manual code so can write
- 17:46:35down final code so I will tell you how
- 17:46:37to write down FY start want a financial
- 17:46:40year that starts in April what does that
- 17:46:42mean that means that if the date of the
- 17:46:45month is less than four than the year is
- 17:46:48started in the last year otherwise the
- 17:46:50year has started in the current year and
- 17:46:53I'm going to use all these things inside
- 17:46:55the hash J function so in the first
- 17:46:58argument I will have the logic for the
- 17:47:00year the second argument would be month
- 17:47:02which is four and the third argument day
- 17:47:04which is one this means any date between
- 17:47:071st April and 31st March of the next
- 17:47:10year will have the same start date of
- 17:47:13first April of this year so let's start
- 17:47:17coding the formula with if now after if
- 17:47:19we don't record parenthesis date the
- 17:47:22month I want a financial year which
- 17:47:24start from April so if it is less than
- 17:47:26four it means the year was started in
- 17:47:28the last year then my year started in
- 17:47:30the last year isn't it so date do year
- 17:47:34of date only one argument it takes is
- 17:47:36minus one as the date of year is the
- 17:47:40date of year so if it is four months and
- 17:47:41above it is the same year where the year
- 17:47:44started only year logic how would I
- 17:47:46convert this into date for that I'm
- 17:47:48going to use the hash date function in
- 17:47:52hash date the first argument is here
- 17:47:54which we already sorted out form of four
- 17:47:56fora one and we copy this and click on
- 17:48:00okay now you got the year which is
- 17:48:03starting Financial year how do you get
- 17:48:05the end it almost similar formula go to
- 17:48:07the custom column and
- 17:48:11FY and date of the same formula but the
- 17:48:15thing here is here if it is less than
- 17:48:17four it is ending in the same year but
- 17:48:20if it is greater than four or greater
- 17:48:22than or equal to 4 + 1 it is going to
- 17:48:25end in the next year and that is not 41
- 17:48:27it is 331 so it is going to end in the
- 17:48:31next year if it is 4 month or onwards if
- 17:48:33it's April which is my start of year I'm
- 17:48:35going get my financial year end in the
- 17:48:36next year March before April whatever
- 17:48:39months are there they are ending in the
- 17:48:40this year only March of this year let's
- 17:48:44click on okay to get the new column time
- 17:48:47to focus on we columns we will create
- 17:48:50start of week and for that we also have
- 17:48:52a function let's start with a new column
- 17:48:55start of week and we are going to use a
- 17:48:59date function date do start of week it
- 17:49:04takes two argument the first argument it
- 17:49:07takes is a date column and the second
- 17:49:11argument is how do you want to start
- 17:49:14your week zero means Sunday one means
- 17:49:17Monday and so on
- 17:49:19click on okay to add the column so you
- 17:49:21got the Sunday as the starting point
- 17:49:25let's do Monday because first January
- 17:49:272018 is a Monday and when we go give one
- 17:49:30it's for a Monday start I would like to
- 17:49:32add another column and this colum should
- 17:49:35provide me a week day number so let's
- 17:49:38add a column and this column I'm going
- 17:49:40to rename as day of week I'm going to
- 17:49:44use the function date. day of week week
- 17:49:49and this function can take up to two
- 17:49:52argument the first argument it take is a
- 17:49:56date as of now let me create this column
- 17:49:59with only one argument so it is giving
- 17:50:01me the values one means Monday and zero
- 17:50:05means Sunday if needed I can go ahead
- 17:50:08and change this by providing the
- 17:50:11additional argument into this function
- 17:50:15so it wrs as zero as Sunday one as
- 17:50:17Monday and if you don't want you can
- 17:50:20actually go ahead and change it by
- 17:50:21providing another argument but I think
- 17:50:23we have find it with that but what we
- 17:50:25can do is we can gave the names also so
- 17:50:27there is a function to get the name also
- 17:50:30we'll go to add columns custom column
- 17:50:33just create the column weekday name this
- 17:50:37column is going to return us weekday
- 17:50:40name the function which we are going to
- 17:50:43use is date dot day of week name and day
- 17:50:50of week name function takes one argument
- 17:50:54that is date and using this argument it
- 17:50:57is going to return the weekday name so
- 17:51:00let's click on okay and now we are
- 17:51:03getting the weekday name like Monday
- 17:51:04Tuesday Wednesday and as you can see 1st
- 17:51:07January 2018 is starting from Monday
- 17:51:11same way end of week is also very simple
- 17:51:13so let's add a new custom column for end
- 17:51:16of week add column custom column and
- 17:51:20let's rename this column as end of week
- 17:51:23and the function which we are going to
- 17:51:25use for this is date dot end of week and
- 17:51:32this function can also take two argument
- 17:51:35the first argument is date comma the
- 17:51:38second argument is one means the week
- 17:51:40will start on Monday and end on Sunday
- 17:51:43so it is ending on the Sunday the 7th
- 17:51:46January this means we have having a week
- 17:51:50from Monday to Sunday this was little
- 17:51:53difficult in Dex sometime back but now
- 17:51:55we have arguments which is making it
- 17:51:58simple index
- 17:52:00also now we are all sorted on the start
- 17:52:03dates and end date of month quarter and
- 17:52:06year as well as week time has come that
- 17:52:09we start creating the formatted column
- 17:52:11and I'm going to start with a column
- 17:52:13which is going to give me month year in
- 17:52:15the text format so month year
- 17:52:18and I'm going to use date dot two text
- 17:52:24function and it can take two arguments
- 17:52:26the first argument is date and the
- 17:52:29second argument is the format and here
- 17:52:31the format is going to be mmm in capital
- 17:52:343M and then 4 y y y y y this is going to
- 17:52:39give me a format like J hyphen
- 17:52:422018 so let me click on okay and we got
- 17:52:46January February March April this will
- 17:52:48lot sort because as we know we need a
- 17:52:50sort column if you have a month year in
- 17:52:53a format gen from March it doesn't
- 17:52:55understand that so we always need
- 17:52:57sortable format so we'll go to the
- 17:52:58custom column again we month year sort
- 17:53:00also so month year sort how do we get
- 17:53:05that now we need date do year we'll get
- 17:53:08the year of the date we multiply it by
- 17:53:11100 to that we add date dot month again
- 17:53:15this one takes one argument that is date
- 17:53:18and it's going to provide me the month
- 17:53:20number this combination is going to
- 17:53:22create a sortable month year which can
- 17:53:25be used as a sort column for the month
- 17:53:28year name which is in text format the
- 17:53:31same manner you can also add the quarter
- 17:53:33details using the functions available
- 17:53:36for the quarter in power query so you
- 17:53:40have seen you know how easy it is also
- 17:53:43in power query if you know these date
- 17:53:45functions you can simply go ahead and
- 17:53:47create it table now there are many other
- 17:53:50things which are available in date
- 17:53:52functions like is current day is current
- 17:53:54month is current quarter and those can
- 17:53:56help you in creating this quarter this
- 17:53:59month this year those help you to create
- 17:54:02the columns which help you in defaulting
- 17:54:05the current month qur quarter and
- 17:54:07current year into the slicer now you
- 17:54:11have learned some basic date functions
- 17:54:13using which you can create the date
- 17:54:15table but the date function does not
- 17:54:18stop top here power query provides you a
- 17:54:21lot of date functions which you can use
- 17:54:23to enrich your date table and do many
- 17:54:26other operations which are required I
- 17:54:28have discussed quite few of them on my
- 17:54:31channel in different different videos so
- 17:54:34you can go ahead and watch those videos
- 17:54:37and enhance your skills around the date
- 17:54:40functions and solve many other power
- 17:54:42query problems using the date functions
- 17:54:46we had a lot of formulas with deck and
- 17:54:48one of the things which we have
- 17:54:49discussed in the past is there are
- 17:54:50scenarios where you will not be able to
- 17:54:53achieve few things using the connected
- 17:54:54table especially when you want to go
- 17:54:57beyond the boundary of what you have
- 17:54:58selected what happens in case of power
- 17:55:02ba what you selected becomes your
- 17:55:03boundary these if you have filtered
- 17:55:05something from slicer or filter that's
- 17:55:07your boundary and you are not able to go
- 17:55:09beyond that boundary within that
- 17:55:11boundary you can get all the value so
- 17:55:12let's say if I select a month I can't
- 17:55:14get 12 months as a trend I can get
- 17:55:17within the same month the 12 month value
- 17:55:18but I can't get a TR of a 12 month so
- 17:55:20how to handle that now to handle that we
- 17:55:23have something known as disconnected
- 17:55:24table now the disconnected table can
- 17:55:26give you a solution and also the table
- 17:55:28with the inactive joint can also give
- 17:55:30you a solution so there are two ways you
- 17:55:31can achieve this problem one where the
- 17:55:35slicer is on disconnected table and
- 17:55:37second where the AIS or the group by is
- 17:55:39on on a table which is disconnected or a
- 17:55:42table which is joined on an inactive
- 17:55:43joint means definitely you require two
- 17:55:45tables in a scenario so what I've done
- 17:55:47here is basically to do this I would use
- 17:55:50this file which we are using in end to
- 17:55:52end and the 12r with visual calculation
- 17:55:55is something which I want to use now in
- 17:55:57this model if you remember we have
- 17:55:59connected our date table the date table
- 17:56:01is already connected with the sales
- 17:56:03table but date Auto is not connected and
- 17:56:05what I've also done here is in the date
- 17:56:07Auto I added the monthier column and
- 17:56:09monthier S column and I also sorted the
- 17:56:11month year correctly I made sure the
- 17:56:12monthier is sorted in the date table
- 17:56:14also because monthier is a text column
- 17:56:15the Sorting need to let me add a new
- 17:56:17page and tell you what I need is I'll
- 17:56:19take a slicer from month year I'll also
- 17:56:22create a visual on month year let me
- 17:56:24create a line visual on month year and
- 17:56:27let me bring a measure net now you can
- 17:56:30see I'm getting all the month if I go to
- 17:56:32the slicer and select any particular
- 17:56:34month let's say December 19 I'm not
- 17:56:35getting 12 months after November 19 I'm
- 17:56:37not getting 12 so you say okay why don't
- 17:56:39you go ahead and create the rolling
- 17:56:40formula you'll get it so let me do one
- 17:56:42thing I have already have a rolling
- 17:56:43formula so rolling two is there let me
- 17:56:46copy the rolling two and create it into
- 17:56:47rolling well for dates and period we
- 17:56:49have learned this in time intelligence
- 17:56:50how can we do that oh I have only two
- 17:56:52formula I copied that and let me past it
- 17:56:55into a new Maj and call it rolling 12
- 17:56:57and what I'm doing here is net dates in
- 17:57:00Period date of date the first argument
- 17:57:02Max date of date is the second argument
- 17:57:04from where should I start how many
- 17:57:05period I should go I'm saying minus 12
- 17:57:07because I'm starting with the Max 12
- 17:57:09months this is 12 months of formula
- 17:57:10rolling 12 but rolling 12 what it is
- 17:57:12going to do here is when I add it here
- 17:57:15it is not going to give me 12 months of
- 17:57:17track for that particular month it is
- 17:57:18going to give me 12 months of values and
- 17:57:20you as you can see this value is pretty
- 17:57:22high compared to n you might have
- 17:57:23understood it is summing up the past
- 17:57:25this is the 12 months of TR so one of
- 17:57:26the solution which we tell for this one
- 17:57:28is basic you don't have this slicer on
- 17:57:30the connected table so let me remove
- 17:57:33this you have this slicer or a
- 17:57:34disconnected table so disconnected or
- 17:57:36independent table we also call it
- 17:57:38sometime independent I'll go to the
- 17:57:39disconnected table date AO and in that
- 17:57:42auto I'll again bring in this slicer
- 17:57:44monthier and this monthier slicer let we
- 17:57:47select any value as of now when I select
- 17:57:49any value let's say December 2019 you
- 17:57:52don't see any impact because it is not
- 17:57:53connected with the table so it's not
- 17:57:55going to impact let me duplicate this
- 17:57:57visual let me remove the majors now what
- 17:58:00I want here is I want this lier to be
- 17:58:02considered by this visual but for that I
- 17:58:04need to create a new major so I'm going
- 17:58:06to click on new major from the Home tab
- 17:58:09and in this new major what I'm going to
- 17:58:11do is I'm going to consider the range of
- 17:58:13this slicer now this slicer is not
- 17:58:15connected so it's not going to impact so
- 17:58:17it's not going to restrict my date range
- 17:58:19because it is disconnected so I can take
- 17:58:21a date of reference from it and it is
- 17:58:23not going to restrict me 1 month or 2
- 17:58:25month or 12 months because it is not
- 17:58:27joined with my sales table so it is
- 17:58:28having no impact there so let me do one
- 17:58:30thing let me create a formula red 12 and
- 17:58:33first thing which I want to do is I want
- 17:58:34the date which has been selected here so
- 17:58:37beore max equals to Maxx all selected
- 17:58:41this is how we got the max date of date
- 17:58:43Auto table all selected date Auto and I
- 17:58:45need date of date Auto I get the date
- 17:58:47Auto date so I got this into a variable
- 17:58:49now what I'm going to do is based on
- 17:58:51this date I want to create 12 months Str
- 17:58:53so I need a state which is also a
- 17:58:55minimum date so I got a Max date how do
- 17:58:57I get minimum date EO month is a
- 17:58:59function EO month and I can take Max uh
- 17:59:031 minus one will take one month Backus
- 17:59:0512 minut should take me 12 months back
- 17:59:07and plus one it should give me 12 months
- 17:59:09of trend or so we got a minimum value we
- 17:59:11got a maximum value now this date range
- 17:59:13is having no impact on my calculations
- 17:59:15right now so what I want to do is return
- 17:59:17calculate net and remember there is no
- 17:59:19other filter required on the date table
- 17:59:21right now so we assume there is no
- 17:59:22filter and we don't need to ignore any
- 17:59:24filter right now so now what I will to
- 17:59:26do is I will push my fter on the date
- 17:59:27table date of date is greater than
- 17:59:30equals to underscore minimum and date of
- 17:59:34date is less than equals toore Max so
- 17:59:37date of date is greater than equal to
- 17:59:39Min and date of date is less than equal
- 17:59:41to and we are filtering we are not
- 17:59:42putting any all or something which is
- 17:59:44restricting so trend of 12 so let's get
- 17:59:46this trend of 12 I have pressed enter so
- 17:59:48that the formula get committed I could
- 17:59:50have also pressed the commit button so
- 17:59:52let me drag this trend 12 into the
- 17:59:54second visual now I'm getting a 12 month
- 17:59:57Str as you can see I'm getting a 12
- 17:59:58month Str this is going to work only
- 18:00:00when you filter from the Independent the
- 18:00:02moment you filter something from
- 18:00:04connected table it will not give you the
- 18:00:0512 months Trend but you always L us one
- 18:00:08challenge the rest of the visuals and
- 18:00:10the majors are getting filtered from the
- 18:00:12connected table and this one is only
- 18:00:14getting filtered from the disconnected
- 18:00:16table so it is really difficult to
- 18:00:18manage it on the page so how can we get
- 18:00:20it filtered from the connected
- 18:00:23table and if I make this in sync then
- 18:00:26this visual is not going to obey so then
- 18:00:27I will again have a problem so then how
- 18:00:29do we do that so to do that what we are
- 18:00:31going to do here is basically so we need
- 18:00:33to make sure that the slicer is on the
- 18:00:36connected table and axis is on the
- 18:00:39disconnected table right now it is
- 18:00:41reverse the slicer is on the
- 18:00:43disconnected and the AIS is on the
- 18:00:46connected table
- 18:00:48to make this happen we will add an
- 18:00:51additional inactive join in our data
- 18:00:53model so let me do one thing let me join
- 18:00:56the sales date of the date table with
- 18:00:58the date Auto and this will to create a
- 18:01:00join we are going to create a single
- 18:01:02directional join the date table many to
- 18:01:04one join with the Dat Auto table but
- 18:01:06that is
- 18:01:08inactive there is a join but that join
- 18:01:10is not filtering right now that was the
- 18:01:12inactive join means and it should be
- 18:01:14shown as dotted dotted means the join is
- 18:01:17inactive
- 18:01:18now we come back we don't see any issues
- 18:01:20so it means that I can keep my
- 18:01:23disconnected table with an inactive join
- 18:01:26also now what we want we want this
- 18:01:28slicer the above slicer the month year
- 18:01:30slicer to work and to just to understand
- 18:01:34this better let me go back to the date
- 18:01:36Auto and rename this column month year
- 18:01:40indd double click rename and enter let
- 18:01:42me come back to the realation so right
- 18:01:44now things are working let's rename the
- 18:01:46page as disconnect Ed slicer as we are
- 18:01:49using a disconnected slicer here and Poe
- 18:01:52that I'll duplicate a page to take the
- 18:01:54next case so now we have disconnected
- 18:01:58slicer page on which the disconnected
- 18:02:00slicer is working let's duplicate this
- 18:02:02and now we want the connected slicer now
- 18:02:04we don't want disconnected slicer so
- 18:02:06what I want here is basically on this
- 18:02:08page a connected date slicer I don't
- 18:02:10want disconnected date slicer so I can
- 18:02:12delete it and only keep the connected
- 18:02:14one okay so what I'm going to do is
- 18:02:15because you want a connected slicer and
- 18:02:17in the connected slicer you SEL let's
- 18:02:19say November and you need a 12 months of
- 18:02:21trend which is not coming on the visual
- 18:02:23let me first of all remove this major
- 18:02:24and also remove this AIS now what I'm
- 18:02:27going to do is I'm going to bring this
- 18:02:28AIS from the Independent table so
- 18:02:30monthier independ now when I bring this
- 18:02:32AIS from the Independent table and let's
- 18:02:34say if I try to bring in net the major
- 18:02:36which we have here on the y- axis you
- 18:02:39see a flat line the reason for that
- 18:02:40because joinor is not going to work so
- 18:02:43now let's we do go ahead and create one
- 18:02:46more measure from the home t I'm going
- 18:02:48to create one more major very similar to
- 18:02:50what we have created few minutes back
- 18:02:52but this time we are going to calculate
- 18:02:55our date ranges based on the connected
- 18:02:58date table not based on the disconnected
- 18:03:00date
- 18:03:02table I'm going to create friend well
- 18:03:05disconnected the AIS is disconnected let
- 18:03:07me be very clear on that now again I'm
- 18:03:09going to create variable Max and the
- 18:03:12variable Max is going to be Max X all
- 18:03:15selected date date of date I'm going to
- 18:03:20again have a variable where underscore
- 18:03:22Min and Min is going to be EO month
- 18:03:25uncore Max -2 + 1 return I going to
- 18:03:31return I'll use calculate net how I want
- 18:03:34to filter filter let me filter date Auto
- 18:03:38date Autos date of date is less than
- 18:03:42equals to underscore Max and dat autos
- 18:03:47date should be greater than equal to
- 18:03:49underscore Min let's try this out there
- 18:03:52is still one problem you might have
- 18:03:53identified that where is the joint
- 18:03:55disconnected isn't it so date Autos date
- 18:03:57of date is less than equal to Max and N
- 18:04:00double M perc date of Auto is greater
- 18:04:03than equal to minimum okay let's Commit
- 18:04:05This formula and let's bring this inside
- 18:04:08the visualization now still it is giving
- 18:04:10us a flat line how to get rid of that
- 18:04:12Flat Line we have not activated the
- 18:04:15relationship so that it can work on the
- 18:04:17axis so let's try to use use
- 18:04:19relationship use relationship is a
- 18:04:21function which can help us in activating
- 18:04:24an inactive relationship so let's take
- 18:04:26use relationship the table date Autos
- 18:04:29date date Autos date with the sales date
- 18:04:33of sales table should get activated we
- 18:04:36are asking it to activate the
- 18:04:38relationship now and the moment we do we
- 18:04:40are seeing only one dot why so this
- 18:04:43formula needs modification the what
- 18:04:45modification this formula need is that
- 18:04:47this date table is still need to give me
- 18:04:49the 12 months of value the date table is
- 18:04:50still giving me one month of value so
- 18:04:52there is no benefit of you know putting
- 18:04:54this used relationship in action what I
- 18:04:56need here is basically rolling 12 months
- 18:04:59when I rolling 12 months do I really
- 18:05:00need because now I'm getting 12 months
- 18:05:02of data do I need need this filter so
- 18:05:03let's check it out without this filter
- 18:05:06so now we have a rolling 12 which is
- 18:05:07based on 12 months of rolling and then
- 18:05:09we are saying activate the relationship
- 18:05:11of independent table and now if you can
- 18:05:14see we are getting the 12 months of data
- 18:05:16let's move it to December and we are
- 18:05:18getting data of December let's move it
- 18:05:20to August September we have data from
- 18:05:23October so as now you can see the AIS
- 18:05:26which is coming from disconnected or
- 18:05:28independent table is getting so you need
- 18:05:30a rolling formula now that rolling
- 18:05:31formula you just create a use
- 18:05:33relationship with a disconnected table
- 18:05:35and use that disconnected table on the
- 18:05:37axis and then you can have the
- 18:05:39relationship so disconnected is
- 18:05:40basically inative disconnected it's not
- 18:05:42completely disconnected so inactive
- 18:05:44disconnected table you activate that
- 18:05:46relationship and then your rolling will
- 18:05:48become your 12 months of trend and in
- 18:05:50this case what would happen basically is
- 18:05:52that you have the exis which is on
- 18:05:54disconnected table so it is your same
- 18:05:56slicer your connected slicer or your
- 18:05:59joined table slicer which is working so
- 18:06:01you don't have to change everything on
- 18:06:03your page you order to create many major
- 18:06:04it is only for the visual where you need
- 18:06:07this 12 months you can use the
- 18:06:08disconnected or the independent table in
- 18:06:11the axis with with such a small formula
- 18:06:14and this formula is going to help you
- 18:06:15out just to compare the the values of
- 18:06:18the September it is 245k and the value
- 18:06:21of September is 245k the numbers are
- 18:06:23matching it means it is displaying the
- 18:06:25correct values so you can go ahead and
- 18:06:27try this out and there are different
- 18:06:28permutations and combination which are
- 18:06:30possible because of disconnected tables
- 18:06:33like accept is one of them whenever we
- 18:06:36have a value and we don't want to use
- 18:06:38that value want values other than that
- 18:06:40there are so many use cases around that
- 18:06:42which can be done because of this
- 18:06:44disconnected or independent table you
- 18:06:45can watch all of those in the previous
- 18:06:48video of the channel just search for
- 18:06:49independent or disconnected keywords on
- 18:06:51the Channel videos and you will get the
- 18:06:53list of the videos which are talking
- 18:06:56about disconnected table or independent
- 18:06:58table how can we convert a single table
- 18:07:02into a star schema now this single table
- 18:07:04is the very common file which is
- 18:07:06available on my GitHub account which is
- 18:07:08beginner tutorial series file which I
- 18:07:11also used in my beginner tutorial this
- 18:07:13is the retail file which is having the
- 18:07:16entire data in one single file and you
- 18:07:18wanted to know how can we convert into a
- 18:07:21star scha in this video what I'm going
- 18:07:23to do is I'm going to give you the video
- 18:07:25which I've recorded for that particular
- 18:07:28Series so that you can take the
- 18:07:29advantage here also on the YouTube the
- 18:07:32purpose of this video is to convert the
- 18:07:35single file into a star schema so first
- 18:07:38of all Let Me Explain you that Excel
- 18:07:40file which we have so this is the file
- 18:07:43which is known as retail data on
- 18:07:45beginner tutorial file this file
- 18:07:47contains order ID order number order
- 18:07:49date which are the order attributes then
- 18:07:52it has a dimension which is a part of
- 18:07:54this table only which is item id item
- 18:07:56number category subcategory sub
- 18:07:58subcategory and brand then I have unit
- 18:08:00price which is the sales price quantity
- 18:08:03how much we have sold discount
- 18:08:05percentage it is actual discount
- 18:08:06percentage so we don't have to divide it
- 18:08:09by 100 then we have gross sales discount
- 18:08:12net sales which is known as sales unit
- 18:08:14cost the cost which you are paying for
- 18:08:16this item then we have requested date
- 18:08:19delivery date this also contain the
- 18:08:21geography item attribute which is city
- 18:08:23state region and location ID but not all
- 18:08:25four can be a part of a single Dimension
- 18:08:28it also have some single column
- 18:08:29Dimensions like order type payment
- 18:08:31method and customer ID so using this
- 18:08:34single Excel sheet we can do the
- 18:08:36complete analysis on powerbi but we know
- 18:08:39the star schema works best on powerbi so
- 18:08:42what we are going to do is we are going
- 18:08:43to convert this single file into a star
- 18:08:46schema and I'm going to Showcase you all
- 18:08:49the steps for that what we have done so
- 18:08:52far is we have learned some basic power
- 18:08:54query transformation now time has come
- 18:08:56that we apply those transformation onto
- 18:08:59a data set and this data set is
- 18:09:02basically a single table and this single
- 18:09:05table we wanted to break into a star
- 18:09:07schema so how to do the various
- 18:09:10transformation to convert this table
- 18:09:12into a star
- 18:09:13schema and to do that what I'm going to
- 18:09:16do is I'm going to go back to the GitHub
- 18:09:19and from the GitHub I'm going to take
- 18:09:20this file for Winer tutorial series
- 18:09:23youtube. XLS again I already opened that
- 18:09:26file and I'm now going to right click on
- 18:09:28the raw copy link I'll take this link
- 18:09:30and I'll go back to Power VI power ba I
- 18:09:34click on get data web H this URL click
- 18:09:38on okay it will show me only one sheet
- 18:09:41and I'm going to pick up that particular
- 18:09:42sheet and after that I will click on
- 18:09:44transform data this will open the data
- 18:09:47onto the power query mode and we can
- 18:09:49directly transform it without loading it
- 18:09:52this data is a very special data because
- 18:09:54all the attributes whether they
- 18:09:56Dimension or measures are available in
- 18:09:58one single table I want to create fact
- 18:10:02and dimension out of this single table
- 18:10:04I'll tell you what all this table
- 18:10:06contains this particular data is having
- 18:10:08order ID order date item id category
- 18:10:11subcategory sub subcategory brand unit
- 18:10:13price quantity discount percentage unit
- 18:10:16cost
- 18:10:17state region location ID order type
- 18:10:20payment me and customer I want to create
- 18:10:22multiple Dimension tables out of it but
- 18:10:25how can I do that what happens when I
- 18:10:27want to create a dimension on a single
- 18:10:29stuff like order type or payment method
- 18:10:32then I do have options like you know add
- 18:10:33as a new query or a single column but I
- 18:10:36do not have similar option for multiple
- 18:10:38columns for that we need to explore the
- 18:10:41option of duplicating the table to do
- 18:10:43that I can right click on the sheet and
- 18:10:46I have two option duplic D at and
- 18:10:47reference duplicate will duplicate and
- 18:10:49it will take whatever steps have been
- 18:10:51performed till now it is just duplicate
- 18:10:53this code and after that there is no
- 18:10:55connection between the two table but
- 18:10:57what would happen in case of reference
- 18:10:58it's going to create a reference but it
- 18:11:00will add the reference to this table
- 18:11:01which sheet one whatever it is the
- 18:11:03advantage of referen is to not the data
- 18:11:05for once and then it's going to process
- 18:11:07rest of the things but in case of toate
- 18:11:09because it's going to not the data again
- 18:11:10and again so every time you take it it
- 18:11:12will lower the data for all the
- 18:11:14duplication you have created so if you
- 18:11:15have created four duplicated is going to
- 18:11:17load the data four times let me show you
- 18:11:20what happens when I created a duplicate
- 18:11:21copy so if you see the duplicate copy if
- 18:11:23you see in the sheet one look at the
- 18:11:25steps in the sheet one and go and look
- 18:11:27at the steps in the sheet two also they
- 18:11:29are save and if you click in the source
- 18:11:30you will see it is getting data from the
- 18:11:32same place but now if I right click and
- 18:11:35use reference you will see that it is
- 18:11:37reference in the sheet one but the
- 18:11:39disadvantage with that is if I go ahead
- 18:11:40and do let's say one operation here
- 18:11:42let's say if I go back and create the
- 18:11:44gross column which we always creating so
- 18:11:46I go and create a custom column and let
- 18:11:49me call it as gross amount for this
- 18:11:52gross amount equals quantity multiply by
- 18:11:56unit price click on okay to add gross
- 18:11:58mode is available here in the sheet one
- 18:12:00but if I go to sheet three and you
- 18:12:02scroll you also see gross am it's a
- 18:12:04reference table it's going to get
- 18:12:05everything so to avoid this what I'm
- 18:12:07going to do is I'm not going to do
- 18:12:09anything with the sheet one so let me
- 18:12:11delete whatever I've
- 18:12:14created so I'm deleting the queries I go
- 18:12:17to the sheet one I'll also delete the
- 18:12:18edit column let me rename it as sales
- 18:12:21undor base I'm not going to do anything
- 18:12:24with this table I want to create item
- 18:12:26table so but for that what I'm going to
- 18:12:27do is I need this field item category
- 18:12:30subcategory sub subcategory and brand
- 18:12:31that constitute my item table what I'm
- 18:12:33going to do is I'm going to cck a
- 18:12:35reference table our reference table is
- 18:12:37created now let me rename it as item
- 18:12:39item query has been created which is
- 18:12:41going to become item table I'll select
- 18:12:43item id category id subcategory id sub
- 18:12:45category ID and BR if and click all
- 18:12:48these columns are selected I'll right
- 18:12:50click and I'll use remove other columns
- 18:12:52remove whatever other columns are there
- 18:12:54other than what I've selected po that I
- 18:12:56click on Item ID or I click here on the
- 18:12:58corner and after that I can use remove
- 18:13:02duplicates now it will remove duplicates
- 18:13:04for the table and now I need to check
- 18:13:06here is am I getting the listing item
- 18:13:09IDs or not because if Item ID is not
- 18:13:10disting then it's not going to become my
- 18:13:12primary key so what I'm going to do here
- 18:13:14is I'll go here to The View and here let
- 18:13:16me add colum distribution and you see
- 18:13:19thousand distinct and th unique let me
- 18:13:22click on the bottom and use entire data
- 18:13:24set and you can see 264 264 is unique
- 18:13:28and distinct it means Item ID is my
- 18:13:30primary key or unique key I don't need
- 18:13:33index column for uniqueness I can use
- 18:13:36item ID to join with my fact table let's
- 18:13:39add another dimension now again I go
- 18:13:41back I duplicate this using reference
- 18:13:43and let me call it as geography and inph
- 18:13:47I want to bring the column city state
- 18:13:49region and location I selected all of
- 18:13:51them right click remove other column I
- 18:13:54click on the top col and I'll use the
- 18:13:56option R duplicates and let's wait for
- 18:13:59the location ID stats here you see there
- 18:14:02is a problem and the problem is see
- 18:14:04there are only 75 unique but there are
- 18:14:06299 distinct it means not a primary the
- 18:14:08cities are 71 unique there is some
- 18:14:11problem and the problem is caused by the
- 18:14:13region column it is not allowing us to
- 18:14:15get the location as unique column let's
- 18:14:18go to the remove other columns Tab and
- 18:14:20from there we will remove region as a
- 18:14:23column and once we remove this region as
- 18:14:25a column we can press enter and check
- 18:14:27for the results and once we go to the
- 18:14:30remove duplicate step we will see that
- 18:14:33now location ID will become a primary
- 18:14:36key or a unique key and now you can see
- 18:14:38299 distinct and 299 unique it means
- 18:14:41location ID can be used as a primary key
- 18:14:43or unique key and it can also be used as
- 18:14:46a joint column to join with the fact
- 18:14:48table two Dimension tables are done and
- 18:14:52now I can go back and look at the data
- 18:14:54now I'm not B bothered about order ID
- 18:14:56and Order date but I would like to
- 18:14:58create some single column Dimension so
- 18:15:01let's go ahead I'll tell you how to
- 18:15:02create dimension for order type and
- 18:15:04payment method for order type and
- 18:15:06payment method now these tables don't
- 18:15:08have their own IDs also so I need ID ALS
- 18:15:10and region also one of the contender is
- 18:15:12region so right click on this add add as
- 18:15:14a new query now again when I add as a
- 18:15:16new quer query is going to take all
- 18:15:18these steps so this is what I don't want
- 18:15:20I don't want this this is one of the
- 18:15:22best method to do it but again you see
- 18:15:24that all the steps are repeating this is
- 18:15:25what we don't want so we go ahead and
- 18:15:28remove this and instead of that we will
- 18:15:30only go to the reference and there we'll
- 18:15:33select one column let's say region in
- 18:15:35this case remove other columns and then
- 18:15:37simply because it's only one column we
- 18:15:39can remove duplicates by clicking on the
- 18:15:41column duplicates are removed now here I
- 18:15:44want to have an ID column and that idid
- 18:15:46column I again want back in my fact
- 18:15:49table when I going to create a fact so
- 18:15:51what I'm going to do for that so I'm
- 18:15:53going to add index column go to add
- 18:15:55column and there index column starting
- 18:15:58from one I added an index the same
- 18:15:59exercise I need to repeat for order type
- 18:16:01and payment method but right now I'll
- 18:16:03just keep it till this example let me
- 18:16:05call this table as region so now what I
- 18:16:07wanted to do is now this region has a
- 18:16:09new ID and I would like populating back
- 18:16:11and then I'll get the payment ID then
- 18:16:13I'll get the order type ID I would like
- 18:16:15to populate those all let let's start
- 18:16:17working on the fat table so first of all
- 18:16:19let's go to the sales base you click on
- 18:16:21the sales base you go to the Home tab
- 18:16:24you'll use much queries much queries is
- 18:16:26new and I'm going to create a fact table
- 18:16:27now and here I'm going to join with the
- 18:16:29region base join would be the region
- 18:16:31column region to region it would be a
- 18:16:33left outer joint always prefer outer
- 18:16:35joint in the favor of the base table
- 18:16:37ideally it should match everything
- 18:16:39unless we have null values so let me go
- 18:16:41ahead and click on okay now when you
- 18:16:43scroll on the right you see there is a
- 18:16:45table now expand that uncheck this use
- 18:16:48original column and we should have
- 18:16:49renamed this index column we have not
- 18:16:51renamed so we are going to rename it
- 18:16:52here now so let me add this index column
- 18:16:54and let me call this index column as
- 18:16:56region ID now this I can use to join
- 18:16:59back with my region table I will go back
- 18:17:02into the region table and also try to
- 18:17:04rename index as region ID now once I
- 18:17:06rename it as a region ID the step which
- 18:17:08you have already added into the merge
- 18:17:10table might not work as expected so we
- 18:17:13might have to edit the merge step I
- 18:17:16click on the setting and I replace it
- 18:17:17with region ID it is giving me a
- 18:17:19question mark so I don't want that
- 18:17:20question mark to continue here and I'll
- 18:17:22delete this rename column and now you
- 18:17:24can see the question mark has been
- 18:17:25removed I got the correct name region ID
- 18:17:27now I would like to rename this merge
- 18:17:29one table as my sales fact table how do
- 18:17:32I add the other things let's say if I
- 18:17:34want to have payment how do I'm going to
- 18:17:35add the payment ID here am I going to
- 18:17:37create another version of this table or
- 18:17:38I'm going to merge with this so I'm
- 18:17:40going to merge with this so let's take
- 18:17:41one example I will go back to the sales
- 18:17:43based table right click and create one
- 18:17:46more reference of it you go to the
- 18:17:47payment method right click remove other
- 18:17:49columns then again right click remove
- 18:17:51duplicates then go to add columns add
- 18:17:54index column from one and let's call it
- 18:17:56payment method
- 18:17:58ID now I need this ID in my T fact
- 18:18:02before that let's call this table as
- 18:18:03payment method now we want to merch the
- 18:18:06payment method with sales fact so what
- 18:18:08we are going to do here is we'll click
- 18:18:10on the sales fact go to the one tab now
- 18:18:12instead of much queries is you I'm going
- 18:18:14to use merch queries inside the merch
- 18:18:16queries you we will bring in the payment
- 18:18:17method query also and we'll click on
- 18:18:20payment method payment method and this
- 18:18:22again is going to be left join click on
- 18:18:24okay scroll to the right now you can see
- 18:18:26payment method uh appearing as a column
- 18:18:29and the column C is table which we need
- 18:18:30to expand expand that we only need the
- 18:18:33payment method ID we're going to take
- 18:18:35that click on okay our fact is ready now
- 18:18:38our facts and dimensions are ready and
- 18:18:40I'm going to click on close and
- 18:18:42apply and it is evaluating all the
- 18:18:44tables so you can see it started on the
- 18:18:46query for sales base item geography
- 18:18:49rating connections loading data to the
- 18:18:51model and the sales base table is
- 18:18:53loading and respective other tables
- 18:18:56which are dependent on that are also
- 18:18:58getting the data the sales fact is still
- 18:19:00not loaded because it is dependent on
- 18:19:02all other tables like payment method
- 18:19:04region now it started loading and you
- 18:19:06might have seen that you know sales base
- 18:19:08is not moving at all and dependent fact
- 18:19:10table can load you might have also seen
- 18:19:12that other tables were not loading as
- 18:19:14many rows as the sales based table
- 18:19:17and this is the advantage of taking the
- 18:19:19reference now we'll go to the model view
- 18:19:21I would like to show you how to create a
- 18:19:23model in such scenario so because we
- 18:19:25have the setting of detecting the
- 18:19:27relationship it has detected the
- 18:19:28relationship but those relationships are
- 18:19:30not correct what I'm going to do here is
- 18:19:32I'm going to delete those relationships
- 18:19:34and going to create all the relationship
- 18:19:36again one thing which I'm also going to
- 18:19:38do here is I'm going to hide the sales
- 18:19:40base I don't want to see that table now
- 18:19:42I'm not needing that so I close the eye
- 18:19:45here so it will be hidden now sales fact
- 18:19:47is my main table payment method
- 18:19:49geography item are around it so how do
- 18:19:52we want to connect Item ID with item id
- 18:19:55where is our item table so item id Item
- 18:19:57ID on the item ID is is fact item id
- 18:20:00equal to item id many to one single
- 18:20:01directional join it is already
- 18:20:03suggesting that so let's do that then we
- 18:20:05will create region ID to region ID again
- 18:20:08man to one single directional then we
- 18:20:10have payment method payment method to
- 18:20:11payment method this should be one to
- 18:20:13many single Direction because we direct
- 18:20:15from the payment method site
- 18:20:17and now we want to connect with location
- 18:20:18ID so location ID to location ID one too
- 18:20:22many single directional click on save so
- 18:20:24now we got all of our joints sorted out
- 18:20:26this is the schema which has been
- 18:20:27created let's save this file so this is
- 18:20:30the star schema we have created from a
- 18:20:33single file and this is very similar to
- 18:20:36what we were creating using sales data
- 18:20:39used in video or sales data used in
- 18:20:41fabric file that was a perfect star
- 18:20:43schema and the four tables were given
- 18:20:46but here we have transformed to create a
- 18:20:48star schema it has almost similar kind
- 18:20:51of column the discount percentage here
- 18:20:52is actual discount percentage so you
- 18:20:54don't need to divide it by 100 you can
- 18:20:56create column in power query you can
- 18:20:57create column index you have the
- 18:20:59additional Dimension which are coming in
- 18:21:01order type customer you can also enhance
- 18:21:03those like in customer you can add the
- 18:21:06customer name as appending of customer
- 18:21:08ID like customer space the ID that what
- 18:21:11you can create either index or power
- 18:21:13these are few of the things which you
- 18:21:14can do and create the schema and try out
- 18:21:16everything which we have done during the
- 18:21:18this series or video and repeat that on
- 18:21:21this particular data model and this data
- 18:21:23is much better data and just to give an
- 18:21:25example in visualization if you go here
- 18:21:28and bring it from the item brand you see
- 18:21:30some of the actual brand names which has
- 18:21:33been created in this data and that is
- 18:21:35why I always say this data is much
- 18:21:37better data than the data which we have
- 18:21:39it do have lot of variety I do have a
- 18:21:41better version of this data which
- 18:21:42contain little bit of more data and for
- 18:21:44that you can ping me in the comments I
- 18:21:46can give you a Dropbox link from there
- 18:21:48you can take this file and load so this
- 18:21:50is the way you use the power query
- 18:21:52transformation to create a star schema
- 18:21:55we had one table and from there we
- 18:21:57created star schema there are scenarios
- 18:21:59where you might have a snowflake schema
- 18:22:01or a relational schema and from there
- 18:22:03also you can merge and create star
- 18:22:05schema so go ahead and try out those
- 18:22:06different combination in this video we
- 18:22:09are going to discuss how can you append
- 18:22:12all the Excel sheets available into one
- 18:22:14table so the case here is that I have
- 18:22:17Excel where I have multiple sheets and
- 18:22:19all these sheets I want to append into
- 18:22:21one single table even if a new sheet
- 18:22:24comes in I would like to put it into the
- 18:22:27same table now how to get data for this
- 18:22:30one so data for this example which I'm
- 18:22:33going to discuss is available at my
- 18:22:35GitHub account github.com Amit chander
- 18:22:38pv/ powerb you can get the upend sheet.
- 18:22:43XLS in this video I'm going to use the
- 18:22:46download version of this file but I have
- 18:22:48told you many times how can you directly
- 18:22:51connect to this Excel sheet without
- 18:22:53downloading it what you have to do is
- 18:22:55you to click on this upend sheet.
- 18:22:58XLS and I'm going to give this URL to
- 18:23:01you which is the raw URL not the on the
- 18:23:04top so I'm going to post the URL which
- 18:23:07is right click on this copy link address
- 18:23:10so in case you're directly reaching to
- 18:23:11my GitHub account you have to open this
- 18:23:14file and on the ra right click and copy
- 18:23:17the link and this is the link you can
- 18:23:19directly use as the web link in your
- 18:23:22powerb desktop or web API Link in that
- 18:23:26manner you will be able to directly get
- 18:23:28this data onto the powerbi without
- 18:23:30downloading it into your
- 18:23:32desktop so let's understand the use case
- 18:23:36with an example in the Excel sheet and
- 18:23:38then we will try it out on the powerbi
- 18:23:42desktop so basically what I have I have
- 18:23:44these three item sheet and I want to
- 18:23:46combine them and tomorrow there could be
- 18:23:48a fourth one and if there is a fourth
- 18:23:50one my requirement is that fourth one
- 18:23:52should also get combined so in this case
- 18:23:54what happen is if I try to get the
- 18:23:56append idea the normal append idea where
- 18:23:58I append the table how do I add the
- 18:23:59fourth table do I need to modify the
- 18:24:01code again and again so I need to have
- 18:24:03some generic solution which can actually
- 18:24:05help me so let's go and try out what
- 18:24:08actually we do in powerbi so I came to
- 18:24:11powerbi and powerbi what I would like to
- 18:24:13do is basically I want to import this
- 18:24:15exess sheet so in the center of the
- 18:24:16power VI screen I have this option
- 18:24:19import Excel I do have import Excel
- 18:24:21option here also in the Home tab and
- 18:24:23under the get data also again I will get
- 18:24:24it the option I will use this import
- 18:24:27option from the middle and select the
- 18:24:29sheet upend queries and click on open
- 18:24:32now once I do that I'll get all the
- 18:24:34sheets and what is the usual ways that
- 18:24:36click on all these three check check
- 18:24:38check so when you check you get the you
- 18:24:41are taking that inside the system and
- 18:24:43when you simply click you just R the
- 18:24:45data in instead of using the load data
- 18:24:48or load I'll use the transform data
- 18:24:50because I want to go to Power query and
- 18:24:51combine this data isn't it that's what I
- 18:24:53wanted so let me go to transform data if
- 18:24:55I go to transform data and what usual
- 18:24:58apparent method is there and let me
- 18:25:00bring the power query on this screen if
- 18:25:03I want to combine these three I need to
- 18:25:04take that usual append method isn't it
- 18:25:06so I need to go to you know append
- 18:25:08queries append queries as new or upend
- 18:25:11queries and then I need to say two or
- 18:25:13more table and then I say item two and
- 18:25:15item three
- 18:25:17I click on the ADD and I do that and it
- 18:25:20is going to append all three sheets SL
- 18:25:23queries into the item one query or table
- 18:25:27that's not something which I wanted
- 18:25:29because let's go ahead and add something
- 18:25:31here let's go ahead and add a new sheet
- 18:25:34here I also want the header so let me go
- 18:25:37back and take the row from the top and
- 18:25:40paste it here on this sheet now I have
- 18:25:42the header let me change the values 41
- 18:25:44to 56 and 40 47 to
- 18:25:4857 we can use this sheet let's keep
- 18:25:51everything as same now I got one
- 18:25:54additional sheet now if I go and refresh
- 18:25:57this
- 18:25:58data I don't get the sheet for so it
- 18:26:02means there is no benefit of this so let
- 18:26:04me do one thing let me discard all these
- 18:26:06changes and do it again so I discard all
- 18:26:09the
- 18:26:10changes I come out I say discard all the
- 18:26:12changes and I'll do it
- 18:26:14again and now also so what I need to do
- 18:26:16is I also need to delete the sheet let
- 18:26:18me delete this
- 18:26:20sheet and save it let me go back and
- 18:26:24import the upend sheets Excel workbook
- 18:26:27again and this time I'm only going to
- 18:26:30select item one and I'm going to leave
- 18:26:32out the other sheets with only sheet one
- 18:26:36I'll click on transform data to reach
- 18:26:39power query and start the transformation
- 18:26:42again because I press transform data I
- 18:26:44reach power query in power query I also
- 18:26:47remove these steps now you can observe
- 18:26:50that I'm seeing all the three sheets as
- 18:26:53my source and the data is available
- 18:26:56inside the data column if I go here you
- 18:26:58can see that I see a table and that the
- 18:27:00challenge with this table here is
- 18:27:02basically the headers are not
- 18:27:05promoted so I have the table which is
- 18:27:07having the data but headers are not
- 18:27:10promoted I can expand it I I can expand
- 18:27:12it here and you will be very happy to
- 18:27:14see that all the data is together but
- 18:27:15what is happening here is this headers
- 18:27:17are NSC then you will say okay we can
- 18:27:19search the column name and then they
- 18:27:21remove those rows and then do it but
- 18:27:23what happens sometime you might have a
- 18:27:25scenario where the column name which you
- 18:27:27are taking might also exist in data so
- 18:27:29for that what we are going to do is if
- 18:27:31you are follower of the beginner series
- 18:27:32you might have remembered we learned
- 18:27:34function promote
- 18:27:36headers and using that function promote
- 18:27:39header we can actually do a promote
- 18:27:41header in a table we are going to do is
- 18:27:43today we are going to use that power quy
- 18:27:45function so to do that what I'm going to
- 18:27:47do is I'm going to go to the add columns
- 18:27:49and I'm going to add a new column
- 18:27:52remember here my complete data is
- 18:27:54available as a table in the data column
- 18:27:56in each row and if I click on the empty
- 18:27:59space I can preview the
- 18:28:01data always click on the empty space
- 18:28:04don't click on the name otherwise it
- 18:28:05will add an step let me add a new column
- 18:28:09data 1 and inside this data one column I
- 18:28:12will use the function table do promote
- 18:28:17headers this function require one
- 18:28:19argument and that argument is the table
- 18:28:23for which it is going to promote the
- 18:28:25headers means going to make the first
- 18:28:28row as the header let me add data column
- 18:28:31as the argument for this function I
- 18:28:35double clicked on the name so once I
- 18:28:37double clicked on the name it also
- 18:28:38appear I can also type it will also come
- 18:28:40in that case either I type I double
- 18:28:42click in both the cases it will work so
- 18:28:44now it's going to create one more Colum
- 18:28:46column I created one more column now
- 18:28:47look at this column for this column
- 18:28:50headers are already promoted for each of
- 18:28:52the row as of now there are too many
- 18:28:55columns here and I can delete them I can
- 18:28:57even delete the data column so let me
- 18:29:00select the column which I doesn't requir
- 18:29:02other than the name of the sheet which I
- 18:29:05might require for the future references
- 18:29:07I have selected all the columns which I
- 18:29:09don't need and now I can use the option
- 18:29:12remove column and remove all these
- 18:29:15columns from the
- 18:29:17table now I'll go and expand it is
- 18:29:20suggesting me all these columns and I
- 18:29:21say okay and then I can detect the data
- 18:29:24type and change it so now I'm able to
- 18:29:27expand and get the data together and my
- 18:29:29all data is now lying together the
- 18:29:32question arise will it take a new sheet
- 18:29:35when we add it into the Excel so let's
- 18:29:38go back to the Excel and try to add a
- 18:29:41sheet and see what happens let me copy
- 18:29:44couple of rows for the new Excel sheet
- 18:29:48and click on the plus button and I will
- 18:29:51call this as item 4 sheet and this item
- 18:29:54four sheet I will add those couple of
- 18:29:57rows and modify the data so item id 56
- 18:30:01and item id 57 I'm adding here in the
- 18:30:04sheet 4 save it and go back to the power
- 18:30:08query and now we need to refresh this
- 18:30:11data so let me click on refresh preview
- 18:30:14you can observe immediately that item
- 18:30:16four and its related data has come let's
- 18:30:19go to the source and now we can see item
- 18:30:22four there item 4 is getting processed
- 18:30:25in each step after that it means the
- 18:30:28data of the item four is carried forward
- 18:30:31without doing any changes in the code of
- 18:30:35power query if needed I can correct the
- 18:30:37data types or I can simply go ahead and
- 18:30:40click on close and apply and I will now
- 18:30:43get this data into my powerbi desktop
- 18:30:48and I can save the file and move on in
- 18:30:51our journey to learn power query let's
- 18:30:55learn power query by taking an example
- 18:30:58and in this process we are going to
- 18:31:00learn few power query functions so what
- 18:31:03we wanted to do here is we have a text
- 18:31:06which has certain number comma separated
- 18:31:08and we want to create another text where
- 18:31:11these numbers are sorted so let me take
- 18:31:13you through an example so I have this
- 18:31:16string where I have 7A 5A 6A 10A 11a 2A
- 18:31:214A 3A 8A 9 one so these are just
- 18:31:26randomly placed here but I want
- 18:31:28ascending sorted text 1 comma 2A 3 comma
- 18:31:334A 5A 6A 7A 8A 9A 10A 11 in a sorted
- 18:31:40ascending order but it is a text in the
- 18:31:44given order I want want these numbers so
- 18:31:48how can I do that and to do that what we
- 18:31:50are going to do is we are going to go to
- 18:31:52Power query and solve this problem now
- 18:31:55to solve this problem again from this
- 18:31:58series learn powerbi I'm going to take n
- 18:32:01to n14 bbx file and I am here on the
- 18:32:05powerbi in that file in that file I'll
- 18:32:08go to the Home tab then I'll go to
- 18:32:10transform data transform data I have
- 18:32:13reached transform data and in inside
- 18:32:16transform data I want to add those
- 18:32:19numbers which I have told you so I
- 18:32:20already copied those number to get those
- 18:32:23number inside a table I'm going to take
- 18:32:26help from enter data now enter data is
- 18:32:28something which is also available
- 18:32:30outside power query you might have seen
- 18:32:33that inside the reporting view
- 18:32:36also let me click on the enter data
- 18:32:39inside the Home tab it opens up a popup
- 18:32:43inside that I'm going to give that
- 18:32:44string and I'm going to name this column
- 18:32:48text one and the table is thought
- 18:32:52text I'll click on okay now this table
- 18:32:56will get loaded inside the power query
- 18:32:59and will be shown on the left hand side
- 18:33:02as a query now the moment it get loaded
- 18:33:05you can see it is showing a number and
- 18:33:08we were never expecting a number and
- 18:33:10this is because there is a change data
- 18:33:13type step which has been added by power
- 18:33:16query thinking that it's a number but
- 18:33:18it's not a number we know it's a text we
- 18:33:21don't want to perform this change data
- 18:33:23type step I'm going to delete this step
- 18:33:25from the right hand side and now I got
- 18:33:29the way I wanted the number without a
- 18:33:32data type number so it's a text data
- 18:33:34type and this is the correct thing I
- 18:33:36have what I wanted to do first of all to
- 18:33:39sort this text into a string I need it
- 18:33:44into a list format because in list I
- 18:33:47have a function list. sort maybe in a
- 18:33:50table format but here it is easy to do
- 18:33:52all the operations in the list what I'm
- 18:33:55going to do is first of all I'm going to
- 18:33:57add a
- 18:33:58column in the tab add column I click on
- 18:34:02custom column to add a new column and in
- 18:34:05this column I will first of all convert
- 18:34:08this into a
- 18:34:09list so I need the sorted text column as
- 18:34:13a first step I will do this op operation
- 18:34:16which is text. split text. split
- 18:34:19function can take two argument and
- 18:34:22convert a text into a list by splitting
- 18:34:26it based on the separator so argument
- 18:34:29one is a text argument two is a
- 18:34:31separator and the outcome is a list so
- 18:34:34what is my first argument text one and
- 18:34:37the second argument is comma which I'm
- 18:34:40going to give inside the double Cotes
- 18:34:43and let me click on okay to get the
- 18:34:45result results now you will see that I
- 18:34:48got a
- 18:34:49list and you can see this is the list
- 18:34:52which I wanted and always remember
- 18:34:54whenever you get these list or table and
- 18:34:57you want to view them or preview them
- 18:35:00into the bottom always click on the
- 18:35:02empty space don't click on the list
- 18:35:04because if you click on the list it will
- 18:35:06add a step and it will become part of
- 18:35:08your query and then you have to revert
- 18:35:10it to come back so now it's created that
- 18:35:13list so let me delete so I'm back to the
- 18:35:16same place this is my list now I can
- 18:35:18sort it using list. sort and once I sort
- 18:35:21it you will realize I have one problem
- 18:35:24now onwards I will keep on putting a
- 18:35:26function on top of another function to
- 18:35:29get the nire output so let's put on top
- 18:35:32of it the function list dot sort I got
- 18:35:36the function list do sort it requires
- 18:35:38two argument the first argument is the
- 18:35:40list and the second argument is the
- 18:35:43optional comparison criteria
- 18:35:46and you might have realized I have given
- 18:35:48a space the reason for giving a space
- 18:35:50before I selected list. sort is that it
- 18:35:53should not replace the text. splits and
- 18:35:56let me click on okay so we got a sorted
- 18:35:59list let's have a look at
- 18:36:02it so now what we have done is we have
- 18:36:04used this list. sort function which can
- 18:36:06take a list and it can sort it but you
- 18:36:09can see this list is sorted in a text
- 18:36:11format it is not being sorted as a
- 18:36:14number because the list which you have
- 18:36:17inside is actually a list of x x. split
- 18:36:22converts into a list of text then how do
- 18:36:26I convert them into the number so it
- 18:36:28means before I sort it I need to convert
- 18:36:31them into a number how do I do that
- 18:36:34let's open the formula using the right
- 18:36:37hand side setting icon to do that I need
- 18:36:41to use another function and the function
- 18:36:43I need to use is list dot transform
- 18:36:47list. transform function and transform
- 18:36:50the list based on a function the first
- 18:36:53argument of this. transform is a list
- 18:36:55and second argument is transform
- 18:36:58function so what I need to do is I need
- 18:37:01to use this transform function and for
- 18:37:02that I need to Loop and for to loop I
- 18:37:05need to use a keyword which is each and
- 18:37:08I can use this each on underscore but
- 18:37:11what I want on this underscore I want to
- 18:37:13convert this text each text which is
- 18:37:16underscore into a number so we have
- 18:37:19function number from text and inside
- 18:37:23that I can use this
- 18:37:25underscore which will get converted into
- 18:37:28the number now so let's look at it what
- 18:37:30we got now so we got list. transform the
- 18:37:34first argument is a list which we
- 18:37:36created so the second argument is each
- 18:37:39mean which is the looping function
- 18:37:41number from text so from the text I'm
- 18:37:44going to get the number and what is that
- 18:37:46text which is underscore which is the
- 18:37:49each element of the list we are closing
- 18:37:52the list and let's try to close the
- 18:37:54list. sort also no syntax error let's
- 18:37:58click on okay now we got the list again
- 18:38:01there's no error so let's click here now
- 18:38:03you can see it is 1 2 3 4 5 6 7 8 9 10
- 18:38:08so now the list is properly sorted in
- 18:38:11the numeric order now we got a list so
- 18:38:15we need to create a comma separated text
- 18:38:18from that so now we need a function
- 18:38:21which can concatenate this list let's
- 18:38:24edit the formula once
- 18:38:26again so let's look at one function text
- 18:38:31do combine what does it do text. combine
- 18:38:35can take two arguments first argument is
- 18:38:38a list which is a text list and the
- 18:38:40second argument is a nullable separator
- 18:38:44it means the sep operator which is going
- 18:38:46to be used when we combine and create a
- 18:38:50concatenated text this function returns
- 18:38:54text but there is a challenge it need a
- 18:38:57list of text let me showcase you what
- 18:39:00happened if I don't transform this list
- 18:39:02as of now for first argument is a list
- 18:39:06which is right now a number list and
- 18:39:08second argument is a separator comma
- 18:39:11which I have given here and let's try
- 18:39:14out does it work does text. combine work
- 18:39:17on the number list click on okay and it
- 18:39:21start giving error and the reason for
- 18:39:23the error is the type is not correct
- 18:39:25right now it's a list of numbers so we
- 18:39:28need to do the same operation in the
- 18:39:30reverse manner which we have done some
- 18:39:32time back the list. transform previously
- 18:39:35has transformed this list into a number
- 18:39:37list now the same operation need to
- 18:39:39transform it into the XT so I have moved
- 18:39:43down a code little bit so that I can
- 18:39:45only understand this function so now
- 18:39:48here I need list. transform again so I'm
- 18:39:51going to use list. transform and on
- 18:39:54list. transform now I need to do
- 18:39:57operation which is basically again this
- 18:40:00each
- 18:40:01operation but not from text I now need
- 18:40:04to convert into two text so number two
- 18:40:08text is the operation I want to perform
- 18:40:12and that should close my transform after
- 18:40:14transform comma so that I give the
- 18:40:17second argument of text. combine so what
- 18:40:19is happening here is now this list.
- 18:40:22transform is going to convert my list
- 18:40:25which is already sorted which is coming
- 18:40:27from list. sort into a list of text
- 18:40:31elements and then the text. combine can
- 18:40:34combine it into a comma separated string
- 18:40:37let's click on okay and check it out
- 18:40:40does it
- 18:40:41work so now what has happened is we got
- 18:40:45a comma separated text in which the
- 18:40:50previous text Elements which were comma
- 18:40:53separated are now sorted you can see I'm
- 18:40:56getting 1 2 3 4 5 6 7 8 9 10 11 as a
- 18:41:01text which is a comma separated number
- 18:41:04text but it is sorted version of the
- 18:41:07text one so this is what exactly we
- 18:41:09wanted to achieve but while doing this
- 18:41:11example we have learned text function
- 18:41:15and list function which we can use we
- 18:41:17also learned how to take advantage of
- 18:41:21list. transform function which is very
- 18:41:24powerful function which allows you to do
- 18:41:26many transformation and this is just one
- 18:41:28example of the transformation where I
- 18:41:30want to transform each element into a
- 18:41:34different data type but you can do many
- 18:41:36other operations using list. transform
- 18:41:39and I have covered these functions as
- 18:41:43part of my beginner tutorial series
- 18:41:45with some other examples also so you can
- 18:41:48learn more about all these functions
- 18:41:51using that particular series try out
- 18:41:54this exciting example how do we make
- 18:41:57sure that these changes are saved so we
- 18:41:59can go to home close and apply so that
- 18:42:02all our changes are part of now powerbi
- 18:42:06and we can save this file by pressing
- 18:42:09control s or by clicking on the save
- 18:42:12button so let it load the data of the
- 18:42:16sort text table and post that we can
- 18:42:19save it so I'm saving it and you have to
- 18:42:23try this example out you can create any
- 18:42:27comma separated text for this video and
- 18:42:30try it
- 18:42:31out one of the best way to learn powerbi
- 18:42:35or power query is to take up some
- 18:42:37examples and try to solve them we are
- 18:42:40going to take one example in this video
- 18:42:42which is split and distinct why the
- 18:42:45example will look very simple to you but
- 18:42:48most of the time I found when people try
- 18:42:51to solve this problem they take one
- 18:42:53small step wrong and then they try to
- 18:42:56solve it by a little different way which
- 18:42:58is not so effective so let me first of
- 18:43:02all tell you the problem the problem is
- 18:43:05basically I have these comma separated
- 18:43:07text like a comma B comma c a comma B
- 18:43:12comma C comma D and so on I have many
- 18:43:14like
- 18:43:16what I want is across all these rows I
- 18:43:19want the distinct codes which are
- 18:43:20available like a b c d EF so basically
- 18:43:25what is happening this is going to be
- 18:43:26splitted and after splitting I need
- 18:43:28distinct once I reach power ba I'll tell
- 18:43:31you where when people answer this
- 18:43:33question they commit the mistake so
- 18:43:35let's try to solve this problem on
- 18:43:37powerbi and to solve this problem I'm
- 18:43:39going to use end to end4 file which we
- 18:43:42are using for the learn power B series
- 18:43:46and I am on that particular file right
- 18:43:48now in the Home tab let me click on
- 18:43:51transform data and inside the transform
- 18:43:54data I will again click on transform
- 18:43:57data and I'll reach to power query as
- 18:44:01this is a very simple data this can be
- 18:44:02created with enter data so let me enter
- 18:44:05this data so I'll go to the Home tab and
- 18:44:08click on enter data I will be able to
- 18:44:11enter this data a popup is open and here
- 18:44:14I'm I'm going to rename the column as
- 18:44:17codes and I can call this table as codes
- 18:44:21plate let me start creating the rows for
- 18:44:24this table by entering the data let me
- 18:44:27start typing a comma B comma C and in
- 18:44:31the next row let me type a comma B comma
- 18:44:34C comma D it is not necessary that you
- 18:44:38type the same stuff what I given to you
- 18:44:40you can have a little different version
- 18:44:41that's absolutely fine
- 18:44:45so this is the data I have and let me
- 18:44:47now click on okay to get this data in
- 18:44:50power query it will add a query which
- 18:44:54I'll be able to see on the left hand
- 18:44:55side the list of queries where I have
- 18:44:58and I will explain you the
- 18:45:00transformation needed to do that so I
- 18:45:02got the table as soon as I told you this
- 18:45:05problem the first answer comes to you
- 18:45:07okay we will split it by delimiter yes
- 18:45:10that's correct so you can right click
- 18:45:12and do split by delimiter or inside the
- 18:45:15transform tab you have the option split
- 18:45:18column by Del limiter so from any of
- 18:45:21these options click on that split column
- 18:45:24by D limiter on this popup you have
- 18:45:26various options the first option is how
- 18:45:28you want to split it the default option
- 18:45:30is comma and we have comma separated
- 18:45:33string so we are going to use that but
- 18:45:35you can change it you can even choose a
- 18:45:37custom one second is split at leftmost
- 18:45:42rightmost or each occurence in this case
- 18:45:45we need each occurrence but depending on
- 18:45:47the need you can choose next option is
- 18:45:51Advanced options and inside the advanc
- 18:45:54option there is a choice if we choose
- 18:45:56the wrong one we may get little longer
- 18:46:00solution we may still be able to achieve
- 18:46:02it but that's not the optimal
- 18:46:05solution in this Advanced option I have
- 18:46:07option split into columns and rows but
- 18:46:11usually people tell me that we'll split
- 18:46:13by columns and then they tell you know
- 18:46:15we will do unpivot and do that you don't
- 18:46:18need to do that actually you have a
- 18:46:19better option split into rows because
- 18:46:23that will actually convert it into rows
- 18:46:26and when you do split by column it do
- 18:46:28ask you number of column so you're
- 18:46:30limited by number of columns in case of
- 18:46:32row you are not limited so if there are
- 18:46:33four five six any number it will take
- 18:46:36care of that split because it's going to
- 18:46:38create new rows after you do that you to
- 18:46:41click on okay now we got all the codes
- 18:46:44into the rows and the next option is
- 18:46:47very simple so I to right click and use
- 18:46:50remove duplicates option let me click on
- 18:46:53that and we got the desired outcome as
- 18:46:58you can see this is the problem which we
- 18:47:01can sort with what we have learned so
- 18:47:04far there is nothing new but it is just
- 18:47:06a use case to pay little attention how
- 18:47:10are we going to achieve this I have kept
- 18:47:13this use case for your reference you can
- 18:47:16solve many other different Problems by
- 18:47:18combining various power query operations
- 18:47:21so try this out in this video we will
- 18:47:25continue our journey of learning power
- 18:47:28bi and power query with some examples
- 18:47:31the example what we want to take here is
- 18:47:33the split column but there is a Twist
- 18:47:36The Twist here is that in the column I
- 18:47:39have two set of values the one value is
- 18:47:41a single value then there is a space and
- 18:47:43then there's a comma separate value I
- 18:47:46want to split them but the final answers
- 18:47:50should contain them in Combined manner
- 18:47:52so if you look here the best 1 comma 2
- 18:47:56comma 4 is going to become best one best
- 18:47:59two and best 4 similarly good one comma
- 18:48:024 will become good one and good four so
- 18:48:06how can we achieve this again we are
- 18:48:09going to use some of the things which we
- 18:48:12have already learned in power query but
- 18:48:14try to fit in this use case for this use
- 18:48:18case also I'm going to use pyot data.
- 18:48:21XLS which is available on my GitHub
- 18:48:24account and that is the same file we
- 18:48:26have already loaded in end to end 14 PB
- 18:48:30so we can continue to use that
- 18:48:32particular file those of you who are
- 18:48:35directly jumping onto this part of the
- 18:48:37video you have to go to my GitHub
- 18:48:39account github.com amitchandak PBI
- 18:48:44powerbi
- 18:48:45you have to go down you will find a file
- 18:48:47pyot data. XLS click on that one thing
- 18:48:52is you can download this and use it or
- 18:48:54the second thing is right click on the
- 18:48:57raw don't take the URL from the top and
- 18:48:59copy link and that is the link which you
- 18:49:02can use as web URL in your powerbi to
- 18:49:05load this data in this case I have tried
- 18:49:08out this operation on a little different
- 18:49:10file but you can continue with the file
- 18:49:13you are already having the pyot data.
- 18:49:16XLS file let's try this out on powerbi
- 18:49:20desktop data. XLS has undergone many
- 18:49:23changes over a period of time but for
- 18:49:26this use case you should be able to get
- 18:49:29the data inside the file but if you
- 18:49:31don't get you should be able to create
- 18:49:33this data easily using the enter data
- 18:49:36option in power
- 18:49:38query you should be able to get this
- 18:49:41data inside the combined Split Sheet and
- 18:49:44as we have discussed the best space one
- 18:49:472 and four I would like to split like
- 18:49:50best space
- 18:49:53one then I would like best space
- 18:49:59two they would be in the continuous row
- 18:50:02so let me move it up and best Space 4
- 18:50:06same manner I'll get the data for nice
- 18:50:08and good also so this is what the final
- 18:50:11outcome I want but as of now let me
- 18:50:14clean it up and let's keep this file as
- 18:50:17is for our
- 18:50:19uses this is not going to be a simple
- 18:50:22split problem first of all we have to
- 18:50:24split the name and the rank into
- 18:50:27separate columns then we have to further
- 18:50:29split the rank into multiple rows and
- 18:50:33then we have to combine these again back
- 18:50:37into one single column so two operations
- 18:50:40going together split and combine let's
- 18:50:44jump on the powerbi desktop I'm going to
- 18:50:46load this data again but you can
- 18:50:49continue with the file where you have
- 18:50:50already loaded so I'm going to use
- 18:50:53recent source and from there I'm going
- 18:50:54to take pyot data. XLS and in the pyot
- 18:50:58data. XLS I have all these sheets which
- 18:51:01I have showcased you in the past from
- 18:51:03here we would like to take the combined
- 18:51:05Split Sheet which has the desired data
- 18:51:08and directly go to transform data so we
- 18:51:11will reach power query as our data is
- 18:51:14complete text Data it might not detect
- 18:51:17the first row as header so we have to
- 18:51:19manually go and use first row as header
- 18:51:21from the menu first step is to split the
- 18:51:25column by space into two columns for
- 18:51:29that we need the operation split column
- 18:51:32by delimiter so split column is
- 18:51:34available here I'm going to click on
- 18:51:37that and in that we have many option I'm
- 18:51:39going to use bu delimiter option let me
- 18:51:43click on that it will open a popup in
- 18:51:46the select delimiter it has correctly
- 18:51:48detected the space as the delimiter
- 18:51:51otherwise we can change it we have to go
- 18:51:53to the Advance option and inside the
- 18:51:55advance option we'll choose column and
- 18:51:57we'll keep the value two which it has
- 18:51:59detected correctly now we can click on
- 18:52:03okay to complete this operation so we
- 18:52:06got now two columns but when we look at
- 18:52:08the second column we found that the text
- 18:52:11which we are expecting is not correct it
- 18:52:13is not comma separated value and the
- 18:52:16reason for that is the auto conversion
- 18:52:19you can see the data type is 1 2 3 there
- 18:52:21is a step added change type two which is
- 18:52:25converting it into the numbers previous
- 18:52:28step has the comma separated value so we
- 18:52:31need to delete this step once we delete
- 18:52:34we'll reach to the last step where we
- 18:52:37see the correct comma separated value
- 18:52:39whenever you do power query operations
- 18:52:42sometime the change type step is is
- 18:52:44automatically added in such cases you
- 18:52:47can delete such a step whenever you are
- 18:52:51working on power query if something goes
- 18:52:54wrong please check it step by step by
- 18:52:57looking at what is happening on each of
- 18:53:00the
- 18:53:01step we need to split the second column
- 18:53:04into the rows so again we are going to
- 18:53:06use the split column option so let's
- 18:53:09select this column and use the split
- 18:53:12column by delimiting
- 18:53:15and once we get the popup we can see
- 18:53:17that it has correctly detected its comma
- 18:53:20separated and in the advance we need to
- 18:53:22use rows not columns for this time let's
- 18:53:27click on okay to complete the operation
- 18:53:30as you can observe that now we have the
- 18:53:32values required but they are not in one
- 18:53:35column they are in two column we are
- 18:53:37getting best in one column one in second
- 18:53:40column best and two in two different
- 18:53:43different columns but what we need to do
- 18:53:45is we need to combine them into one
- 18:53:48single column so we need to perform
- 18:53:50another operation for that now we need a
- 18:53:53option merge column merge column is
- 18:53:56available under the transform tab we
- 18:53:59were on the Home tab that option is not
- 18:54:01available in the Home tab that is
- 18:54:02available under the transform Tab case
- 18:54:05of merge columns the order of selection
- 18:54:08is really important so first I'm going
- 18:54:10to select the first column and then I'm
- 18:54:12going to select the second column colum
- 18:54:14if you change the order you may get a
- 18:54:17different
- 18:54:18result so let's select the first column
- 18:54:21click and control and select the second
- 18:54:23column from transform tab let's choose
- 18:54:27merg columns a popup will open and here
- 18:54:30we'll choose separator as space and we
- 18:54:33will give a new column name which is
- 18:54:36name rank and let's click on okay so now
- 18:54:40we got the desired outcome the desired
- 18:54:43outcome contains best space one best
- 18:54:47space two best Space 4 and so on so this
- 18:54:52is what we wanted and as you can see we
- 18:54:54have used the standard power query menu
- 18:54:58options only to achieve this power query
- 18:55:01can solve many complex problem using
- 18:55:05these menu options or the power query
- 18:55:09functions the only thing is you need to
- 18:55:11learn power query in details to achieve
- 18:55:14that my advice would be to also look at
- 18:55:17all the functions which we have
- 18:55:19discussed in beginner tutorial series to
- 18:55:22make sure that you are able to take full
- 18:55:24advantage of power
- 18:55:29query in this video we are going to
- 18:55:32discuss subcategory index or subcategory
- 18:55:35rank we call Ned rank or nexted index
- 18:55:39there is a video from Kerbal on that
- 18:55:41that is the inspiration for this video
- 18:55:43yeah going to use the technique shown
- 18:55:46there to get the subcategory index and
- 18:55:48subcategory rank the function required
- 18:55:51for subcategory index and subcategory
- 18:55:53rank the rank and the index function I
- 18:55:56have explained you already in the
- 18:55:57beginner tutorial series you can watch
- 18:56:00it there I will give you a brief
- 18:56:03overview of those function here also let
- 18:56:06me show you the two functions I'm
- 18:56:08planning to use today the first one is
- 18:56:10table do add rank column and the second
- 18:56:14one is table. ADD index column both of
- 18:56:19them we have already discussed inside
- 18:56:22the beginner tutorial series now the
- 18:56:25challenge which we are going to get here
- 18:56:27is this function works at table level so
- 18:56:31I cannot give a kind of a partition to
- 18:56:34give me subcategory Rank and that is
- 18:56:37what we have to learn how can we make
- 18:56:40them to work for a particular portion of
- 18:56:43the table or partion of the table or
- 18:56:45category or subcategory for example
- 18:56:48let's say my table has Brand I want
- 18:56:51everything to rank inside a brand from
- 18:56:54one to any for subcategory index and
- 18:56:57rank what I'm going to use is I'm going
- 18:56:59to use the pivot data XLS which is
- 18:57:01available on my GitHub and that is the
- 18:57:04same file we have already loaded in end
- 18:57:06to end 14 PB so we can continue to use
- 18:57:10that particular file those of you who
- 18:57:13are directly jump jumping onto this part
- 18:57:15of the video you have to go to my GitHub
- 18:57:17account github.com amitchandak PBI
- 18:57:22powerbi you have to go down you will
- 18:57:25find a file pyot data. XLS click on that
- 18:57:30one thing is you can download this and
- 18:57:31use it or the second thing is right
- 18:57:34click on the raw don't take the URL from
- 18:57:36the top and copy link and that is the
- 18:57:39link which you can use as web URL in
- 18:57:42your powerbi to load this data in this
- 18:57:45case I have tried out this operation on
- 18:57:48a little different file but you can
- 18:57:50continue with the file you are already
- 18:57:53having the pwot data. XLS file let's try
- 18:57:56this out on powerbi
- 18:57:58desktop I'm on to the powerbi desktop
- 18:58:01now let me go to the Home tab transform
- 18:58:04data and transform data in power query I
- 18:58:08already have multiple queries or tables
- 18:58:10and one of the table I have is this pyot
- 18:58:12data I have called name subject and
- 18:58:15marks and here name can become that
- 18:58:18logical division inside which I can rank
- 18:58:22or index my subjects so let's first try
- 18:58:25out to add the subcategory index by name
- 18:58:28so for that we need to use the group by
- 18:58:31function first to group this data so I
- 18:58:34click on name and I'll go to transform
- 18:58:37inside the transform I have option Group
- 18:58:40by operation Group by and its functional
- 18:58:44I have already explained in this series
- 18:58:47and in this video also I have explained
- 18:58:51same thing in beginner tutorial series
- 18:58:54and I'm going to click on that option
- 18:58:56Group by in the popup I will see name as
- 18:59:00Group by also observe a new column name
- 18:59:03as count and the operation as count
- 18:59:05which I'm going to change to all rows
- 18:59:08that will disable the column option
- 18:59:11let's understand what we are trying here
- 18:59:13we are trying to group this data by name
- 18:59:16and we want a column which contain all
- 18:59:19the rows so the operation is all rows
- 18:59:22and now I would like to click on okay to
- 18:59:25get this transformed table I do that I
- 18:59:28see a column name and a column count
- 18:59:32with the table inside each row if I
- 18:59:35click on the empty space I can see what
- 18:59:38data each table contains table has name
- 18:59:41subject and marks for each name the next
- 18:59:44step is to add column from add column
- 18:59:47custom column so let me first of all
- 18:59:49name this column as index the function
- 18:59:52which I'm going to use for this is
- 18:59:55table. ADD index table. add index can
- 18:59:59take table index column name start
- 19:00:02position increment and the data type to
- 19:00:06give us the index argument would be
- 19:00:08count which is a table comma second
- 19:00:10argument is the name of the column which
- 19:00:12I wanted to give which is sub index
- 19:00:16comma now it is not showing because
- 19:00:18table is doubled out here so I'm going
- 19:00:20to remove the table and now it will
- 19:00:23suggest me after the comma so I want to
- 19:00:25give the start position which is one
- 19:00:27increment which is one and it is asking
- 19:00:31for a data type as the last argument
- 19:00:33which I can give index 64. type so we
- 19:00:37have to return a type and here I'm
- 19:00:39returning index 64 close parenthesis and
- 19:00:42click on okay try to look into the data
- 19:00:45of each table now I can see sub index
- 19:00:48inside it and now what I can do is I can
- 19:00:51delete this count column it is no more
- 19:00:54required and then I can expand this
- 19:00:57index column and I can uncheck the name
- 19:01:00because I no more need that and let's
- 19:01:02click on okay once we expand that you
- 19:01:05can observe that the indexes are inside
- 19:01:08the name and after that they are
- 19:01:10repeating inside the second name and
- 19:01:12that is what we want wanted to achieve
- 19:01:15index is typically based on the order of
- 19:01:18loading it is not based on the marks or
- 19:01:21the subject or anything else and that is
- 19:01:24where we need the rank column to Define
- 19:01:26order based on a column to Showcase you
- 19:01:29subcategory rank we are going to do a
- 19:01:32little complex operation and I'm going
- 19:01:34to Showcase you how can you add another
- 19:01:37table inside the same code so first
- 19:01:40let's delete these steps and reach till
- 19:01:42the step we have edit column where we
- 19:01:45have the table let's remove the steps
- 19:01:47and reach to the table and we are going
- 19:01:50to open that step Again by click on the
- 19:01:53setting icon I will now showcase you how
- 19:01:56to do complex operation in a column for
- 19:01:59that first of all let's move this table
- 19:02:02down and write down let and after that
- 19:02:06we need to create variables for the
- 19:02:08table so let me put this table inside
- 19:02:10one variable and put comma after that in
- 19:02:14next line I'm going to put another table
- 19:02:16name and here I'm going to do the
- 19:02:18operation table. add rank column so tab
- 19:02:23one has index and in tab two I'm adding
- 19:02:26rank to the same tab one which is having
- 19:02:29index let's remove the duplicate table
- 19:02:32and now understand the syntax of this
- 19:02:35one so we require a table which we are
- 19:02:37getting from the last step the next one
- 19:02:39is the column name which we are going to
- 19:02:42give the rank column name and the third
- 19:02:44argument is the one by which we are
- 19:02:47going to decide how we are going to rank
- 19:02:49and to do that I Gove back to the
- 19:02:51documentation and bring in what all
- 19:02:54values I need to give so I'm going to
- 19:02:57copy this and I'm going to change it
- 19:02:59once we reach back to our code so let's
- 19:03:03take this and put it inside our code
- 19:03:05onto the power query we need to provide
- 19:03:08our own column name in place of Revenue
- 19:03:11which is the rank column and the column
- 19:03:14which we plan to use here is the marks
- 19:03:16that is what is available in our data in
- 19:03:19the double quote then the order is fine
- 19:03:22I can keep order. descending next thing
- 19:03:26we need to Define is the rank kind and
- 19:03:28we are going to keep the values what we
- 19:03:31have got from the code so rank kind is
- 19:03:34equal to rank kind. competition we are
- 19:03:37going to keep it same what we got from
- 19:03:39the documentation as of now now we need
- 19:03:42to return it because we have used let so
- 19:03:44we need to use in and we need to use in
- 19:03:47in small and after that we need to
- 19:03:50return the underscore tab two click on
- 19:03:53okay to complete this custom
- 19:03:56column now if You observe the table you
- 19:03:58can see the index as well as rank
- 19:04:01instead of adding the multiple step what
- 19:04:03we have done in inside within the same
- 19:04:05custom column we added both of them now
- 19:04:07you can see rank is based on the marks
- 19:04:10while index is based on the order we
- 19:04:12loaded the dat
- 19:04:14and when you do the rank column it does
- 19:04:16change the sort order of the table so
- 19:04:19that is why first you should do the
- 19:04:21index operation and then you should use
- 19:04:24the rank operation in case you need both
- 19:04:26of them together in the rank we have few
- 19:04:30more options which we can explore so
- 19:04:32let's go back to the formula and here in
- 19:04:35the rank kind I can choose different
- 19:04:38options competition dance ordinal and
- 19:04:41type so those of you who have already
- 19:04:44worked on the rank knows that the dance
- 19:04:46rank is little difference in case of the
- 19:04:48dance rank we get the next rank whether
- 19:04:51the rank repeats or not so if you look
- 19:04:53below here you have a rank which is one
- 19:04:56two and then we have the two again and
- 19:04:59then we have four so basically it is
- 19:05:02kind of a skip rank but what we want is
- 19:05:04dance rank it means one two and three so
- 19:05:07even if there is a skip we should be
- 19:05:10able to get the next Rank and that is
- 19:05:14what happens in case of Danse rank so
- 19:05:16let's make it dense Rank and try it out
- 19:05:20so now let's look at the data so we have
- 19:05:22the different different kind of R let's
- 19:05:24look at some different Row in this row
- 19:05:26itself if you see one is repeating but
- 19:05:28we still have two after that then in
- 19:05:31this one also we have one two two but we
- 19:05:33have next rank is three so basically
- 19:05:37even if the rank is repeated the next
- 19:05:40continuous rank is coming the count
- 19:05:43column we created using the group by is
- 19:05:45no more needed we can delete it now
- 19:05:49let's expand the data by using the
- 19:05:51expand icon on the right top we can
- 19:05:53remove the name and click on okay and
- 19:05:56now we are getting rank as well as index
- 19:06:00inside our table the subcategory rank
- 19:06:03and the subcategory
- 19:06:05index so here we have used the table
- 19:06:08operations and table operation is
- 19:06:10something we have not discussed in this
- 19:06:12video or series a lot but you can go
- 19:06:15ahead and watch the beginner tutorial
- 19:06:17series to understand in depth how to use
- 19:06:21table operations and if you want to
- 19:06:23execute those operation at the grouping
- 19:06:26level or subcategory level you can
- 19:06:28utilize the trick I have shown you in
- 19:06:30this
- 19:06:32video we have learned a lot of powerbi
- 19:06:35stuff and now we are ready to create the
- 19:06:38pages report pages on the powerbi
- 19:06:40desktop which we want to share with
- 19:06:42other user to sh share it with other
- 19:06:44user we need to publish the file publish
- 19:06:46the file to powerbi service powerbi
- 19:06:47service is nothing but app. powerbi.com
- 19:06:50and from there we are going to share it
- 19:06:52with other user we'll have a quick
- 19:06:53overview of powerbi service in powerbi
- 19:06:55service the report has to go to a
- 19:06:57workspace and that particular workspace
- 19:06:59is something which we should create and
- 19:07:00in that workspace we are going to
- 19:07:01publish this file after we publish this
- 19:07:04file the file will get divided into two
- 19:07:06part right now it's a single file here
- 19:07:07in the case of import mode there it will
- 19:07:09be divided into data set semantic model
- 19:07:11or data set and the visualization file
- 19:07:14ideally speaking we don't want to create
- 19:07:17any visualization in the file where we
- 19:07:19have the data model and the measur we
- 19:07:21want to publish it and use the data set
- 19:07:23as a live connect and create the
- 19:07:24visualization there and because of the
- 19:07:26same reason what I've done is I've
- 19:07:27deleted all the pages because I don't
- 19:07:28want to create visualization on this
- 19:07:30file I want to separate out my model
- 19:07:32development from my visualization but
- 19:07:34before even if I publish this empty file
- 19:07:36and this empty file because it has one
- 19:07:37page it's going to create a
- 19:07:39visualization file which we may not want
- 19:07:41it to use we can come back use the data
- 19:07:43set and create a file now before I
- 19:07:46publish this I need to make sure that my
- 19:07:48Majors should get organized in proper
- 19:07:50manner I should clean up unnecessary
- 19:07:51stuff so definitely I don't have any
- 19:07:54unnecessary table because what we have
- 19:07:56done during this entire video we have
- 19:07:58made sure that we Crea different
- 19:07:59versions of the files and whatever is
- 19:08:00not required we have not added to this
- 19:08:02but we have different places where we
- 19:08:04have Majors so some of the majors are
- 19:08:05lying here and there in the customer
- 19:08:06table we have so many majes so
- 19:08:08definitely would like to restructure
- 19:08:10that and to restructure we already
- 19:08:12learned that you can go to the model
- 19:08:14view and into the model view tables this
- 19:08:16is the best place to move the majors
- 19:08:18across so let's say I have these brand
- 19:08:20gross brand net brand brand net to Brand
- 19:08:23all these you can control and click or
- 19:08:26shift and click you can do that isn't
- 19:08:29it and I'll not collect the brand color
- 19:08:32because color major I want separate so
- 19:08:34all these brand color where should they
- 19:08:36where they should go already there are
- 19:08:37in the major folder these are my filter
- 19:08:39measures I filter this so I can create a
- 19:08:41folder filter I can add them there so
- 19:08:45they will be moved to a sub folder now
- 19:08:47brand color category color they are
- 19:08:49color measures so I can put them into
- 19:08:51color folder and whatever folder I
- 19:08:52create I need to remember the name
- 19:08:54because if a new thing come in I I need
- 19:08:55to move that in now I have gross two
- 19:08:58gross three gross this gross Max sales F
- 19:09:03sales I need to move to others now what
- 19:09:07I'll do I'll similarly create few
- 19:09:08folders like time intelligence this that
- 19:09:11and reorganize all my majors
- 19:09:14also the majors which are in the
- 19:09:15customer table I would like them to move
- 19:09:17to the major table and put them
- 19:09:18somewhere inside the
- 19:09:22folder I moved them into the major
- 19:09:26folder then I select all of
- 19:09:29them and then I can move them into
- 19:09:32display folder which is TI time
- 19:09:35intelligence these can also move into pi
- 19:10:12so I am almost done with CLE cleanup I
- 19:10:15have mostly organized the labels inside
- 19:10:18the major folder other than one or two
- 19:10:19exception which I wanted to keep in
- 19:10:21different tables now one of the
- 19:10:23preparation which you also required on
- 19:10:25the desktop is to install on promise
- 19:10:27Gateway but what I've done is basically
- 19:10:29I have used the files which are on
- 19:10:30GitHub which is basically online so I
- 19:10:32don't require on promise G but if you're
- 19:10:34using sources like Excel sheet SQL
- 19:10:37Server which is on promise you need to
- 19:10:39install on promise Gateway and typically
- 19:10:41on promise Gateway need to be installed
- 19:10:43on a machine where it can be up and
- 19:10:45running always and it should have access
- 19:10:46to Excel files those local databases
- 19:10:49which you have and that will help you to
- 19:10:51refresh your data set on powerb service
- 19:10:53which we'll understand in a short while
- 19:10:55once everything is ready we are ready to
- 19:10:57publish the file now but before we
- 19:10:59publish the file let's understand what
- 19:11:01is this powerbi service and how do we
- 19:11:04create a workpace where we can actually
- 19:11:06publish our data so we will go to
- 19:11:09powerbi service understand its component
- 19:11:11quickly create a works space where we
- 19:11:13can publish this file after publishing
- 19:11:16this file we have a data we will get the
- 19:11:18data set back and create a report now we
- 19:11:20can create a report on powerbi service
- 19:11:22or we can create a report on powerbi
- 19:11:24desktop both are possible once we do
- 19:11:26that let's save this file go to powerbi
- 19:11:29service understand it component create a
- 19:11:32workspace come back and publish this I'm
- 19:11:34on powerbi service powerbi service is
- 19:11:37nothing but app. powerbi.com make sure
- 19:11:40you have created your login as I
- 19:11:42explained earlier either you have been
- 19:11:44assigned a license by your admin and you
- 19:11:46have got the login for app. powerbi.com
- 19:11:49you're using that or you create the one
- 19:11:51now app. powerbi.com which is also known
- 19:11:54as powerbi service or the web version of
- 19:11:56the powerbi is for collaboration it's
- 19:11:58for sharing whatever content we create
- 19:12:00we share that content using powerbi
- 19:12:03service with other user now to share the
- 19:12:05content of powerbi you need licenses you
- 19:12:08need Pro licenses you need PPU licenses
- 19:12:10or you need capacity Pro users can share
- 19:12:12with Pro users PP users can share with
- 19:12:15PP user so that is user based licenses
- 19:12:17but if you buy a premium capacity which
- 19:12:19is either P1 P2 or P3 in these
- 19:12:21capacities first of all you get
- 19:12:23exclusive capacity to run your powerbi
- 19:12:25which is needed for large organization
- 19:12:27application but in the premium capacity
- 19:12:30only for designers you need license and
- 19:12:32you can use Pro license for that before
- 19:12:35premium capacity every user whether it
- 19:12:37is a designer report designer or report
- 19:12:40Creator or report viewer everyone
- 19:12:42requires a license but after you get
- 19:12:44premium capacity not everyone require
- 19:12:46license viewer doesn't require license
- 19:12:48in powerbi service workspace you can
- 19:12:50create app and you can assign that to
- 19:12:52unlimited number of users when you come
- 19:12:54to powerbi service you will see few
- 19:12:56sections and let's understand these
- 19:12:57sections I'm right now at the Home tab
- 19:12:59and where I'm seeing this recommended
- 19:13:01recent favorites and my app on the left
- 19:13:04hand pane I have create for new report
- 19:13:06browsing the content one leg data Hub is
- 19:13:09for the Microsoft fabric which is again
- 19:13:11accessible using app. powerb
- 19:13:13and I've enabled the trial so you will
- 19:13:15see the content of Microsoft fabric then
- 19:13:17app in case we create the service app we
- 19:13:20will have the apps here in case you have
- 19:13:21created matrices you will have them here
- 19:13:23monitoring Hub in case you have access
- 19:13:25to monitoring Hub you will have it
- 19:13:26workspaces which are essential for data
- 19:13:28sharing are available here and my
- 19:13:30workspace my workspace is the workspace
- 19:13:32even if you're a free user you will have
- 19:13:33your own workspace that is known as bike
- 19:13:35workspace Now to create your own
- 19:13:36workspace you need to be a pro user and
- 19:13:38you also need to have permissions from
- 19:13:40your admin to create these workspace now
- 19:13:42workspace in power powerbi world it's a
- 19:13:44container of resources like report
- 19:13:46paginated report dashboard we have
- 19:13:49something known as powerbi service
- 19:13:50dashboard which is different from report
- 19:13:51most of the time for practical purpose
- 19:13:54what we call report in powerbi is as
- 19:13:56good as dashboard in the bi world but we
- 19:13:58have a powerb service dashboard where we
- 19:14:00can put in the content from various
- 19:14:01other reports so all these components
- 19:14:04can be put into one thing which is known
- 19:14:06as workspace from workspace I can apply
- 19:14:08Ro level security RLS I can distribute
- 19:14:10the content to the selected set of users
- 19:14:12all these is possible using the
- 19:14:14workspace so first of all what you are
- 19:14:15going to do Under This workspace there
- 19:14:17is a button below new workspace I'm
- 19:14:19going to create a new workspace I'm
- 19:14:21going to give it as a name and because
- 19:14:22we have created end to endend video so
- 19:14:24we are going to give it as a name end to
- 19:14:25end description is also end to end I
- 19:14:28have not created any domain so I'm
- 19:14:30leaving it I'm not also giving an image
- 19:14:32under the advance instead of trial I'm
- 19:14:34going to use it pro I have a pro license
- 19:14:35or PPU license I can create that Pro is
- 19:14:38basically minimum license required for
- 19:14:39sharing or PPU so we can create a
- 19:14:41premium per user workspace and and when
- 19:14:43you create a premium per user you can
- 19:14:44use large semantic model also format
- 19:14:46also we are using the powerway reports
- 19:14:48so PPU workspace or premium for user
- 19:14:51workspace we are creating and now click
- 19:14:53on apply the moment you click on apply
- 19:14:55it will open your workspace which is
- 19:14:56empty and when you click on the new it
- 19:14:58will show what all components which you
- 19:15:00can create in powerbi service report
- 19:15:02pated report scorecard dashboard
- 19:15:05semantic model data flow it is also
- 19:15:07known as now data flow gen one data M
- 19:15:09and streaming data sets the more options
- 19:15:11contain these as as well as what you can
- 19:15:13use in Microsoft fabric you can watch my
- 19:15:15series on Microsoft fabric to know more
- 19:15:17about these you have so many things I'm
- 19:15:19leaving that explanation right now we
- 19:15:21are only focused on the powerbi content
- 19:15:23so Microsoft fabric you can watch the
- 19:15:25videos on Microsoft fabric let's go back
- 19:15:27to the workspace you can upload certain
- 19:15:29content from one drive SharePoint on the
- 19:15:31workspace you can create a app app is
- 19:15:33for the sharing we will learn that you
- 19:15:34can manage the access you can share this
- 19:15:36workspace with the other people you can
- 19:15:38give the name and share it and there are
- 19:15:39four types of role admin having access
- 19:15:41to everything member having access to
- 19:15:44app but not having access to admin
- 19:15:46whatas contributors having access till
- 19:15:48reports but not having access to app and
- 19:15:51viewers only have the viewer access you
- 19:15:53can look for an article powerbi workpace
- 19:15:57roles and always get the latest on what
- 19:16:01a particular user can do and as you can
- 19:16:03see here various capabilities has been
- 19:16:06defined what each user type can do and
- 19:16:08remember the RLS or the RO level
- 19:16:10security only applies for viewers so all
- 19:16:12the users mostly are going to be viewers
- 19:16:15so then we have workspace settings we
- 19:16:17are right now only interested in couple
- 19:16:19of settings that are related to powerbi
- 19:16:21general setting and in this one the
- 19:16:23important setting which if you want to
- 19:16:25allow your users to update the data set
- 19:16:28then you need to allow this model
- 19:16:29setting they will be able to update the
- 19:16:31model online using this so you need to
- 19:16:33check that and allow contributor to
- 19:16:34update the app if there was a feature
- 19:16:36where it was written if allowed this is
- 19:16:38that if allowed you want to allow the
- 19:16:40contributor to update the app then you
- 19:16:41can allow that okay so now the
- 19:16:43contributors can also update the then
- 19:16:45data connectors no changes embed code
- 19:16:47right now no changes rest I'm leaving as
- 19:16:50is now we don't need for our initial
- 19:16:52learning that one so these are the
- 19:16:54setting for the workspace now if you are
- 19:16:56a powerbi admin you will also be the
- 19:16:58settings which are under admin portal
- 19:17:00under the admin portal most important
- 19:17:02settings are lying under the tenant
- 19:17:04settings definitely if you have capacity
- 19:17:06then you you would go to premium per
- 19:17:07user and capacity settings also then
- 19:17:09there are organizational visual settings
- 19:17:11which are separately available if you go
- 19:17:13there you have the visuals then you can
- 19:17:14add them there workspaces and custom
- 19:17:16branding Etc is there in the tant
- 19:17:18everything which you do on power B
- 19:17:21service can be controlled you want to
- 19:17:22give the help information you can give
- 19:17:24and most of the settings if you enable
- 19:17:26them they have two to three options for
- 19:17:28entire organization for specific
- 19:17:30Security Group and these are emailed
- 19:17:33enabled Security Group anything which
- 19:17:35you want to use on powerb service it
- 19:17:37should be emailed enabled and accept so
- 19:17:40most of the time you will get these
- 19:17:42three setting sometime you may get one
- 19:17:44or two but that depends on that
- 19:17:46particular setting this is basically to
- 19:17:48get the help I disable it and cancel it
- 19:17:50email notification if you want to
- 19:17:52receive your custom messages now
- 19:17:53workspace want to allow to use the
- 19:17:55create workspace or not I have allowed
- 19:17:57it for the entire organization use
- 19:17:58cementing model across workspaces means
- 19:18:00I create a workspace I create a model or
- 19:18:03data set in one workspace and I want to
- 19:18:05use it in another workspace so what
- 19:18:06would we will do is we'll create the
- 19:18:07data set in workspace and reports in
- 19:18:09another workspace so that particular
- 19:18:11users of that workspace will not see the
- 19:18:13data set in that particular workspace so
- 19:18:15these kind of stuff we can do block user
- 19:18:17from reassigning personal workspace my
- 19:18:19workspace so we have disabled that they
- 19:18:21can't reassign the personal workspaces
- 19:18:23Define workspace retention period you
- 19:18:25can define a workspace retention period
- 19:18:27so basically deleted workspace can be
- 19:18:29recovered after that there you have n
- 19:18:31number of feature like every export you
- 19:18:33can do like publish to web is controlled
- 19:18:35copy paste visual is control on service
- 19:18:37export to excel from service is control
- 19:18:39export to CSV is control download report
- 19:18:41is control all the features which which
- 19:18:42are available on powerbi service most of
- 19:18:45those menu items are controlled from
- 19:18:48here including which SSO is enabled
- 19:18:51which is not enabled there are certain
- 19:18:53visuals which are allowed or not allowed
- 19:18:55including your map visuals all settings
- 19:18:57are available here developer setting
- 19:18:59admin API setting gen one data flow
- 19:19:02people can create it or not template app
- 19:19:04and you want to create the app Q&A
- 19:19:06settings semantic model security block
- 19:19:08republish and disable refresh package
- 19:19:10that setting is available advanced
- 19:19:12networking using a your private link
- 19:19:14metries setting user experience
- 19:19:16experiment share data settings inside
- 19:19:18setting data Mar setting data model
- 19:19:20setting quick major settings scaleout
- 19:19:22setting one leg setting G integration
- 19:19:24setting so many settings are there we
- 19:19:26can spend days in explaining those but
- 19:19:29this is all for admin user but right now
- 19:19:30we are learning basics of powerbi so we
- 19:19:32are more bothered about our workspace
- 19:19:34and what we are going to do with that so
- 19:19:35we have a workspace ready and once we
- 19:19:38have the data set here we will be able
- 19:19:40to create report online now we have
- 19:19:42given in this workspace to edit the
- 19:19:43model we will be able to edit the model
- 19:19:45also the only thing as a pure play
- 19:19:47powerbi user which you cannot do is you
- 19:19:49can't create a data set on powerb
- 19:19:51service most of the other thing you can
- 19:19:52do you can create report you can modify
- 19:19:54report you can edit data set but you
- 19:19:56will not be able to create a model or
- 19:19:57add new content here you can't create
- 19:19:59connections and bring it so what we are
- 19:20:01going to do here we going to publish a
- 19:20:02report we will also learn data set
- 19:20:04dashboard and app here in the powerbi
- 19:20:06service which are basic feature one must
- 19:20:08know so let's go back to the powerbi
- 19:20:10desktop publish a report come back here
- 19:20:12and see what we are able to
- 19:20:14create we are back on powerbi desktop
- 19:20:18and here we have a report where we don't
- 19:20:20have any visualization we have just
- 19:20:22created one page because we wanted to
- 19:20:24implement the pattern of having
- 19:20:28visualization only to be used on a data
- 19:20:31set file after it has been published
- 19:20:33this is a file which doesn't have any
- 19:20:35local database all online database it
- 19:20:38will not require on promise Gateway for
- 19:20:40refresh I'll go to the Home tab of this
- 19:20:43file and I'll press on
- 19:20:45publish I have made sure that I have
- 19:20:47logged in using the same user which I'm
- 19:20:49using on app. power.com so let's click
- 19:20:52on publish and it will ask me to save if
- 19:20:54the report is not saved and post that it
- 19:20:57will showcase me the
- 19:20:58workspaces my workspace available for
- 19:21:01everyone every kind of user even for
- 19:21:03free user usually not used for sharing
- 19:21:06so we should not keep a report into the
- 19:21:08my workspace which we want to share it
- 19:21:10is for personal content and we should
- 19:21:12avoid using the content which you want
- 19:21:14to share so we are going to put the
- 19:21:16content into end to end which is the
- 19:21:19workspace we have created for
- 19:21:21sharing let me click on end to end and
- 19:21:25click on select and this action will
- 19:21:28publish the
- 19:21:30file it's giving the message that it is
- 19:21:32publishing end to end file to powerbi
- 19:21:35which is nothing but powerbi service
- 19:21:37meet or
- 19:21:39collaboration so file has been published
- 19:21:42success sucessfully onto the powerbi
- 19:21:44service and now we can go and check out
- 19:21:47our file on powerbi service I clicked on
- 19:21:50got it and let me jump onto the powerbi
- 19:21:53service quickly on the powerbi service
- 19:21:56I'm able to now see after the page has
- 19:21:59refreshed two things one is report which
- 19:22:02is only have one page anytime you
- 19:22:03publish a PBX you will get a report and
- 19:22:05the semantic model or data set the
- 19:22:07semantic model is a new name we usually
- 19:22:10know it by the name data model or data
- 19:22:12set in the case of import mode it will
- 19:22:14contain both data and meta in case of
- 19:22:17direct query it will only contain meta
- 19:22:20in case of live mode we are going to use
- 19:22:21the data set which is published already
- 19:22:24so the report will contain the small
- 19:22:26information about the majors which we
- 19:22:27are going to create so now we have our
- 19:22:29semantic model and using this semantic
- 19:22:32model we can create the report either in
- 19:22:34powerbi desktop or on powerbi service so
- 19:22:37first of all what we are going to do
- 19:22:38here is we will check this semantic
- 19:22:40model what we can do out here if I click
- 19:22:43on that it will open this UI for the
- 19:22:45semantic model where I have file
- 19:22:47download this file means I will be able
- 19:22:49to download the data set manage
- 19:22:51permissions on this data set who can do
- 19:22:53what on this then I can refresh refresh
- 19:22:56now schedule refresh history it means if
- 19:22:58I want to refresh the data I can refresh
- 19:22:59it from here I can share it I can
- 19:23:01explore this data I can create a few
- 19:23:04visualization here just exploring
- 19:23:05without even creating a report then in
- 19:23:08the explore data I do have option for
- 19:23:11autocreate report create create blank
- 19:23:12report create paginated report I can
- 19:23:15analyze in Excel by clicking on this so
- 19:23:17if I click on this it will create an
- 19:23:19Excel file for me and there my data set
- 19:23:22would be attached and using this data
- 19:23:23set I will be able to create pyot tables
- 19:23:26and analyze it you want to see lineage
- 19:23:28lineage means from where this data is
- 19:23:30coming on which report it is going all
- 19:23:32this is going to you are seeing this
- 19:23:34open data model button because we have
- 19:23:36allowed data model editing on the
- 19:23:38powerbi service in our workspace setting
- 19:23:40and because of that it is showing this
- 19:23:43option and if you click on that it will
- 19:23:45open the data model and you can change
- 19:23:47few things out here you can create new
- 19:23:49major new column new table you can
- 19:23:53create using the Dex formula you can
- 19:23:55create new calculation groups you can
- 19:23:57manage roles manage relationship and
- 19:24:00create new report on powerbi service
- 19:24:02that many things you can do in the
- 19:24:05semantic model on the online version
- 19:24:07once you allow to edit it calculation
- 19:24:09groups has been added very recently on
- 19:24:12power our bi service let's go back to
- 19:24:14the UI so these are the things which we
- 19:24:16can do so what we are going to do is we
- 19:24:17will quickly now have a look at few of
- 19:24:19these things like creating a report here
- 19:24:22and desktop and creating a dashboard uh
- 19:24:24we will avoid editing of data model we
- 19:24:26have done a lot of work on the powerbi
- 19:24:28desktop and things would remain same
- 19:24:32here we have published our file without
- 19:24:36any visualization on powerbi service and
- 19:24:39we got a centic now we would like to use
- 19:24:41that centic model and create the
- 19:24:43visualization file and this is going to
- 19:24:45the file which we are going to use for
- 19:24:47creating the end user reports or Dash so
- 19:24:50go to the Home tab and inside the Home
- 19:24:53tab now you need to go and grab the
- 19:24:55powerbi semantic model now this
- 19:24:57connection which you are going to do
- 19:24:59with the CCH model is known as live
- 19:25:00connection and live doesn't mean it's
- 19:25:02kind of a direct query on the database
- 19:25:03it is as good as what you have refreshed
- 19:25:05your data set but this particular file
- 19:25:08is neither going to on the data or not
- 19:25:11it is going to on on the model the model
- 19:25:13is coming from the SCE so RLS and
- 19:25:15everything is controlled at the
- 19:25:17cementing model level so what I'm going
- 19:25:19to do here is I'm going to take this end
- 19:25:21to endend model and going to create a
- 19:25:23report out here with the all the kind of
- 19:25:25visualization I have taught to you till
- 19:25:27now you have to click on semantic model
- 19:25:29which you want to bring in and connect
- 19:25:31and it will create a live connection
- 19:25:33once you create the live connection you
- 19:25:34will not be able to add new table new
- 19:25:36columns all those are not allowed the
- 19:25:39moment this model is loaded you will see
- 19:25:41you only have have access to the report
- 19:25:43View and model view the access for
- 19:25:45everything else is gone the data View
- 19:25:47and everything you can see the model
- 19:25:48here but if you click on any of the
- 19:25:50table you don't see option for new
- 19:25:52column new table new calculation group
- 19:25:55manage Ro view rooll everything is
- 19:25:57disabled you can't do that so you are in
- 19:25:58kind of a view only mode for this model
- 19:26:00it means it's the best condition to
- 19:26:02create the visualization so what I'll do
- 19:26:04is I will create this report I will try
- 19:26:07to have one or two pages in this one and
- 19:26:10while I'm creating this report you just
- 19:26:12observe you I have already taught you
- 19:26:13all the features how to create different
- 19:26:15kind of slicer Pages visualization Etc
- 19:26:19what I have done uh which I realized
- 19:26:21after starting this file is that uh the
- 19:26:24images which I have used uh brand image
- 19:26:27brand URL and image URL as columns has
- 19:26:30not worked so I added measures for that
- 19:26:33just by taking Max of those columns and
- 19:26:35I'm going to use them here so I'll
- 19:26:37quietly build it and I'll speed this up
- 19:26:40when this video will get displayed what
- 19:26:43you can do is you can build report of
- 19:26:46your choice and later on those
- 19:26:48visualization can be used inside your
- 19:26:50dashboard on powerbi
- 19:27:11service
- 19:27:41e
- 19:28:11e e
- 19:28:47so what I've done is I've created a
- 19:28:49single page and I'm going to publish
- 19:28:51this uh and you can create a page which
- 19:28:53you would like to have more details
- 19:28:55usually we will have multiple pages and
- 19:28:57communicating the message I just created
- 19:28:58one example here how what kind of page
- 19:29:00we can create uh but based on the design
- 19:29:02and requirement you can create the page
- 19:29:04and now what we are going to do is we
- 19:29:05are going to publish this but before
- 19:29:07publish it's going to ask us a name so
- 19:29:09I'm going to save it and I'll call it
- 19:29:12and to and visual file this is visual
- 19:29:15file you can give a name of your choice
- 19:29:17or as per your organization standard I'm
- 19:29:19right now giving this name because I
- 19:29:21want to just differentiate that it's a
- 19:29:22visual
- 19:29:23file and we going to publish it to the
- 19:29:26end to endend workspace only we are not
- 19:29:28going to create a different workspace
- 19:29:29for this the file is published now we
- 19:29:32will go on powerbi service and check
- 19:29:34this file we would also like to create a
- 19:29:37new report there and let us see how
- 19:29:39things are different in powerbi service
- 19:29:42compared to powerb
- 19:29:46desktop I'm back on powerbi service and
- 19:29:49let's go to end to end to check the
- 19:29:51newly published report end to endend
- 19:29:53visual the report has opened and as you
- 19:29:56can see in end to endend visual report
- 19:29:58we got our report which we have created
- 19:30:00on the dashboard we got the slicer which
- 19:30:03we can click and filter the
- 19:30:06data so this is the viewer View and this
- 19:30:08is how viewer is going to use it
- 19:30:10remember I am an admin admin viewer
- 19:30:12means I have the admin privilege on this
- 19:30:14workspace so what I'm getting in my
- 19:30:17menus could be a little bit more than
- 19:30:18what and user is going to get here so
- 19:30:21I'm able to filter then same way like
- 19:30:23desktop we can slice and dice using the
- 19:30:26visual interactions and data will get
- 19:30:28filtered across as I have a single page
- 19:30:30as of now I'm not seeing the page menu
- 19:30:32but here once you have more than one
- 19:30:34page you will be able to see a small
- 19:30:36Arrow icon to take you to the different
- 19:30:38pages if you click on the file you have
- 19:30:40option save as a copy again I'm admin
- 19:30:42because of which I'm getting but viewers
- 19:30:44might not get it depends on the
- 19:30:45permission which we are providing to
- 19:30:47them download this file manage
- 19:30:49permissions print this page embed report
- 19:30:53generate QR code settings these
- 19:30:55permission all depends on which kind of
- 19:30:58access we have given to the end user I'm
- 19:31:00admin viewer so I'm getting all these
- 19:31:02again export option analyze in Excel
- 19:31:04PowerPoint PDF depending on the viewer
- 19:31:07access now if you go to the visual there
- 19:31:09are these filters which are available
- 19:31:12then there is a set aler option then
- 19:31:14copy this as an image again copy this as
- 19:31:16image if you remember we have this
- 19:31:18option control which all users can do
- 19:31:21and then you have this pin visual which
- 19:31:22we will be using while creating the
- 19:31:24dashboard you have option to share on
- 19:31:26the top you have chat in the teams
- 19:31:30explore this data get inside subscribe
- 19:31:33to the report set alerts and edit and as
- 19:31:35I'm having permission on this workspace
- 19:31:37to edit the report I will be able to
- 19:31:39edit that report and again these are
- 19:31:42some additional permissions which I can
- 19:31:43see here now as a viewer you will also
- 19:31:46be able to see filter pane now the
- 19:31:47filter pane you will only be able to see
- 19:31:49if the filter pan is enabled we can hide
- 19:31:51the filter pan while creating the report
- 19:31:53then users will not see once user click
- 19:31:55on any of the visual just like I've
- 19:31:56created on this tag bar visual they will
- 19:31:59be able to see the visual level filters
- 19:32:00also few more things which they can do
- 19:32:03is view we they can view as a full
- 19:32:06screen cape and come back then they have
- 19:32:09this fit to page
- 19:32:12fit to
- 19:32:15width and actual size all these option
- 19:32:18they can also explore then there's a
- 19:32:20comment users can give give a comment
- 19:32:22out here you can click on got it and
- 19:32:26then you can start writing down the
- 19:32:27comments this is for the
- 19:32:30collaboration we close the comments then
- 19:32:32you have this Mark as a favorite if you
- 19:32:34click on this this report will be marked
- 19:32:35as favorite so what I'm going to do here
- 19:32:37is I'm going to click on edit and I will
- 19:32:39try to modify this report what I'm going
- 19:32:42to do here is I'm going to create a
- 19:32:43little bit of space and for that I'm
- 19:32:45going to delete this card Visual and
- 19:32:47also let me do one thing I'm going to
- 19:32:49make this slicer as a normal button
- 19:32:52slicer so I'll create it as this kind of
- 19:32:54a slicer and then I'll go ahead and go
- 19:32:58to the slicer setting and I'll create it
- 19:33:00as tiles now with these changes let me
- 19:33:03go ahead and further do more changes in
- 19:33:06this report in the edit mode and
- 19:33:09showcase you what all we can do in the
- 19:33:10edit mode I can even modify the model
- 19:33:13because of my setting I can add a new
- 19:33:15page and create additional visualization
- 19:33:17here so let's I can plus a a page and I
- 19:33:19can call it as detailed page and I can
- 19:33:22add additional visual to that page let's
- 19:33:24say I want to add a trend I can bring in
- 19:33:26month year here and I can bring net and
- 19:33:28then can I can convert this into a line
- 19:33:31visual I can add additional visuals
- 19:33:40here so so here I have added a page in
- 19:33:43this manner you can edit a report on
- 19:33:46powerbi service and you can save it now
- 19:33:48there are various options in a powerbi
- 19:33:51service report so if you go to the file
- 19:33:53you can save save as new copy print if
- 19:33:55you want to print the current batch you
- 19:33:57want to embed this then you can generate
- 19:33:59embed code this is the embedded code
- 19:34:01which you can use then embed in
- 19:34:03SharePoint online you can get the code
- 19:34:05for embed SharePoint online publish to
- 19:34:08web now publish to web is a permission
- 19:34:11which we need to give and once we give
- 19:34:13this content would be available publicly
- 19:34:15now my content is basically learning
- 19:34:18content so I can publish it to web but
- 19:34:20your organizational content you should
- 19:34:22not publish it to web you should instead
- 19:34:24use uh the other secure ined method
- 19:34:27export to PowerPoint you can export it
- 19:34:29to PowerPoint with the current value or
- 19:34:31with the default values two options
- 19:34:33exclude hidden Pages only export current
- 19:34:36pages and in that manner you can export
- 19:34:38it to PowerPoint it will generate a
- 19:34:40PowerPoint and you will be able to use
- 19:34:42it also in PowerPoint we have a
- 19:34:44connector for powerbi which can be used
- 19:34:47to connect with the pages of the powerbi
- 19:34:50report live then export to PDF and
- 19:34:52download this file means it will
- 19:34:54download PBX in the view we have fit to
- 19:34:57page fit to width actual width and all
- 19:34:59these options uh we can see different
- 19:35:01page like if the selection pain is not
- 19:35:03coming I can see that if the bookmark
- 19:35:04pain is not coming I can use that if the
- 19:35:06SN slicer pane is not coming I can
- 19:35:08enable that insides pan I can enable
- 19:35:10that so all these things I can enable
- 19:35:12right now I'm disabling those reading
- 19:35:15view we will come out of the edit view
- 19:35:17let's go back to the edit View and then
- 19:35:19open data model then you have options
- 19:35:21for ask a question data drill text box
- 19:35:25you can add shapes you can save this
- 19:35:27report and chat in teams and generate QR
- 19:35:30code analyze in Excel you can download
- 19:35:32and analyze this report in Excel these
- 19:35:35things you can do now let's go back to
- 19:35:36the reading mode and check out more
- 19:35:38options let me give you quick recap of
- 19:35:40the menu items we have here so the file
- 19:35:42options now has save a copy download
- 19:35:45this file manage permissions embed
- 19:35:47report QR code and settings so these are
- 19:35:49the setting for the report the report
- 19:35:51name the description if you want to
- 19:35:53promote endorsement if you want to
- 19:35:55promote this report to the users you can
- 19:35:57use that and there are a few other
- 19:35:59options which you can use export analyz
- 19:36:01in Excel PowerPoint we have already
- 19:36:03checked out PDF you can share this
- 19:36:05report with the others user I can assign
- 19:36:07it to the others users in the
- 19:36:08organization I can share the link mail
- 19:36:11or teams or PowerPoint I can chat with
- 19:36:13the others user regarding this report in
- 19:36:16teams I can further explore this data by
- 19:36:18opening the explore data I can get
- 19:36:21inside subscribe to the report I can
- 19:36:23create a subscription for this report to
- 19:36:25come to me on a given time I'm
- 19:36:27discarding that I can set a alert alert
- 19:36:30can be set on a major for a value high
- 19:36:32or low so threshold greater than or less
- 19:36:35than on which major I need that what
- 19:36:37kind of notification I need and I can
- 19:36:40start my alerts once that setup is done
- 19:36:43and then we have C related contain
- 19:36:45lineage view means from where this
- 19:36:47report is coming pin to a dashboard so
- 19:36:49pin a dashboard here will pin the
- 19:36:51complete page on the dashboard on the
- 19:36:53individual visuals we do have a option
- 19:36:55to pin them to the dashboard that we can
- 19:36:58use to pin the individual visual on the
- 19:37:00dashboard other than that we have option
- 19:37:02view semantic model which we have
- 19:37:04already seen it will open the santic
- 19:37:06model and then there we can go ahead and
- 19:37:08open the catic model again so means this
- 19:37:11is going to led us to the first screen
- 19:37:13of the semantic model then there is an
- 19:37:14open semantic model after that we can go
- 19:37:16ahead and edit that and as you have seen
- 19:37:19we have enabled the option to edit it in
- 19:37:21the powerbi service so we'll be able to
- 19:37:22edit that now other than that in case
- 19:37:24your organization have the f64 capacity
- 19:37:28onwards or P1 capacity onwards you will
- 19:37:30be able to use this co-pilot option to
- 19:37:33ask various question both in the viewer
- 19:37:35mode as well as in the edit mode and
- 19:37:37then you have the bookmarks option you
- 19:37:39can add the personal bookmarks or you
- 19:37:41can click on the show more books marks
- 19:37:43to see what all already existing
- 19:37:45bookmarks are there so now what I've
- 19:37:47done is I've covered basically most of
- 19:37:49the options which you have in the
- 19:37:51powerbi service report in the edit mode
- 19:37:55as well as the viewer mode so you have
- 19:37:57to go ahead and explore all these
- 19:37:59options these option keep on changing
- 19:38:01and they keep on increasing also as in
- 19:38:03when we get new features so continue to
- 19:38:06look towards what features are available
- 19:38:09onto the release which is available at
- 19:38:12at that particular moment of time now I
- 19:38:14would like to create a dashboard
- 19:38:16dashboard can only be created on powerbi
- 19:38:19service remember powerbi report which we
- 19:38:21created on the desktop is not the
- 19:38:24dashboard in powerbi World dashboard is
- 19:38:27something which we create on powerbi
- 19:38:29service and to do that what I'm going to
- 19:38:31do is I'm going to open my report which
- 19:38:33I have recently published and in that
- 19:38:35one I have pin icons and using those pin
- 19:38:37icons I'm going to create my dashboard
- 19:38:40remember powerbi dashboard cannot have
- 19:38:42slicers unless we pin the complete page
- 19:38:45so once we pin the complete page then
- 19:38:47only we will have the slicers individual
- 19:38:49visuals will not have slicer we cannot
- 19:38:51pin the slicer and even if we pin the
- 19:38:54complete page the slicer with that page
- 19:38:57is going to impact the section in the
- 19:39:00dashboard which is coming from that page
- 19:39:02not the other visualization so remember
- 19:39:06these difference between powerbi service
- 19:39:08report and dashboard and take a call
- 19:39:11whether you really want to create a
- 19:39:12dashboard or you want to create a report
- 19:39:14I'm back on powerbi service and let's go
- 19:39:17to end to end to check the report has
- 19:39:20opened let me go to the detailed page
- 19:39:23and as you remember we have these three
- 19:39:25dots on three dots we have this option P
- 19:39:27to a dashboard that can pin the complete
- 19:39:30page to the dashboard including the
- 19:39:31slicers remember when in powerb service
- 19:39:34dashboard you cannot add slicers so if
- 19:39:36you go to the individual visuals if I go
- 19:39:38to here on the main page if I go to this
- 19:39:41visual you don't see a pin icon but in
- 19:39:44this one you see a pin visual so pin
- 19:39:45visual will add it to the powerbi
- 19:39:48dashboard but powerbi dashboard cannot
- 19:39:49have slicers you can't pin the slicers
- 19:39:51so if you want the slicers you have to
- 19:39:53pin the complete page so in this manner
- 19:39:55you can pin the visuals to a dashboard
- 19:39:57and create a powerbi service dashboard
- 19:39:59you can pin the visuals from multiple
- 19:40:00reports on powerbi service dashboard and
- 19:40:03you can use that and instead of pinning
- 19:40:05individual visual from the first page
- 19:40:07I'll pin the complete dashboard and let
- 19:40:10me give this dashboard as a new name is
- 19:40:12main Dash Pin live so I have pinned this
- 19:40:15it's giving me go to dashboard option
- 19:40:17but I would like to pin a visual and
- 19:40:19then we will go there then I go to the
- 19:40:21detailed report and from there I'm going
- 19:40:22pin this line visual main Dash as well
- 19:40:26as I'll pin this P visual main Dash and
- 19:40:28now I'll go to the dashboard now when I
- 19:40:30click and go to the dashboard you can
- 19:40:32see that I have my page as well as my
- 19:40:34two visuals which are coming here I can
- 19:40:37change a little bit of layout if I want
- 19:40:39then I can ask certain questions here
- 19:40:41within Q&A it will generate the Q&A I
- 19:40:44can ask top customers by Citys Nets and
- 19:40:47it will generate a visual so that is the
- 19:40:49advantage of giving a dashboard to the
- 19:40:52end user that they can ask questions and
- 19:40:54using those questions they can get
- 19:40:55additional answers if I want to edit
- 19:40:57this dashboard I can edit I can
- 19:40:59subscribe to this dashboard I can chat I
- 19:41:02can comment on this dashboard by adding
- 19:41:04additional comments here I can click on
- 19:41:06any of the visual and analyze the data
- 19:41:08now because I bought a complete page it
- 19:41:10is doing the interactions also now in
- 19:41:12the case of the single visual the moment
- 19:41:14I click on that visual it will take me
- 19:41:17back to my report let's look at the edit
- 19:41:19mode you can add the tile dashboard
- 19:41:22theme mobile layout these things you can
- 19:41:24do with the dashboard now subscribe to
- 19:41:26dashboard I can create a subscription
- 19:41:28for dashboard to deliver to me at a
- 19:41:31particular
- 19:41:33time and on the right hand side if you
- 19:41:35pay attention whatever reports and
- 19:41:37dashboard we have open you're getting
- 19:41:39the icon for that and you can close it
- 19:41:40so I close the dashboard my report is
- 19:41:42open I can close my report my data set
- 19:41:45details is open I can close those data
- 19:41:47set details once you are done with this
- 19:41:49entire exercise of you know creating a
- 19:41:51powerbi report and dashboard and
- 19:41:53everything the next thing which you need
- 19:41:55to do is schedule your data refresh now
- 19:41:57to schedule your data refresh what you
- 19:41:59have to do is you have to go to the
- 19:42:00setting of your semantic model and then
- 19:42:03there you have option for scheduling the
- 19:42:05refresh cementing model is available in
- 19:42:08your workspace and using the three dots
- 19:42:10you can go to the settings and there
- 19:42:11from there you will be able to schedule
- 19:42:13the refresh also in case you are using
- 19:42:17the on premise data then there is an
- 19:42:20option to configure your on promise
- 19:42:23Gateway settings and connection settings
- 19:42:26you can edit as per requirement inside
- 19:42:29the semantic model settings only so
- 19:42:31let's jump onto the workspace once again
- 19:42:35and try to refresh the data set and see
- 19:42:38what all things we can do in my case I
- 19:42:42have a online data so I would not
- 19:42:46require on promise Gateway simply
- 19:42:47refresh should be able to refresh my
- 19:42:50data and also I can schedule it in my
- 19:42:53case because the data is static there is
- 19:42:54no benefit of scheduling it but in real
- 19:42:56time scenario you have to schedule a
- 19:42:58refresh now in case of pro you can get
- 19:43:02refresh as many as eight times in a day
- 19:43:04in case of PPU and premium you will be
- 19:43:06able to schedule refresh 48 times in a
- 19:43:09day if if you want near realtime data
- 19:43:12then you have to choose for direct query
- 19:43:15mode I can go back to my workspace which
- 19:43:18is already open and here what you can do
- 19:43:20because it's a online version I can
- 19:43:22actually refresh my data set to bring in
- 19:43:24the data schedule refresh has been
- 19:43:26disabled refresh as failed let's look
- 19:43:29white as failed so first of all let's go
- 19:43:31to the settings and check out everything
- 19:43:32is fine here so I go to the setting here
- 19:43:34when I scroll down and go to data set
- 19:43:37setting there is error here edit
- 19:43:38credentials and we will use anonymous
- 19:43:41organizational and we'll say sign in
- 19:43:43let's see does it work out yes it has
- 19:43:45worked now let's go back again and see
- 19:43:48do we require a permission or this time
- 19:43:49it's going to refresh it's refreshing
- 19:43:52right now if you see and to check the
- 19:43:53refresh history you can go to the
- 19:43:55settings again three dot settings
- 19:43:57refresh history it will show you the
- 19:43:59refresh is in progress and once it is
- 19:44:01refreshed it will give you a message
- 19:44:03that refresh is
- 19:44:04completed and the refresh has completed
- 19:44:07while we were checking that out and new
- 19:44:09data has come so in this manner you can
- 19:44:11refresh the data but before you refresh
- 19:44:14the data what you have to do is because
- 19:44:16I was only having up one data source and
- 19:44:19my data source was online data source it
- 19:44:22does not require Gateway otherwise you
- 19:44:24have to configure on promise Gateway
- 19:44:26right now it is the cloud connection but
- 19:44:28you might have to configure on promise
- 19:44:30Gateway if you're using on promise
- 19:44:31sources once you configure your on
- 19:44:33promise Gateway you have to configure
- 19:44:35your data source credentials after doing
- 19:44:37that if there are certain parameters
- 19:44:39required M query parameter if you used
- 19:44:41we can to set those query cacheing in
- 19:44:44case you want so you can turn on the
- 19:44:46query caching refresh this is the
- 19:44:48scheduled refresh I can schedule it to
- 19:44:50refresh daily on a particular time so
- 19:44:52once I click on on I need to add a time
- 19:44:54and then I can apply and now it will get
- 19:44:57refresh daily at 1:00 a.m. right now I'm
- 19:45:00disabling it because I don't want it to
- 19:45:02happen server settings this is my server
- 19:45:04data connections then Q&A features all
- 19:45:07these are data settings which we can
- 19:45:09change let me go back to my by workspace
- 19:45:11so now you know how to refresh your data
- 19:45:13set also now whatever Gateway and
- 19:45:16connections we have where do we monitor
- 19:45:18those so in the setting icon you can go
- 19:45:20to manage gateways and connection and
- 19:45:23here you will be able to see all your
- 19:45:25connection under the connection if you
- 19:45:27have set up on promise Gateway you will
- 19:45:29be able to see on promise Gateway in the
- 19:45:31past I have set up a on promise Gateway
- 19:45:33that you are seeing if there are virtual
- 19:45:35Network gateways you will be able to see
- 19:45:36it here so in this manner you will be
- 19:45:38able to see your connection details and
- 19:45:40Gateway
- 19:45:45now let's quickly understand how can we
- 19:45:47create a allog together new report on
- 19:45:50powerbi service using a data set so
- 19:45:52there is an option on the Home tab or
- 19:45:53there is a create button here on the
- 19:45:56left hand side top once you click you
- 19:45:58can paste data manually or you can pick
- 19:46:00up a publish data set I'll pick up a
- 19:46:02publish data
- 19:46:04set end to end autocreate report or
- 19:46:09create report from blank you can use
- 19:46:11autocreate report and powerbi will
- 19:46:12create a report for you I'll create a
- 19:46:15blank report just to explain it to you
- 19:46:17and I am on the very similar UI what saw
- 19:46:19in the
- 19:46:21edit report now here I can quickly
- 19:46:25create a visual I'll just go to create
- 19:46:27one visual for giving an
- 19:46:33example I have created a visual and now
- 19:46:35I can save it so when I save it for the
- 19:46:37first time it will ask me a
- 19:46:39name and let let me call it service
- 19:46:47report and click on Save the moment I
- 19:46:50save it for the first time it will take
- 19:46:52me to the reading mode after that when I
- 19:46:55go to the edit mode and now save it it
- 19:46:57will remain in the edit mode so in this
- 19:46:59manner you can edit your reports or
- 19:47:03create new report on the powerbi
- 19:47:08service service we have a version of
- 19:47:11power query online where we can
- 19:47:14actually transform our data centrally
- 19:47:17that is known as data
- 19:47:19flow now the reason why we have data
- 19:47:22flow here on the powerbi services
- 19:47:24basically what happens sometime multiple
- 19:47:27teams use similar kind of power query
- 19:47:31transformation and that is why we want
- 19:47:33to centralize those transformation that
- 19:47:35is why on powerbi service we can create
- 19:47:38data flow data flow can centralize all
- 19:47:41these
- 19:47:42transformation in the fabric world we
- 19:47:45also call it data flow gen one now data
- 19:47:47flow are for data prep data cleaning and
- 19:47:51data transformation you can use data
- 19:47:53flow just like you use power query on
- 19:47:55the desktop once you do the
- 19:47:57transformation you can use it as a
- 19:47:59source on power ba desktop to create
- 19:48:01your new report in a Ideal World we will
- 19:48:04create a data flow for our Dimensions
- 19:48:07where we need lot of transformation or a
- 19:48:09small table where we need need a lot of
- 19:48:11transformation we can centralize all
- 19:48:13those transformation in the data flow so
- 19:48:16we can have a dimension in the data flow
- 19:48:18then we will use this data flow along
- 19:48:20with our facts directly coming from the
- 19:48:23sources into a data set we will publish
- 19:48:25that data set which is a powerb desktop
- 19:48:28file we'll publish that data set without
- 19:48:30creating a visualization and once that
- 19:48:32data set is published we'll use it again
- 19:48:34and would create a visual file I'll just
- 19:48:37go to give you how do you create a data
- 19:48:39set so press new and data set you will
- 19:48:43be landed on powerbi data set here you
- 19:48:46can define a new table link table from
- 19:48:48other data flows import mode means you
- 19:48:50can import a model attach common data
- 19:48:53model folder okay so I'll use this add a
- 19:48:56new table it will L me to the UI to
- 19:48:58bring in the data and here I will use
- 19:49:01this web API in the web API I will bring
- 19:49:05in my data from GitHub so let me go to
- 19:49:08the
- 19:49:08GitHub and bring in my file says data
- 19:49:12used in video I click on that right
- 19:49:15click on Raw copy link go back to the
- 19:49:17powerbi service give this
- 19:49:20URL I have already used it so it is not
- 19:49:22asking for any further details press
- 19:49:26next and I can add all of
- 19:49:29them and then I can click on transform
- 19:49:32data it it will add the data to the
- 19:49:34power bi data flow and here I can do the
- 19:49:38transformation clean data prep
- 19:49:40everything now if you remember in the
- 19:49:42sales table I added some column index
- 19:49:45the same columns could have been added
- 19:49:46to the powerbi data flow or power query
- 19:49:49also I can go here and can use add
- 19:49:52column and can add a custom column let's
- 19:49:55call it
- 19:49:57gross and gross is nothing but quantity
- 19:50:01multiply by price and I can give it as a
- 19:50:04data type decimal number okay in the
- 19:50:07same manner I can use other columns and
- 19:50:09then I will be able to complete my
- 19:50:12transformation once I'm done with all my
- 19:50:15transformation I can go ahead and use
- 19:50:17Save and close to save the all the data
- 19:50:20in my data
- 19:50:22flow it's going to check and it will ask
- 19:50:26for a name I'll will call it sales data
- 19:50:29flow and I'll give the same
- 19:50:32description I'll save it how it is
- 19:50:34really important that the data flow by
- 19:50:37default doesn't load data so the very
- 19:50:39first time you need to refresh it now so
- 19:50:43you have to click refresh now now
- 19:50:45typically on D Gen 2 which is on
- 19:50:48Microsoft fabric Auto refresh kick off
- 19:50:51immediately after publish but this
- 19:50:53doesn't happen in data flow gen one we
- 19:50:56have to manually kick it on every time
- 19:50:58you do changes you need to do a
- 19:51:00refresh you can close it and when you
- 19:51:03come here on your workspace you should
- 19:51:06be able to see this data flow and you
- 19:51:09can go to the refresh history to check
- 19:51:12if the data is loaded or not in our case
- 19:51:14the data is already loaded here now what
- 19:51:17we need to do is we need to go to the
- 19:51:19powerb desktop and use this data
- 19:51:23flow so I'll open up a new
- 19:51:27file on powerb desktop I'll open a new
- 19:51:33file the new file is opened and here now
- 19:51:36I want to bring in data from powerbi
- 19:51:39data flow so I'll use get data more and
- 19:51:43there I need to go to data flow I can
- 19:51:46search for
- 19:51:48that I got option for data flow power ba
- 19:51:52data flow Legacy data
- 19:51:55flows so they are coming from different
- 19:51:57different places so let's use powerbi
- 19:52:00data flu Legacy and use
- 19:52:06connect let me try to sign in
- 19:52:11let me use
- 19:52:16connect and in the end to end I able to
- 19:52:19get my data flow from here I can pick up
- 19:52:21all the four tables and load the data
- 19:52:25from here I have to do all the steps
- 19:52:27which I've done during this exercise
- 19:52:29creating the model measures all the
- 19:52:33calculations field parameters
- 19:52:36calculation group Etc and then finally
- 19:52:39publish this and once I publish this
- 19:52:41file I'll get a data set and I can use
- 19:52:44that data set again to create my
- 19:52:46visualization as you are already aware
- 19:52:48of all those steps you can try that out
- 19:52:50I will simply share it as a new and to
- 19:52:54and
- 19:52:56file in this manner you can use powerbi
- 19:53:00data flow to centralize all your
- 19:53:02transformation data preparation and data
- 19:53:05cleaning
- 19:53:10in powerbi workspace we have app this
- 19:53:14app has a really important role when we
- 19:53:16want to share the content with the users
- 19:53:18and we don't want to give these
- 19:53:19workspaces kind of a look to them so
- 19:53:22what we typically prefer is we give them
- 19:53:24an app access so what we going to do is
- 19:53:27we are going to use this create
- 19:53:29app and we can give it as a name let's
- 19:53:32say bi app can give a
- 19:53:36description we can choose a color for
- 19:53:38our app and and we can upload a logo for
- 19:53:42that then we can go to the content and
- 19:53:44add a
- 19:53:46Content so we can add the reports which
- 19:53:49we have end to end and service report
- 19:53:52okay all these reports we can add
- 19:53:54multiple reports we have so we can add
- 19:53:55those
- 19:53:56reports now inside each report if there
- 19:53:58are multiple Pages it's going to show
- 19:54:00those pages and we can see those pages
- 19:54:03so we have multiple content which
- 19:54:05is now how do you differentiate content
- 19:54:08for different people so when you go to
- 19:54:10the audience actually you have these
- 19:54:13show hiide buttons using these show
- 19:54:16hiide buttons you can create different
- 19:54:17kind of audiences so you can say new
- 19:54:20audience you created a new audience now
- 19:54:23see this is bi app this is new audience
- 19:54:27now this new audience I can refer as
- 19:54:31let's say service only I want to give a
- 19:54:33service
- 19:54:34report so I'll give a service report to
- 19:54:37that audience and I can hide other
- 19:54:39things let's say I can hide these only
- 19:54:41will have service report then I can give
- 19:54:44the users who will be audience of
- 19:54:46service report in powerbi app I can give
- 19:54:48the audience who will be audience of B
- 19:54:51app if you want to give it to entire
- 19:54:52organization you can choose entire
- 19:54:53organization but there's no benefit of
- 19:54:55creating multiple audience if you are
- 19:54:56giving this report to entire
- 19:54:58organization now there are Advanced
- 19:54:59option like allow people to share the
- 19:55:02data set in this app audience allow
- 19:55:04people to build the content with this
- 19:55:06data set in the app audience so you can
- 19:55:08give those permission as per requ
- 19:55:10requirement usually what we do is we
- 19:55:12assign it to users or to the emailed
- 19:55:14enabled list and then finally after we
- 19:55:17decide our audience decide the reports
- 19:55:19so in this workspace I can have n number
- 19:55:22of reports out of those reports I can
- 19:55:24decide which I want to add in app and
- 19:55:26out of those reports I can decide which
- 19:55:28reports will go to which audience so
- 19:55:29once I'm done with that I can publish
- 19:55:31this app and this will be shared with
- 19:55:33users in the content I can add some
- 19:55:36headers sections and all those I can
- 19:55:38divide these reports inside the category
- 19:55:39and all those I can do so I can create
- 19:55:42different sections also so let me
- 19:55:44finally publish this app and it will be
- 19:55:48published it will show a URL which you
- 19:55:50can copy or you can click on go to app
- 19:55:52you can share this URL with the users
- 19:55:55and this will now open powerbi Service
- 19:55:57app and you can see with the chosen
- 19:56:00color we are seeing the app and this is
- 19:56:02the better way to give it to the end
- 19:56:04users they can have access to multiple
- 19:56:06reports at one place and we don't have
- 19:56:08to share each and every report they have
- 19:56:10very similar options what we had in the
- 19:56:13powerbi service so they have print this
- 19:56:15page embed report QR code
- 19:56:18share export and remember all these are
- 19:56:22controlled from the permission what we
- 19:56:25have given at the tenant level so in
- 19:56:27this manner you can create and share an
- 19:56:33app if you remember when we were
- 19:56:35analyzing the data on powerbi service we
- 19:56:38have downloaded one Excel for analyzing
- 19:56:39EX ex this is the same Excel I have
- 19:56:42opened up and also enabled the content
- 19:56:45and I'm getting now all my data which I
- 19:56:48can analyze here and here also I can
- 19:56:51create a pyot table you can already see
- 19:56:53there is enablement of pyot table H so I
- 19:56:56can go here and choose certain things
- 19:56:58let's say I can bring in brand on the
- 19:57:00row and then I can bring in certain
- 19:57:02majors for
- 19:57:05analysis and I can start my analysis in
- 19:57:08this manner if you are a Excel user you
- 19:57:10still like to be an Excel user but you
- 19:57:13don't want to you know download the data
- 19:57:16and analyze it you can simply connect to
- 19:57:17this data set you need to have
- 19:57:19permission to for that and once you have
- 19:57:21permission you can do that it is not
- 19:57:23that you can always have to do analyze
- 19:57:25in Excel you can go to the data and in
- 19:57:28the versions depending on what version
- 19:57:30you have inside the get data you do have
- 19:57:33option to connect Power Platform and
- 19:57:36there you can connect with powerbi and
- 19:57:38you can again create similar kind of
- 19:57:40visualization so you can initiate
- 19:57:42process from here also so now I can save
- 19:57:45this and keep
- 19:57:48it another thing which we have done is
- 19:57:50we have downloaded this PowerPoint so as
- 19:57:52you can see this PowerPoint has been
- 19:57:55downloaded it has been created as
- 19:57:57image so what we can do here is we can
- 19:58:00add a new content and try to use the
- 19:58:02powerbi plugin so we have a powerbi
- 19:58:05plugin to connect live and get the data
- 19:58:08from powerbi directly so I'll add a new
- 19:58:10slide here a new blank slide and inside
- 19:58:13that new slide let me add this powerb
- 19:58:15plugin in the newer version which is by
- 19:58:17default available in the older version
- 19:58:18you can go ahead and add it from the
- 19:58:20adding now it needs a URL to get this
- 19:58:22URL I need to go to the powerbi service
- 19:58:25report and in the powerbi service report
- 19:58:27this is the report I have which is right
- 19:58:29now open so I can go to share copy
- 19:58:33link copy this link come back and paste
- 19:58:36it inside our PowerPoint
- 19:58:41click on insert and this is inserted now
- 19:58:44into the PowerPoint and if you go here
- 19:58:47in the data option you have the refresh
- 19:58:49option you can get the new data you have
- 19:58:52the Data Insights you have filter
- 19:58:54section you can filter the data you can
- 19:58:56hide the filter section you can enable
- 19:58:57the filter section there are few more
- 19:58:59options like clear data learn then
- 19:59:02outline all these options are available
- 19:59:04so basically you can connect live you
- 19:59:06don't need images now when I downloaded
- 19:59:08it came with images now I can have a
- 19:59:10PowerPoint with the live connection and
- 19:59:12in that one I can embed the my
- 19:59:14visualization and I don't need to go
- 19:59:16back to powerb service while doing the
- 19:59:18presentation itself I can slice and dice
- 19:59:20the data so let's look at this first
- 19:59:22page now it is a static image I can't
- 19:59:24slice and dice isn't it but if I go
- 19:59:26ahead and add this page let me bring in
- 19:59:29that particular page so close this go to
- 19:59:32the main page share copy link copy copy
- 19:59:36this let's go back to the PowerPoint add
- 19:59:38the power VI plugin give it a space
- 19:59:41paste this URL insert and now I have my
- 19:59:45page is it working look at this I
- 19:59:47analyzing data here on
- 19:59:50PowerPoint I'm no more going back to
- 19:59:53Power I can go here filter the data here
- 19:59:56the data is reflect changing based on
- 19:59:57interactions I can go here and select
- 20:00:00States whatever I
- 20:00:02like and the data will keep on filtering
- 20:00:06so in this manner I can have a dynamic
- 20:00:09slide on on my PowerPoint and I can
- 20:00:11analyze the data directly from powerbi
- 20:00:13service page which is embedded here and
- 20:00:15to give more space you can hide the
- 20:00:17filters as I shown you you don't need
- 20:00:19that section what happens when you're
- 20:00:20doing the presentation you have lot of
- 20:00:21content but your power ba content is
- 20:00:23static now you can make that content
- 20:00:25that Dynamic by using this powerb
- 20:00:27plug-in in PowerPoint instead of
- 20:00:28downloading this static image you can
- 20:00:30use this and create Dynamic slides on
- 20:00:33PowerPoint friends you have reached to
- 20:00:35the end of this video you have covered
- 20:00:3820 hour of detailed video along with me
- 20:00:41in learn powerbi full course I'm hopeful
- 20:00:45this video would have enhanced your
- 20:00:47powerbi knowledge to the next level and
- 20:00:50now you are a pro in
- 20:00:52powerbi powerbi is a journey it's just a
- 20:00:57beginning friends this is just a
- 20:01:00beginning with this video you are now
- 20:01:03appr pro powerbi professional to become
- 20:01:06expert take full advantage of 600
- 20:01:10another videos on my channel also go to
- 20:01:13community. powerbi.com and try to solve
- 20:01:17some of the problems by solving
- 20:01:19Community problem and providing solution
- 20:01:21is the best way to take your powerbi
- 20:01:24journey to the next level this is the
- 20:01:27same thing I have done for years serving
- 20:01:30Community will help you in deep
- 20:01:34understanding of the powerbi concept and
- 20:01:36will help you to solve real time
- 20:01:39problems there would be no lack of
- 20:01:41realtime problems once you reach to
- 20:01:44powerbi community so friends I would
- 20:01:46like to thank you for your patience of
- 20:01:48watching this 20 hour video please like
- 20:01:51share and comment on this video share it
- 20:01:54with your friends and relatives and
- 20:01:56anyone who is looking to start the
- 20:01:59powerbi journey thank you have a
- 20:02:01wonderful 2025
About this transcript
This page contains the full transcript of Power BI Complete Course 2026 - Beginner to Expert in 20 Hours (Free Tutorial) by Learn Microsoft Fabric, Power BI, SQL Amit Chandak, generated from the public captions YouTube serves with the video. The transcript has 217,627 words across 29,640 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.