How to get previous or next record in R

Here are two methods how to get the previous or next record in the R data frame. One of them is better in large data frames, but the other is more compact.

How to calculate age in R

Here is how to calculate age in R in a way that humans understand it. If someone has a birthday on 2000-01-01 and today is 2021-07-09, then that person is 21 years old.

Correct age calculation in Power Query

It is not so easy to do age calculation in Power Query in a way that works all the time correctly. There are useful transformations that calculate age, but in specific situations, it is not working properly.

How to connect to Power BI dataset with Excel

Here is one of the easiest ways to connect to the Power BI dataset with Excel to use it in PivotTable. First of all, you or other users should have access to the dataset. If you are the owner of the dataset, then that is not a problem but might be necessary for others.

How to load and combine multiple R RDS files

Saving data into an RDS file is one of my favorite ways to store data, but what if it is necessary to load and combine multiple R RDS files at once? Here is how to do that fast and easily.

Substitute multiple values by using DAX in Power BI

Sometimes it is necessary to replace multiple values at once using DAX, and the first thing that might come to mind is function SUBSTITUTE. Maybe because of Excel background but in that case, the solution is not straightforward.

Get the first and the last date of the week with DAX, Power BI

Sometimes it is necessary to get the first and the last date of the week with DAX to create additional information in the tooltip, filter only full week periods, use weeks for continuous chart axis, etc.

Get data from same week last year in Power BI

Here is how to get data from the same week last year in Power BI using DAX measure. I recommend using ISO week and year numbering to get an equal number of days each week and distinguish each year. Sometimes, when you have an unequal number of weeks in years, it might not be easy,… Continue reading Get data from same week last year in Power BI

One of the easiest ways how to generate random numbers in Power Query

If you know how to generate data in Power Query, it might be very useful to create data sets for reproducible examples. Here is one of the easiest methods how to generate random numbers in Power Query. You can combine with generated dates, time intervals, or other data that you can create with list functions.

Exit mobile version