Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Caio_Volpe
New Member

Como colocar horários de um dia no eixo x de um gráfico?

Boa tarde,

Já pesquisei bastante na internet de não achei uma solução ainda.

Tenho um controle em excel do uso das salas de reuniões, onde tenho colunas de data, solicitante, horário de início e horário de fim.

Preciso saber a ociosidade das salas em um dia e em cada horário do dia.

Até consegui fazer um gráfico de rosca considerando a ociosidade do dia em porcentagem em relação ao horário comercial disponível do dia.

Porém, meu problema é saber em momentos do dia, ou seja, como exemplo uma sala em um dia específico pode estar em uso de 08:00 às 10:00, fica vazia de 10:00 às 14:00 e depois fica ocupada novamente até 20:00. Logo, como fazer um gráfico no Power Bi que mostre a utilização? Minha ideia inicial para resolver esse problema é no excel criar uma nova coluna onde eu digo se for 08:00 da manhã, na coluna início da reunião, preencherá o número "1", se for 08:15 o número "2", e assim vai de 15 em 15 minutos. Sendo assim, consigo colocar no eixo x o horário de 08:00 até 20:00. Contudo, o problema que não consigo fazer com que nesse exemplo de 08:00 às 10:00 marque no gráfico as opções: 08:00, 08:15, 08:30, 08:45, 09:00, 09:15, 09:30 e 09:45 .

Alguém consegue me ajudar?
Obrigado

 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Caio_Volpe

 

Is this you want ?

vchenwuzmsft_0-1662433595654.png

 

If i am right, please create a x-axis table first via 

x-axis = GENERATESERIES(TIME(8,0,0),TIME(21,59,59),TIME(0,15,0))
 
which returns table like below:
vchenwuzmsft_1-1662433705344.png
 
Then create a measure to draw the line chart or bar chart.
measure =
countrows( filter ( table , [start time] <= max('x-axis'[value] ) && [end time] >= max('x-axis'[value] )) )

Best Regards

 

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Caio_Volpe

 

Is this you want ?

vchenwuzmsft_0-1662433595654.png

 

If i am right, please create a x-axis table first via 

x-axis = GENERATESERIES(TIME(8,0,0),TIME(21,59,59),TIME(0,15,0))
 
which returns table like below:
vchenwuzmsft_1-1662433705344.png
 
Then create a measure to draw the line chart or bar chart.
measure =
countrows( filter ( table , [start time] <= max('x-axis'[value] ) && [end time] >= max('x-axis'[value] )) )

Best Regards

 

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Good Morning @v-chenwuz-msft ,

I did it with your help.

I have been trying for a long time to solve this.

Thank you very much.

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.