Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |