Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Heursqem
Frequent Visitor

Column showing 3 and 12 months average

Hi team

I am trying to create an overview like this one:

Target.JPG

My source table loooks simular to this one:

Source.JPG

I have tried many setups, but have not been able to come close at all.

Anyone who can give some guidance how to set this up.

Appreciated big time

R

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Heursqem ,

 

create a date from month and year

date = date([year],[month],1)


Join it with date table

 

previous 12 Avg license= CALCULATE(averagex(filter(Table, Table[Type] = "License"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

previous 3 Avg license= CALCULATE(averagex(filter(Table, Table[Type] = "License"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

 

previous 12 Avg Services= CALCULATE(averagex(filter(Table, Table[Type] = "Services"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

previous 3 Avg Services= CALCULATE(averagex(filter(Table, Table[Type] = "Services"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Heursqem
Frequent Visitor

Thanks Amitchandak; I tweaked it a bit and now it works fine

At the same time, I continue to learn....

 

Thanks

Heursqem

amitchandak
Super User
Super User

@Heursqem ,

 

create a date from month and year

date = date([year],[month],1)


Join it with date table

 

previous 12 Avg license= CALCULATE(averagex(filter(Table, Table[Type] = "License"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

previous 3 Avg license= CALCULATE(averagex(filter(Table, Table[Type] = "License"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

 

previous 12 Avg Services= CALCULATE(averagex(filter(Table, Table[Type] = "Services"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

previous 3 Avg Services= CALCULATE(averagex(filter(Table, Table[Type] = "Services"), Table[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.