Posts

Power BI DAX: DAX Measures for CandleStick Chart via Line & Stacked Column Visual

Image
Combine the RSI tool with other technical analytic tool, such as Candlestick tool, can help us to reach more accurate analysed result. In Power BI we can easy to draw the Candlestick chart with custom visual and present it with the RSI chart in a sample report page. But such combined charts in same page sometimes may cause an issue to sync the two charts by the date base at X axis. In the attached  video I have shared an approach to create necessary DAX measures to build Candlestick chart via power BI standard line & Stacked Column visual by which we can overcome the problem. To know more about the approach please watch the demostrations from the published video.

Relative Strength Index Indicators creations in Power BI with R script data transformation

Image
RSI or Relative Strength Index developed by J. Welles Wilder Jr. in 1978 is a popular tool used in technical analysis to gauge momentum and identify potential overbought or oversold conditions in a stock's price movement. It is a “momentum indicator” that averages price gains and losses during a specific trading period, It helps determine whether a stock is more likely to continue its current trend or change direction. It considers daily stock gains and losses, providing a value between 0 and 100, with the equilibrium level at 50. The Interpretation of RSI Levels:   - Overbought (RSI > 70): Indicates that the stock is overbought, and the upward trend may reverse soon. Selling could be prudent. - Oversold (RSI < 30): Suggests that the stock is oversold, and the downward trend may reverse. Buying opportunities may arise. There are  different types of RSI based on its moving average calculations. Here I summarize four typic types of RSI in shortlist as following: ...

Power BI DAX with DAX Stuido to Calculate SMA for Bollinger Bands

Image
 

Power BI Power Query & R: Calculate MACD Indicators With Assumed Initial Values

Image
  The video shares a method by running R script in power query to calculate MACD (Moving Average Convergence Divergence) Indicator with Assumed Initial Value which come from the first closing price data point. In video the advantages and disadvantages of the two MACD calculations, one with initials and one without initials, are compared in a table list. The calculation R scripts are well explained in details with each line in the video as well. You may find and copy the R code lines in my blog site which URL is attached in following. The R code lines as: # Step 1: Load dataset and format data  Dataset <- dataset # format date type as expected date format day/month/year Dataset$Date <- as.Date(Dataset$Date, format = "%d/%m/%Y") # Ensure close_price is numeric Dataset$Close <- as.numeric(Dataset$Close)   # Step 2: Creat Function to calculate EMA calculate_EMA <- function(x, n = 9) {   multiplier <- 2 / (n + 1)   ema <- numeric(length(x)) ...

Power BI with R: R Script Connector Unzips, Combines and Loads the Zipped csv/xlsx/xlsb/xls files

Image
  In this Video I shall share a method on using R in Power BI desktop to unzip the compressed excel files based on the identified file name extensions of extracted files, such as csv, xlsx, xls and xlsb etc, then combine them if they have same column headers and table structure, Finally load the combined data frame into power BI for further data modelling. The introduced R script in this video only focus on loading zipped files from local machine but it is possible to have slight modifications on the R script to be able to fulfil such automatic features online at cloud sites with the required respective http URL paths and access logins.   Let’s get start:   First, we need to prepare the received compressed sample files, we have four excel files with extensions, csv, xls, xlsx and  xlsb. All of them have the same data table structure, same column numbers with same column headers. After compressing them we get a zipped folder for the zipped four files as “Downl...

Power BI Advanced Visual & R: Simulate 3D Quadratic Surface in R Script Visual

Image
  In the video I have shared the detail steps and R script codes on creating 3D quadratic surface plot in power BI desktop. With changing the 8 parameter slicers in power BI visual we are able to simulate the different types of 3D quadratic surface with the View Angels at the levels of Horizontal and Vertical. The R package Lattice and function Wireframe are applied to plot the 3D quadratic Surface. The link of the R script codes for the video I have attached in the video descriptions in below. Hope this video brings some help for your project developments. R Scripts for the demo: # Load the lattice package: library(lattice) # Create Parameter Variable for rotating view angles HAngles=dataset$H_Angle VAngles=dataset$V_Angle # Create coefficient Prameter Variables: a = dataset$a b = dataset$b c = dataset$c d = dataset$d e = dataset$e f = dataset$f # Create data for a quadratic surface x <- seq(-5, 5, length.out = 100) y <- seq(-5, 5, length.out = 100) # z <- outer(x, y, fun...

Power BI Visualization & R : 3D ScatterPlot with Interactive Rotation View by R Script Visual

Image
  In the video. I have shared the method on using R script visual with package scatterplot3d to generate a 3D scatter plot, and also introduce a way on adding dynamic viewing angles to  rotate the 3D plot with slicer visual based on power BI new parameter feature generated angle value table . In the demo we applied power query editor to prepare source data table for the 3D plot, used the R studio to cerate and edit R script for 3d scatter plot and finally adopt the slicer visual generate by Power BI new parameter for interactive rotating 3D graphic view angels dynamically. Hope the video give some helps for your power BI project developments.  R Scripts: # Load the scatterplot3d library: library ( scatterplot3d ) # Define variables from the source data for plotting: x <- dataset $ "Technical Skills" y <- dataset $ "Leadership & Management" z <- dataset $ "Personal Development" l <- dataset $ "Employee ID" # apply scattedplot3d...