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
Rodrigosantos87
New Member

Mes de faturamento não é de 1 a 30

Olá comunidade 

 

Preciso muito da ajuda de vocês.

 

O calendário de avaliação dos resultados da minha empresa é de 21 a 20 do mes seguinte. O mes de Maio por exemplo começa em 21 de abril e termina em 20 de Maio.

 

Como tratar isso no power bi para ter os gráficos de resultados mensal??

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Rodrigosantos87 ,

Please refer to my pbix file to see if it helps you.

Crete a column.

DATE_RESULT =
VAR _MONTH =
    MONTH ( 'Table'[Date] )
VAR _day =
    DAY ( 'Table'[Date] )
VAR _start =
    IF ( _day >= 21, _MONTH + 1, _MONTH )
RETURN
    _start

 

vpollymsft_0-1652422603466.png

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output.

 

Best Regards
Community Support Team _ Polly

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
Anonymous
Not applicable

Hi @Rodrigosantos87 ,

Please refer to my pbix file to see if it helps you.

Crete a column.

DATE_RESULT =
VAR _MONTH =
    MONTH ( 'Table'[Date] )
VAR _day =
    DAY ( 'Table'[Date] )
VAR _start =
    IF ( _day >= 21, _MONTH + 1, _MONTH )
RETURN
    _start

 

vpollymsft_0-1652422603466.png

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output.

 

Best Regards
Community Support Team _ Polly

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

amitchandak
Super User
Super User

@Rodrigosantos87 , Try a calendar like

 

Calendar = Var _1  = Addcolumns( CALENDAR(date(2020,01,21) , date(2023,01,20))
, "Start Year", if(format([date], "MMDD")*1 <= 0120 , date(year([Date])-1, 1,21) , date(year([Date]), 1,21))
, "End Year", if(format([date], "MMDD")*1 <= 0120 , date(year([Date]), 1,20) , date(year([Date])+1, 1,20))
,"Start Month",  if(day([Date]) <=20, EOMONTH([Date],-2)+21, EOMONTH([Date],-1)+21)
,"End Month",  if(day([Date]) <=20, EOMONTH([Date],-1)+20, EOMONTH([Date],0)+20)
, "Qtr No", Quotient(datediff(if(format([date], "MMDD")*1 <= 0120 , date(year([Date])-1, 1,21) , date(year([Date]), 1,21)), eomonth([date],-1)+1 , month),3)+1,
 "Half No", Quotient(datediff(if(format([date], "MMDD")*1 <= 0120 , date(year([Date])-1, 1,21) , date(year([Date]), 1,21)), eomonth([date],-1)+1 , month),6)+1

, "MMDD",format([date], "MMDD"))
var _2 = ADDCOLUMNS(_1
, "Qtr Start Date", minx(filter(_1, [Qtr No] =EARLIER([Qtr No]) && [Start Year] =EARLIER([Start Year])  ),[Start Month])
, "Half Start Date", minx(filter(_1, [Half No] =EARLIER([Half No]) && [Start Year] =EARLIER([Start Year])  ),[Start Month])
)
return ADDCOLUMNS(_2, "Helf Year Rank", rankx(_2, [Half Start Date],,ASC,Dense) )
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
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.