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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
akhil148265
Frequent Visitor

YTD Average showing me blank values after filtering a value from slicer

Hi,

 

I need your help for solving this. I am creating a YTD average by using the below formulas

 

akhil148265_0-1661929283241.png

 

akhil148265_1-1661929346925.png

 

 Correct Result that i need:

akhil148265_2-1661929383062.png

Challenge:-

As soon as i filter a date from the slicer the YTD average value is giving me blank result instead of the corresponding value as shown in the above table.

 

akhil148265_3-1661929473585.png

 

Am i missing something in the DAX can you please help?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@akhil148265 , The first formula, averageX should use calculate in expression

 

example

averageX(Values(Data[Sample Date]), calculate(Sum(Table[Value])) )

 

for YTD try time intelligence

 

YTD Sales = CALCULATE(averageX(Values('Date'[Date]), calculate(Sum(Table[Value])) ) ,DATESYTD('Date'[Date],"12/31"))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@akhil148265 , The first formula, averageX should use calculate in expression

 

example

averageX(Values(Data[Sample Date]), calculate(Sum(Table[Value])) )

 

for YTD try time intelligence

 

YTD Sales = CALCULATE(averageX(Values('Date'[Date]), calculate(Sum(Table[Value])) ) ,DATESYTD('Date'[Date],"12/31"))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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