Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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??
Solved! Go to Solution.
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
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.
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
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.
@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) )
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |