Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Desafio Analisando dados de um Dashboard de Vendas no Power BI #83

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Binary file added Desafios/DIO_02_Financial_Dados_PowerBI.pdf
Binary file not shown.
Binary file added Desafios/DIO_06_Desafio_Finacials.pdf
Binary file not shown.
Binary file not shown.
Binary file added Desafios/DIO_09_Desafio_Modelando.pbix
Binary file not shown.
Binary file added Desafios/DIO_11_Desafio Dashboad Gerencial.pbix
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions Desafios/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Projeto de Desafio - Modelagem e Transformação de Dados com DAX no Power BI #
<br>
<br>
Neste desafio o objetivo foi realizar as instruções indicadas na descrição do desafio com o objetivo de treinar as técnicas de modelagem de DAX.
<br>
Na minha concepção, não seguindo as instruções, teria feito em cima da financials:
<br>
01) Criar Domínios para: País, Produto, Segmento e Tipo de Desconto. Nestas tabelas também armazenaria totais como: Quantidades Vendidas, Total de Vendas, Total de Lucro
02) Criar Calendário
03) Criado tabela de detalhe substituindo colunas descritivas pelos seus respectivos índices
<br>
Caso tivesse que fazer a extração de banco dados, já traria estas informações transformadas.
<br>
<br>
<br>
### ======================================================================== ###
<br>
<br>
<br>
# Projeto de Desafio - Processando e Transformando Dados com Power BI - Instruções
<br>
## Explicação solicitada para o Readme.md
<br>
11. Realize a junção dos colaboradores e respectivos nomes dos gerentes . Isso pode ser feito com consulta SQL ou pela mescla de tabelas com Power BI. Caso utilize SQL, especifique no README a query utilizada no processo.
select *
from employee a
,departament b
where b.Mgr_ssn = a.Super_ssn
<br>
## Documento "Desafio de Projeto - Processando e Transformando Dados com Power BI - Instruções.docx" possui todas as ações tomadas
<br>
## Relatório DIO_08_Desafio_Dashboard_corporativo_integração_MySQL_Azure.pbix feito visualização simples
<br>
Binary file added Desafios/star-schema-power-bi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 13 additions & 11 deletions Módulo 3/Desafio de Projeto/insercao_de_dados_e_queries_sql.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
use company_constraints;

insert into employee values ('John', 'B', 'Smith', 123456789, '1965-01-09', '731-Fondren-Houston-TX', 'M', 30000, 333445555, 5),
('Franklin', 'T', 'Wong', 333445555, '1955-12-08', '638-Voss-Houston-TX', 'M', 40000, 888665555, 5),
('Alicia', 'J', 'Zelaya', 999887777, '1968-01-19', '3321-Castle-Spring-TX', 'F', 25000, 987654321, 4),
('Jennifer', 'S', 'Wallace', 987654321, '1941-06-20', '291-Berry-Bellaire-TX', 'F', 43000, 888665555, 4),
('Ramesh', 'K', 'Narayan', 666884444, '1962-09-15', '975-Fire-Oak-Humble-TX', 'M', 38000, 333445555, 5),
('Joyce', 'A', 'English', 453453453, '1972-07-31', '5631-Rice-Houston-TX', 'F', 25000, 333445555, 5),
('Ahmad', 'V', 'Jabbar', 987987987, '1969-03-29', '980-Dallas-Houston-TX', 'M', 25000, 987654321, 4),
('James', 'E', 'Borg', 888665555, '1937-11-10', '450-Stone-Houston-TX', 'M', 55000, NULL, 1);
use dio_azure_company;

insert into employee values ('James', 'E', 'Borg', 888665555, '1937-11-10', '450-Stone-Houston-TX', 'M', 55000, NULL, 1);
insert into employee values ('Franklin', 'T', 'Wong', 333445555, '1955-12-08', '638-Voss-Houston-TX', 'M', 40000, 888665555, 5);
insert into employee values ('John', 'B', 'Smith', 123456789, '1965-01-09', '731-Fondren-Houston-TX', 'M', 30000, 333445555, 5);
insert into employee values ('Ramesh', 'K', 'Narayan', 666884444, '1962-09-15', '975-Fire-Oak-Humble-TX', 'M', 38000, 333445555, 5);
insert into employee values ('Joyce', 'A', 'English', 453453453, '1972-07-31', '5631-Rice-Houston-TX', 'F', 25000, 333445555, 5);
insert into employee values ('Jennifer', 'S', 'Wallace', 987654321, '1941-06-20', '291-Berry-Bellaire-TX', 'F', 43000, 888665555, 4);
insert into employee values ('Alicia', 'J', 'Zelaya', 999887777, '1968-01-19', '3321-Castle-Spring-TX', 'F', 25000, 987654321, 4);
insert into employee values ('Ahmad', 'V', 'Jabbar', 987987987, '1969-03-29', '980-Dallas-Houston-TX', 'M', 25000, 987654321, 4);
select * from employee e
;

insert into dependent values (333445555, 'Alice', 'F', '1986-04-05', 'Daughter'),
(333445555, 'Theodore', 'M', '1983-10-25', 'Son'),
Expand Down Expand Up @@ -55,7 +57,7 @@ insert into works_on values (123456789, 1, 32.5),
-- Consultas SQL

select * from employee;
select Ssn, count(Essn) from employee e, dependent d where (e.Ssn = d.Essn);
select Ssn, count(Essn) from employee e, dependent d where (e.Ssn = d.Essn) group by Ssn;
select * from dependent;

SELECT Bdate, Address FROM employee
Expand Down
4 changes: 4 additions & 0 deletions Módulo 3/Desafio de Projeto/script_bd_company.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
show databases;

create schema if not exists azure_company;
use azure_company;

Expand All @@ -22,6 +24,8 @@ CREATE TABLE employee(
constraint pk_employee primary key (Ssn)
);

-- drop constraint fk_employee;

alter table employee
add constraint fk_employee
foreign key(Super_ssn) references employee(Ssn)
Expand Down