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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.