cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

## % Comparison from Pervious Year and Month Measure

Hi Experts,

I need a help with regards to % Comparison from Pervious Year and Month Measure and both should come from same visual using drill down option.

we can use any dummy data to achieve my graphs

Year Wise Presentation

When i drill down i should view Month Wise View like below

Thanks,
Raghu

3 REPLIES 3
Super User

@kolturra

I am not sure if I read your question correctly. If you want to drill down to the next level, you click on the double arrow.

Make sure your fields are stacked as below:

Did I answer your question? Mark my post as a solution! and hit thumbs up
Helper IV

Sorry I think I did not give proper communication in my earlier message. We need to create measure for % comparison with previous year and month

Year wise Visual.

1. Year wise it has values of each year in bar.
2. % Comparison with previous year which is line chart - This we have to achieve with measure

Drill Down Visual - Once we click on specific year, we will drill down to Month level.

1. Months wise it has values of each month in bar.
2. % Comparison with previous month which is line chart - This we have to achieve with measure

My data is in below format

Column 1 - Month - Jan 2020 to Dec 2021

Column 2  - Value - between 100 to 200

Not able to paste table because of some error, if you create this table then my data will be ready

Super User

@kolturra

I created the sample data based on your explanation for the years 2020 to 2022, add a date table to use Time Intelligence functions, created the following single measure to calculate % variance for both year and month level. I also attached the PBIX file for you to learn.

``````vs Previous Period  % =
var __Curr = [Amount]
var __PreYR =
CALCULATE(
[Amount],
)
var __PreMO =
CALCULATE(
[Amount],
)

var result =
IF(
ISFILTERED(Dates[Year-Month]),
DIVIDE( __Curr - __PreMO , __PreMO ),
DIVIDE( __Curr - __PreYR , __PreYR )
)
return
result``````

Did I answer your question? Mark my post as a solution! and hit thumbs up

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors