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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors