How to convert text columns to dates in Power BI?

Step 1: Import your Data to Power BI If you haven’t acquired your dataset, make sure to import it into Power BI. In our case we will import an Excel spreadsheet containing the following columns. All entries in the Year column are of type text (strings). Step 2: Transform text to Dates with Power Query … Read more

How to find time difference between a date and today in Power BI?

Step 1: Familiarize yourself with the dataset In this example, we would like to gather some data to support root cause analysis of a slow hiring process of an imaginary development unit running an hiring campaign. The analysis is obviously more complex, but in this tutorial we will just focus on calculating the number of … Read more

How to subtract two columns in Power BI reports?

Step # 1: Define your measures and columns In this example, we will work with a subset of our Course Registration data model. Our goal will be to calculate the Profit for each Business Intelligence course we are currently delivering. Here is our model: We will focus on two columns in our model: Step # … Read more

How to add an horizontal line to a Power BI chart?

Here’s a question from Alice: I am working on a dashboard which includes a stacked bar chart. Need to add a constant line that runs horizontally starting the ;eft hand side of the y axis and is based on a measure in the data model. Any ideas on how to proceed? Step 1: Create your … Read more

How to count rows with filter in Power BI tables?

Here’s a question from Harry: I have a table with sales data. I would like to create a Power Bi report that will show the count of all specific weeks in which the order intake exceeded a specific amount. Any ideas on how to proceed here. Power BI rows counting with DAX and visuals – … Read more

How to read and import Excel files in R with tidyverse?

Use the readxl package to import contents of an Excel file from your file into a DataFrame Make sure to install the readxl library (or the tidyverse library) into RStudio or other R development environment before calling it from your script. Import Excel files into RStudio – Practical Example Step 1: Import the readxl library … Read more

How to write an R vector to a CSV or text file?

Proceed as shown in the example below to export an R vector object into a csv or text file. You can use this code on RStudio, Jupyter Notebook or other R dev environment. Step 1: Create an R vector We will define a vector composed from character strings. You could as well define a numeric … Read more