Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Everyone,
I am trying to do a monthly growth rate for the multi-year period in PowerBi DeskTop.
1. Here is what my raw data looks like and the date interval is from 2017-11-14 to2018-03-30.
2. I created 5 measurements.
Year = YEAR('dailydata'[Date].[Date])
Month = MONTH('dailydata'[Date].[Date])
previousmonth = CALCULATE(SUM('dailydata'[Revenue]),FILTER(ALLSELECTED('dailydata'), [Month] = max([Month])-1))
currentmonth = CALCULATE(SUM('dailydata'[Revenue]),FILTER(ALLSELECTED('dailydata'),[Month] = MAX([Month])))
Month% = [previousmonth]/[currentmonth]
3. I presented the measurements in the data sheet,but the 2018-01 value is empty.
How doi slove this problem? Thank yoy all.
Solved! Go to Solution.
Hi,
Try this
Total Revenue = SUM(Data[Revenue])
Month (%) = CALCULATE([Total Revenue],PREVIOUSMONTH(Calendar[Date]))/[Total Revenue]
Hope this helps.
Hi,
Try this
Total Revenue = SUM(Data[Revenue])
Month (%) = CALCULATE([Total Revenue],PREVIOUSMONTH(Calendar[Date]))/[Total Revenue]
Hope this helps.
Thank you @Ashish_Mathur.
This solution indeed works,but i created a new measure 『LastMonthRevenue = CALCULATE([TotalTurnover],PREVIOUSMONTH(Calendar[Date]))』 and changed 『Month (%) = CALCULATE([Total Revenue],PREVIOUSMONTH(Calendar[Date]))/[Total Revenue]』 into 『Month (%) = IF([LastMonthRevenue ] = BLANK(),"NA",([TotalTurnover] / [LastMonthRevenue ])-1) because original solution showed message.
You are welcome.
Hi,
Share some data and show the expected result. More importantly, you will have to first define week in the Calendar Table i.e. which date falls in each week.
Can you paste the data from your first screen shot as text that can be copied? In the PBIX file, go to the middle tab on the left and then right click the table and choose Copy Table. Paste this into Excel and truncate as necessary.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thank you, I will pay attention next time.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |