Posts

Showing posts from January, 2017

PowerBI : How to Calculate number of WorkingDays between 2 given dates

Image
Here i am going to explain how to calculate number of working dates between to given dates. In my approach i am taking a table called Holidays which contains holidays as shown below Once you have this table , we need to use this table in our Datetime table to calculate IsworkingDay column. Now give the relationship between Datetime and Holidays tables as shown below DAX :  IsWorkingDay = IF (NOT(DateTime[Day of Week]= "Saturday" || (DateTime[Day of Week]= "Sunday")) && COUNTX(RELATEDTABLE(Holidays),2)<1,1,0) Now you can create calculated column or measure  Total Working Days Column =  SUMX (     FILTER (         'Datetime',         'Datetime'[Date] >= Tasks[Input Start Date]             && 'Datetime'[Date] <= Tasks[Input End Date]     ),     'Datetime'[IsWorkingDay] ) Total Working Days Measure =  SUMX (     FILTER (         'Datetime',      

How to connect Azure SQL database from PowerBI Desktop

Image
1.        Please check Azure portal to get the Server and Database name based on the database connection strings shown below. 2.        Open Power BI Desktop 3.          3.  Select getdata and search for azure and from the list select azure sqldatabase  and click Connect 4.        Provide the Server nameand database name collected from azure portal

Machine Learning for beginners

I am planning to start my career in Datascience and want to learn what are  machine learning models and algorithms. I have googled Before starting to learn and collected some of the points and wanted to share with you what i understand , we should understand  following main steps in analysis using machine learning models: 1. Diagnosing the data – before defining the possible approaches to work with data, it is necessary to analyse the raw data itself first. What kind of measurements are included,  which kind of models it is possible to apply to the data and defining the initial goal of the research. Try and identify all the metrics that are important to the business. The metrics we are optimising for have a profound effect on the solution we choose, so it is important to identify these early on. It also affects what alternatives there are to machine learning. 2. Data Preparation – merging data, imputing missing values or excluding variables with too many missing values,