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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Angelo-Silva
Regular Visitor

EIXO X com 13 meses(Grafico de Linha)

Ola comunidade, 
Como posso fazer para construir um Eixo X com 13 meses? Sendo que ao selecionar um determinado mes, o grafico se comportaria de forma dinamica. Ou seja, se selecionar o ano 2022 no mes de Agosto. O grafico ficaria, conforme imagem abaixo, sendo que ele pegaria os ultimos 13 meses, sendo os 8 meses do ano de 2022 e os outros meses do ano de 2021.

Imagem de exemplo:

AngeloSilva_0-1676487264109.png


** Caso não tenha nenhum ano/mes selecionado. o grafico ficaria assim

Dez(Ano anterior), Janeiro, Fevereiro,Março............................ Dezembro(Ano atual)

1 REPLY 1
amitchandak
Super User
Super User

@Angelo-Silva , if you select one month and you want to display more than one, then slcier need to be there on independent date table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -13) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.