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 filter between two dates in Power BI?

Here’s a question from Louis: A key user asked me to help create a report to dynamically filter contents of a Power BI table between two specific dates. Should be a no-brainer but for some reason i am having a difficult time here. Any ideas? Step 1: Prepare your Power BI data Note: As Time … 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 Text andExcel 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

Convert month number to month name in Power BI DAX

Here’s a question from our reader Melissa: Quick question here: i am using the MONTH DAX function in Power BI to calculate the month number from a date. I can also convert a date to a month name with the DAX FORMAT function; or when loading the data in Power Quey with M. Now my … Read more

How to group values by month and week in Power BI?

Vanessa asks: Just getting started with Power BI and trying to make a simple analysis of sales using a table and a visual. My sales data granularity is by day. Any ideas how to summarize it into a weekly and monthly view. Group by month and week in Power BI visual Aggregate by week and … Read more

How to combine two or more columns in Power BI tables?

Combine two columns into one in Power BI To join two our columns in your Power BI data model table, proceed as following: Merging two columns into one – Practical Example In this section we will provide a simple example for concatenating Quarter and Year columns in a table. We later use the merged column … Read more

How to find the number of days between two dates in Power BI?

Calculate number of days between two days in Power BI To find the number of days in between two dates in Power BI use the DAX DATEDIFF function: Find date differences in PowerBI – A Practical Example Calculate time differences excluding Weekends To calculate the number of days between two data times, but exclude weekends … Read more

How to add a year column to a Power BI table using DAX?

Create a year column in Power BI You can add a year variable to your BI data model by following this process: Format date / time column as year To format a Power BI date value as a year column use the following process: Extract the year and month values from a date column Here’s … Read more

How to check if a Power BI column contains a text string?

Use the following DAX expression to check whether a table column in your Power BI data model contains a specific string: For example: Search for multiple strings: For example: Check that text exists in a Power BI column Importing your Data Set For this example, we will use a simple list of courses that we … Read more