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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
saiko_cs
Frequent Visitor

Try to apply a monthly value as a yearly value in another calendar table

Hello community,

 

I have a monthly fact table with two columns:

DateValue
01/01/2023232
01/02/2023241
01/03/2023245
01/04/2023247
01/05/2023244
01/06/2023246
01/07/2023244
01/08/2023243
01/09/2023 
01/10/2023 
01/11/2023 
01/12/2023 

 

I calculate the ytd average with this measure:

CALCULATE(AVERAGE([Value]),DATESYTD('CALENDAR'[Date]))
The result is what I want: 
DateValueYTD Average
01/01/2023232232
01/02/2023241237
01/03/2023245239
01/04/2023247241
01/05/2023244242
01/06/2023246243
01/07/2023244243
01/08/2023243243
01/09/2023 243
01/10/2023 243
01/11/2023 243
01/12/2023 243
 
And I'm using a visual with a monthly slicer to show the result on a page.
 
On the same page, I also need to display a bar chart of the current year AND not be filtered by the monthly slicer.
So, I create a second calendar table to display each measures I need to show for each month of the current year.
But I can't find a solution to show a specific value in this visual.
 
Example 1:
If the monthly slicer filtered March 2023, my "YTD average" is 239.
I want to show as a yearly line with this value (239) for the whole year 2023.
 
Example 2:
If the monthly slicer filtered June 2023, my "YTD average" is 243.
I want to show as a yearly line with this value (243) for the whole year 2023.
 
Please advise,
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @saiko_cs ,

I have created a simple sample, please refer to it to see if it helps you.

Create a measure.

Measure = 
AVERAGEX(FILTER(ALL('Table'),'Table'[Date]<=SELECTEDVALUE('Table'[Date])),'Table'[Value])

vrongtiepmsft_0-1693191458271.pngvrongtiepmsft_1-1693191471472.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

2 REPLIES 2
saiko_cs
Frequent Visitor

Thanks a lot, that's exactly what I try to find (thumb up)

Anonymous
Not applicable

Hi @saiko_cs ,

I have created a simple sample, please refer to it to see if it helps you.

Create a measure.

Measure = 
AVERAGEX(FILTER(ALL('Table'),'Table'[Date]<=SELECTEDVALUE('Table'[Date])),'Table'[Value])

vrongtiepmsft_0-1693191458271.pngvrongtiepmsft_1-1693191471472.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.