Forum Discussion
JuanDtM23
5 years agoHelper II
Formula de excel a Power BI
Best regards! I hope you can help me. I have the following information: Date Accumulated Revenue Revenue projection t+1 one-19 $ 118.325.626.888,57 $ 114.731.021.865,40 feb-19 ...
- 5 years ago
Hi JuanDtM23 ,
First, you need to split year and month in number format in the query editor.
Then create measure like this:
Measure = var current_month = MAX('Table'[Month]) var current_year = MAX('Table'[Year]) var no_month_1 = CALCULATE(SUM('Table'[Accumulated Revenue])+SUM('Table'[Revenue projection t+1]),FILTER(ALL('Table'),'Table'[Year]=current_year&&'Table'[Month]=current_month-1)) return IF(current_month=1,SUM('Table'[Revenue projection t+1]),no_month_1)Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
V-lianl-msft
5 years agoCommunity Support
Hi JuanDtM23 ,
First, you need to split year and month in number format in the query editor.
Then create measure like this:
Measure =
var current_month = MAX('Table'[Month])
var current_year = MAX('Table'[Year])
var no_month_1 = CALCULATE(SUM('Table'[Accumulated Revenue])+SUM('Table'[Revenue projection t+1]),FILTER(ALL('Table'),'Table'[Year]=current_year&&'Table'[Month]=current_month-1))
return IF(current_month=1,SUM('Table'[Revenue projection t+1]),no_month_1)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JuanDtM23
5 years agoHelper II