Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Based on my table below I want to isolate that 13 figure as a measure and be able to plot it on a graph so that I can compare what makes up that 13 difference (which clients gained the most revenue last month compared to the month prior)
I tried to do a conditional column that would look only at April but when I did that and applied the filter it caused the last month figure to be blank so the difference was 73. When may data is loaded I want to compare may with april and so on.
Last Month Revenue = CALCULATE([Revenue], DATEADD('Date'[Date].[Date], -1, MONTH))
Difference = Revenue - Last Month Revenue
Date | This Month Revenue | Last Month Revenue | Difference |
February 20 | 50 | 38 | 12 |
March 20 | 60 | 50 | 10 |
April 20 | 73 | 60 | 13 |
May 20 | No data yet, so blank | 73 | -73 |
Solved! Go to Solution.
It's difficult to say definitively given the information provided. 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
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
That said, from what you describe, you generally do things like that the following way:
Diff =
VAR __ThisMonthRevenue = SUM([Revenue]) //should have current month in context
VAR __CurrentDate = MAX([Date]) //again, current month in context have a date in current month
VAR __LastMonthDate = EOMONTH(__CurrentDate,-1) // end date of last month
VAR __LastMonthStart = DATE(YEAR(__LastMonthDate),MONTH(__LastMonthDate),1)) //1st of last month
VAR __ThisMonthStart = DATE(YEAR(__CurrentDate),MONTH(__CurrentDate),1)) //1st of current month
RETURN
__ThisMonthRevenue - SUMX(FILTER(ALL('Table'),[Date]>=__LastMonthStart && [Date]<__ThisMonthStart),[Revenue]) //ALL overrides filter context
This is a general solution that would need to be adapted to your data.
It's difficult to say definitively given the information provided. 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
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
That said, from what you describe, you generally do things like that the following way:
Diff =
VAR __ThisMonthRevenue = SUM([Revenue]) //should have current month in context
VAR __CurrentDate = MAX([Date]) //again, current month in context have a date in current month
VAR __LastMonthDate = EOMONTH(__CurrentDate,-1) // end date of last month
VAR __LastMonthStart = DATE(YEAR(__LastMonthDate),MONTH(__LastMonthDate),1)) //1st of last month
VAR __ThisMonthStart = DATE(YEAR(__CurrentDate),MONTH(__CurrentDate),1)) //1st of current month
RETURN
__ThisMonthRevenue - SUMX(FILTER(ALL('Table'),[Date]>=__LastMonthStart && [Date]<__ThisMonthStart),[Revenue]) //ALL overrides filter context
This is a general solution that would need to be adapted to your data.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |