Power BI tables relationship

The post shows you how to ensure the relationship between 2 tables in Power BI. This is also request from a friend.

Let’s say in my Excel I have 2 Worksheets one named Categories and Products. Obviously they have relationship. As you can see in below I was loading 2 Wroksheets.

Let’s see I choose a field CategoriesId in Categories table and ProductId and Product Description in Products table then I will get the following pop up to answer whether I want the relationship to be Autodetect. In here I don’t want it to be Autdetect.


So I will go to the Ribbon and click Manage Relationships.


You can see the 2 tables in From Table (column) and To Table (Column), Click on Edit to edit the relationship.


As you can see the CategoryID has been chosen to by the key to link between the 2 tables. This will be the best if they have 1 to many relationship. Select Make this relationship active..


When you refresh the table then you should see it working.

Advertisements
Posted in Cloud, Community, Computers and Internet, Data Platform | Tagged , , | Leave a comment

SSMS The Microsoft Office Access database engine could not find the object

This post shows you one of the possible problems of the error “The Microsoft Office Access database engine could not find the object” when you are Export from SQL Server database table to Excel.

The full error will be like the following.

Error 0xc002f210: Preparation SQL Task 1: Executing the query “CREATE TABLE `Categories` (

`CategoryID` Long,

`…” failed with the following error: “The Microsoft Office Access database engine could not find the object ‘Categories’. Make sure the object exists and that you spell its name and the path name correctly.”. Possible failure reasons: Problems with the query, “ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly.

When you do an Export in SQL Server Management Studio SSMS.


Say you are exporting Categories and Products.


Somehow you hit the above mentioned error.


Do not go and install and uninstall Access Runtime and so. It is as simple as because your fields consist of LongBinary data type.


Ignore that field then you should be good.

Reference:

https://stackoverflow.com/questions/28743291/ssis-the-table-cannot-be-created-microsoft-jet-database-engine-could-not-find

Posted in .Net, Cloud, Community, Data Platform | Tagged | Leave a comment

Power BI conditional format for only one row of data

This post dhows can how to put color on single row of data in a table.

When you see the below dashboard there is a table with Item and Score. The Score with green and red color. Somehow this will not happen if you have only one row of data.

I found a workaround, it may not be a proper way.


Click on the table with one row. Choose Edit Queries.


You will see the Data Type of the 3 column is Decimal Number.


Click the Cross to delete the Changed Type step.


The Data Type now is Any. Click Close abd Apply.


Now go to Format.


Choose Conditional Formatting. On the Font color… Click Advanced controls,


Click OK after you select a color.

Posted in Cloud, Community, Computers and Internet | Tagged , | Leave a comment

SSMS SQL Server Profiler

This post is showing you how to use the stand alone SQL Server Profiler with the SQL Server Management Studio.

SQL Server Profiler used to come with SQL Server Standard Edition and above. When I have downloaded the SSMS for SQL Server 2016 then I realized the SQL Server Profiler is in it.

Prerequisite:

1. Download the code sample from https://github.com/chanmmn/AngularCRUDSQLServer.

2. Change the connection string in web.config.

To start to experience the SQ: Server in SSMS 17.

1. Start SQL Server Management Studio.

2. Go to Tools -> SQL Server Profiler.


SQL Server Profiler will be started.

3. In SQL Server Profiler select File -> New Trace…


4. Type in the value for Trace name.

5. Click Run to start the trace.


6. Start Visual Studio.

7. Open the AugularCRUD solution you have downloaded.

8. Change the Connection String in web.config to point to your own SQL Server.

9. Run the solution by pressing F5.


You will see the Select statement below.

SELECT

[Extent1].[Emp_Id] AS [Emp_Id],

[Extent1].[Emp_Name] AS [Emp_Name],

[Extent1].[Emp_City] AS [Emp_City],

[Extent1].[Emp_Age] AS [Emp_Age]

FROM [dbo].[Employee] AS [Extent1]


10. Add a new Employee and click Submit.


You will see the insert statement below starts with exec

Posted in .Net, Cloud, Community, Computers and Internet, Data Platform | Tagged , , | Leave a comment

XMLTools.dll is not compatible with the current version of Notepad++

This post shows you a possible solution for the error “XMLTools.dll is not compatible with the current version of Notepad”.

I am using Notepad++ version 7.5.1/

XMLTool, Xml Tools 2.4.9.2 x64 Unicode.zip.

Once you unzip the Xml Tools 2.4.9.2 x64 Unicode.zip then you will see the folder structure below.


Open the dependencies folder. You will find all the dlls.


Copy all the dll to the folder consist of Notepad++.exe. Only leave the XMLTools.dll in Notepad++ plugins folder.

Posted in Community, Computers and Internet | Tagged , | 1 Comment

Virus online scanner

This short post shows you how to upload the suspicious file to scan online.

If you found this below:

https://www.makeuseof.com/tag/7-reliable-sites-quick-free-anti-virus-scan/

All the scanners are no online.

One of real online scanners is https://www.virustotal.com and the below is the result returned.

Posted in Cloud, Community, Computers and Internet, Operating System | Tagged , , | Leave a comment

Internet Connection Sharing is currently enable for connection

This short posts shows you the way I resolved the error “Internet Connection Sharing is currently enable for connection” when sharing my Wifi to my Hyper-V VM.

I check in my Windows Services the Internet Connection Sharing(ICS) Service is not able to trigger start. I start it manually.


Reference:

https://www.thewindowsclub.com/an-error-occurred-while-internet-connection-sharing-was-being-enabled

Posted in Cloud, Community, Computers and Internet, Operating System | Tagged , | Leave a comment