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.
Hi Guys,
How do i write a measure or calculated column to do this? Thanks in advance.
Jan | Feb | Mar | Apr | ||
Total | 100 | 150 | 300 | 699 | |
Revenue | 40 | 90 | 150 | 549 | I want the bold cell to calculate Current months Total - Last months revenue |
Solved! Go to Solution.
Hi @KH11NDR,
I have made a test with your logic.
I created a two calculated columns below and get the output.
last month revenue = CALCULATE(SUM('Table'[Previous Revenue Submitted (£)]),PREVIOUSMONTH('Master Calendar'[Date])) Column = 'Table'[Commercial Total]-[last month revenue]
If you still need help, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
Best Regards
Cherry
ProjectID | Project | Date | Previous Revenue Submitted (£) | Commercial Total |
1 | aaa | 01/07/2018 | 0.00 | 1457068 |
2 | bbbb | 01/06/2017 | 3339.98 | 1457068 |
Date linked to a Date master calendar table,
Master Calendar = ADDCOLUMNS ( CALENDAR (DATE(2017,01,01), DATE(2018,12,31)), "DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ), "Year", YEAR ( [Date] ), "MonthNo", FORMAT ( [Date], "MM" ), "YearMonthNo", FORMAT ( [Date], "YYYY/MM" ), "YearMonth", FORMAT ( [Date], "YYYY/mmm" ), "MonthShort", FORMAT ( [Date], "mmm" ), "MonthLong", FORMAT ( [Date], "mmmm" ), "WeekNo", WEEKNUM([Date]), "WeekDay", FORMAT ( [Date], "dddd" ), "WeekDayShort", FORMAT ( [Date], "dddd" ), "Quarter", "Q" & FORMAT ( [Date], "Q" ), "YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ), "Month Year", FORMAT ( [Date], "mmm") & " - " & FORMAT( [Date], "yy"))
I need this months commercial total - last months Previous Revenue Submitted (£)
Hi @KH11NDR,
I'm not very clear about your logic, could you describe your requirement in more details.
I would appreciate it if you could share your expected output.
Best Regards,
Cherry
What does your raw data look like? 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
ProjectID | Project | Date | Previous Revenue Submitted (£) | Commercial Total |
1 | aaa | 01/07/2018 | 0.00 | 1457068 |
2 | bbbb | 01/06/2017 | 3339.98 | 1457068 |
Date linked to a Date master calendar table,
Master Calendar = ADDCOLUMNS ( CALENDAR (DATE(2017,01,01), DATE(2018,12,31)), "DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ), "Year", YEAR ( [Date] ), "MonthNo", FORMAT ( [Date], "MM" ), "YearMonthNo", FORMAT ( [Date], "YYYY/MM" ), "YearMonth", FORMAT ( [Date], "YYYY/mmm" ), "MonthShort", FORMAT ( [Date], "mmm" ), "MonthLong", FORMAT ( [Date], "mmmm" ), "WeekNo", WEEKNUM([Date]), "WeekDay", FORMAT ( [Date], "dddd" ), "WeekDayShort", FORMAT ( [Date], "dddd" ), "Quarter", "Q" & FORMAT ( [Date], "Q" ), "YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ), "Month Year", FORMAT ( [Date], "mmm") & " - " & FORMAT( [Date], "yy"))
I need this months commercial total - last months Previous Revenue Submitted (£)
I've tried PREVIOUSMONTH, still don't work.
PM **bleep** Revenue Submitted = CALCULATE([Sum of Cumulative Revenue Submitted],PREVIOUSMONTH('Calc Numbers'[Date]))
Hi @KH11NDR,
I have made a test with your logic.
I created a two calculated columns below and get the output.
last month revenue = CALCULATE(SUM('Table'[Previous Revenue Submitted (£)]),PREVIOUSMONTH('Master Calendar'[Date])) Column = 'Table'[Commercial Total]-[last month revenue]
If you still need help, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
Best Regards
Cherry
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |