DataZen Syllabus

INTRODUCTION TO DATAZEN
  1. PRODUCT ELEMENTS
  2. ARCHITECTURE
DATAZEN ENTERPRISE SERVER
  1. INTRODUCTION
  2. SERVER ARCHITECTURE
  3. INSTALLATION
  4. SECURITY
  5. CONTROL PANEL
  6. WEB VIEWER
  7. SERVER ADMINISTRATION
CREATING AND PUBLISHING DASHBOARDS
  1. CONNECTING TO DATASOURCES
  2. DESIGNER
  3. CONFIGURING NAVIGATOR
  4. CONFIGURING VISUALIZATION
  5.  PUBLISHING DASHBOARD
  6. WORKING WITH MAP 
  7. WORKING WITH DRILL THROUGH DASHBOARDS

Transposing data from table with two columns

Query to create table and insert data

CREATE DATABASE [MYTEST]

USE [MYTEST]
GO
/****** Object:  Table [dbo].[MANYTOMANY]    Script Date: 3/21/2016 2:02:11 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MANYTOMANY](
[SUBJECT] [varchar](100) NOT NULL,
[TEACHER] [varchar](100) NOT NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'A', N'AB')
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'A', N'BC')
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'A', N'CD')
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'B', N'BC')
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'B', N'CD')
GO
INSERT [dbo].[MANYTOMANY] ([SUBJECT], [TEACHER]) VALUES (N'B', N'EF')
GO



QUERY TO TRANSPOSE DATA


with cte as
(SELECT [SUBJECT]
      ,[TEACHER]
 ,row_number() over (partition by [subject] order by teacher) RNK
  FROM [MYTEST].[dbo].[MANYTOMANY])

  select [subject],(select teacher from cte a where a.SUBJECT = cte.SUBJECT and a.RNK =1) 'teacher1' ,
  (select teacher from cte a where a.SUBJECT = cte.SUBJECT and a.RNK =2) 'teacher2' ,
  (select teacher from cte a where a.SUBJECT = cte.SUBJECT and a.RNK > 2) 'more than 2 teachers' --,
  from cte
  group by SUBJEC

Power BI Report Access to External Users

Steps for creating a public access link for a power bi report @ powerbi.com 


  • Login to powerbi.com and navigate to your workspace.


  •  Clicking on the file menu we get below options.

  • Click on publish to web option and the below window appears.


  • Click on the "Create embed code" option, we get below window.



  • Click on publish to get the link for the report.


You can copy the link from first text box which contains encrypted URL and that does not require and login to view the report. Now if we want to embed the report in a website then we need to copy the iframe code and paste in our application.

T-SQL LEAD LAG and SUM function based query

  Query on T-SQL window clause Below is the sales table Order_Date Name Product SubCategory ...