Skip to content

POWER QUERY – SETTING PARAMETERS

  • Power BI

To use parameters, which expecially helps when moving files from your local computer to the web service, perform the following

Open Power Query Editor
Click Home
Select Manage Parameters
Click New
Give it a Name (tacticalware)
Specify a Type from the drop down. For me I selected Text
In the Current Value field, specify the location of the csv file (C:\tacticalware\x.csv)
NOTE – it is case sensitive
Click Ok

Now go into your Advanced Editor
Find the location of the csv file (C:\tacticalware\x.csv)
Replace the path with the Name of the parameter (tacticalware)
So it will look like this:
Source = Csv.Document(File.Contents(tacticalware),……and so on
Click Done


POWER BI – QUERY FOLDING

  • Power BI

What is Power Bi Query Folding…..
– It reduces trips to the data source
– Pushes transformations to the data source
– It combines steps into a single statement that is sent to a data source
– Some operations may prevent query folding from happening
– It is supported by SQL Server
– Also supported by relational data sources

What it is NOT
– This is Not Available with all data sources

To see the steps, Enter into your Advanced Editor. It will show you the M Language here.

To view the SQL Server code that is generated:
In Power Query > Applied Steps section
Right click on a step, and select View Native Query
This will show you the SQL Server Code that will be sent back to the server for that particular step. However it does not sent the code back to SQL Server after each step. It sends it at the end when you Apply or Close & Apply

ADDING CUSTOM COLUMNS IN POWER BI

  • Power BI

I have been scraping Wikipedia for islands information, and building models in Power BI around them. One thing that I run into over and over is the lack of a certain field in each of the scrapes. The scraped don’t have the name of the State associated with the island names. So I will have to fix this by adding custom columns in Power BI / Power Query, so my models have better visuals. To do this you will need to perform the following:

Click Transform data to open Power Query Editor
Select Add Column from the Main Menu
Click Column From Examples
Select From All Columns
Enter in a value – for me I put in NH, and press Enter
Enter in your value a second time…for me it was placing NH in the second row, Now the rest of the rows should auto populate with the data (again for me NH showed in every subsequent row)
Click OK
Rename the leader from Literal, to State

You are done! Thanks for reading

POWER BI IMPORT VS DIRECT QUERY

  • Power BI

Import is taking a copy of a data from SQL server, and the copy is placed into your Power BI Desktop file

Direct Query leaves the data at the source and only pulls the data needed, when it is needed

CREATING A LOCAL MSSQL SERVER ON YOUR W10 PC

From time to time you will need to utilize a local sql server, for dev, testing, education, whatever. So here is a quick how-to on creating a local mssql server on your W10 pc.

Download and install the free version of SQL, called SQL Express:
https://www.microsoft.com/en-us/sql-server/sql-server-downloads
Accept all the defaults, except for these few
Use your credentials when prompted
Select all packages to be installed

Once SQL Express is installed, download and install SQL Server Management Studio
https://aka.ms/ssmsfullsetup

Now you have both installed, open SQL Server Management Studio or SSMS for short, and connect to your local SQL Express Database
Connect to “localhost\sqlexpress
You dont have to put in any credentials if you selected to use your credentials earlier.

To do a test on the database, try restoring the AdventureWorksDW database
Right click on Databases
Select Restore database
Select the AdventureWorksDW file
Click Ok

You can now connect into your database using Power BI or another tool, and start playing around.

Thanks for reading

WINDOWS 10 VM DISK INTEGRITY


This is a quick way to check the integrity of the local disk of a Windows 10 VM, that sits on an ESXi 6.7 Host

Go to the Type here to search box
Type cmd
Best Match will show Command Prompt
Select Run as administrator
Type in chkdsk C: /f /r /x

Check disk will now run and scan your system. If any errors come up, you will be notified, and can choose a course of action.

POWER BI INSTALL & PREVIEW FEATURES

  • Power BI

There are several ways to install Power BI, however the recommended Power BI Install is by going through the Microsoft Store. The reason behind it is, if you install it through the Store, it will auto update monthly. Yes Power BI updates the platform that often, and you will have the latest and greatest version.

Once it is installed, and after the monthly updates you will need to enable the Preview Features. To do this, perform the following:
Click File
Select Options and settings
Click Options
Select Preview features
Place a check mark next to All of them
Restart Power BI Desktop

You have now installed the platform and enabled the extra features.

Thanks for reading

RESTORE MINING WALLETS IN WINDOWS 10

The most recent Windows 10 update, went through my computer and started tagging many of my crypto wallets as threats, then it automatically quarrantined them. HUGE FAIL by Microsoft. I did not want their Defender app enabled after the update. I did not want it to scan my system.

To restore your newly quarrantined items, do the following:

Open Windows Security
Select Virus & threat protection
Click Protection history
In the list of all recent items, filter the Quarantined Items
Click all of the newly identified and restore

That’s it! Thanks for reading

SSH On My RASPBERRY PI 4

This is a quick one. I needed ssh on my Raspberry Pi 4, and this is how I did it

Turn on the Pi

Once on the Desktop, click on the Terminal icon

Type:
sudo bash
apt-get update
apt-get install openssh-server
y

Once that installs successfully
systemctl enable ssh
systemctl start ssh

That’s it. You can now login remotely to your pi through ssh



Thanks for reading

Hardware that I used:
Raspberry Pi 4 (4gb)
https://amzn.to/3q551IO

SanDisk 32GB Ultra microSDHC UHS-I Memory Card with Adapter
https://amzn.to/2Vfvo0y

CanaKit 3.5A Raspberry Pi 4 Power Supply (USB-C)
https://amzn.to/3fNTYPu

CanaKit Raspberry Pi 4 Micro HDMI Cable – 6 Feet
https://amzn.to/33u5hr9

Western Digital 500GB WD_Black SN750 NVMe
https://amzn.to/3nZ5pH4

Plugable USB C to M.2 NVMe Tool-free Enclosure
https://amzn.to/3lflV3L

REMOTE SUPPORT THROUGH CHROME REMOTE DESKTOP

Teamviewer has been a constant headache in 2020. So I have had to find a teamviewer replacement…and have found Chrome Remote Desktop. So far my experience has been good. Quick, easy install. I can still remotely manage my mining rigs. This guide shows how I connect to a system that runs during the day for a dedicated user (who owns it), and mines at night. When he has an issue, he contacts me and we setup a Chrome Remote Desktop support session using the following excerpt from this link https://support.google.com/chrome/answer/1649523?co=GENIE.Platform%3DDesktop&hl=en

Share your computer with someone else

You can give others remote access to your computer. They’ll have full access to your apps, files, emails, documents and history.

  1. On your computer, open Chrome.
  2. In the address bar at the top, type remotedesktop.google.com/support, and press Enter.
  3. Under “Get Support, “ click Download Download page.
  4. Follow the onscreen directions to download and install Chrome Remote Desktop.
  5. Under “Get Support,” select Generate Code.  
  6. Copy the code and send to the person you want to have access to your computer.
  7. When that person enters your access code on the site, you will see a dialog with their e-mail address. Select Share to allow them full access to your computer.
  8. To end a sharing session, click Stop Sharing.

The access code will only work one time. If you are sharing your computer, you will be asked to confirm that you want to continue to share your computer every 30 minutes.