Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need to find the difference in revenue from the current year vs last year but I don't have any date fields to use. Only fiscal year is available. Could you please assist by sharing if there is any way?
Here's what I have as source data and what I want to generate as output:
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
Current Year Rev: =
SUM ( Data[Revenue] )
Previous Year Rev: =
VAR currentyear =
INT ( LEFT ( SELECTEDVALUE ( Data[Fiscal Year] ), 4 ) )
VAR lastyeartable =
FILTER ( ALL ( Data ), INT ( LEFT ( Data[Fiscal Year], 4 ) ) = currentyear - 1 )
RETURN
SUMX ( lastyeartable, Data[Revenue] )
YoY variance: =
IF (
[Current Year Rev:] <> BLANK ()
&& [Previous Year Rev:] <> BLANK (),
[Current Year Rev:] - [Previous Year Rev:]
)
Thanks. Are there any resources that explain the DAX you used here?
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
Current Year Rev: =
SUM ( Data[Revenue] )
Previous Year Rev: =
VAR currentyear =
INT ( LEFT ( SELECTEDVALUE ( Data[Fiscal Year] ), 4 ) )
VAR lastyeartable =
FILTER ( ALL ( Data ), INT ( LEFT ( Data[Fiscal Year], 4 ) ) = currentyear - 1 )
RETURN
SUMX ( lastyeartable, Data[Revenue] )
YoY variance: =
IF (
[Current Year Rev:] <> BLANK ()
&& [Previous Year Rev:] <> BLANK (),
[Current Year Rev:] - [Previous Year Rev:]
)
Thanks. Much Appreciated!
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 |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |