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.
Hi ,
I am working on the data where I am calculating the sum of appointments total by prior fiscal year. to calculate the prior year values , I have used a calculation suggested by this forum, it works fine when we select year filter, but the moment I select other filter this calculation prior year calculation doesnot hold good.
How do I correct it ?
This is the calculation I am using to calculate previous year
Solved! Go to Solution.
Hi,
I assume your datamodel does not have calendar dimension table or region dimension table.
One of the best ways is to have those dimension tables, but in case you cannot create those, please try something like below.
expected previous year =
CALCULATE (
SUM ( 'OLD ONE'[COUNT(DISTINCT APT)] ),
VALUES ( 'OLD ONE'[Region Name] ),
FILTER (
ALL ( 'OLD ONE' ),
[FISCAL_YEAR_NUM]
= SELECTEDVALUE ( 'OLD ONE'[FISCAL_YEAR_NUM] ) - 1
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Source Data
Previous Year Formula
Result when nothing is selected
Result when 2024 is selected. Please check the prior snapshot for the result of 2023 in the matrix table.
Business Development is selected from Department Slicer.
One more thing before doing the measure I had created the year column from the date column.
Please let me know if the same formula is applicable for your dataset or not.
Hi,
I assume your datamodel does not have calendar dimension table or region dimension table.
One of the best ways is to have those dimension tables, but in case you cannot create those, please try something like below.
expected previous year =
CALCULATE (
SUM ( 'OLD ONE'[COUNT(DISTINCT APT)] ),
VALUES ( 'OLD ONE'[Region Name] ),
FILTER (
ALL ( 'OLD ONE' ),
[FISCAL_YEAR_NUM]
= SELECTEDVALUE ( 'OLD ONE'[FISCAL_YEAR_NUM] ) - 1
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
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 |