Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Anonymous
Not applicable

Always show most recent date in chart without filter how to?

Is there a way to always show the most recent date of metrics in a chart without selecting a filter date in any way? 

 

For example, if I were to open the pbix file and click refresh, only data for September 5th would show. I have a few formulas for metrics within the chart if I could modify those. I do not want to manually select September 5th in anyway. 

 

I have a couple of rolling averages and percent change calcs as below. 

% Change from 12 Week to Current Month = 
VAR __BASELINE_VALUE = 'LNApps_Facts'[Amount 12 Week Rolling Average]
VAR __VALUE_TO_COMPARE = 'LNApps_Facts'[Last 4 Weeks]
RETURN
	IF(
		NOT ISBLANK(__VALUE_TO_COMPARE),
		DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
	)
Rolling Average = 
IF(
	ISFILTERED('LNApps_DateDim'[ActualDate]),
	ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy."),
	VAR __LAST_DATE = LASTDATE('LNApps_DateDim'[ActualDate].[Date])
	RETURN
		AVERAGEX(
			DATESBETWEEN(
				'LNApps_DateDim'[ActualDate].[Date],
				DATEADD(__LAST_DATE, -21, DAY),
				DATEADD(__LAST_DATE, 0, DAY)
			),
			CALCULATE(SUM('LNApps_Facts'[Amount]))
		)
)
5 REPLIES 5
Anonymous
Not applicable

I just found the relative date filtering to filter just the day, but this only works without using a date hierarchy. If I try to do this, my chart goes blank and displays this error: "Time intelligence quick measures can only be grouped or filtered by the power BI-provided date heirarchy."

Hi @Anonymous,

Could you please share your .pbix file for further analysis? So that we can test and reproduce your scenario.

Best Regards,
Angelia

Anonymous
Not applicable

I cannot share a file all the data is too confidential. I just am confused about how to filter a time intelligence measure such as a rolling average using the relative date filter in the sidebar pane. Sidenote I don't know if this helps but the time intelligence measures were made using Quick Measures

 

 

Image result for relative date filter power bi

Anonymous
Not applicable

https://community.powerbi.com/t5/Desktop/Page-Level-Filter-NOW-1/td-p/8257

 

This thread was helpful, but I'm still stuck I believe due to the date my chart is referencing being a date hierarchy. 

IsCurrentday =
IF ( 'Table'[Date] = TODAY () - 1, "Yes", "No" )

 

I tried using the formula above to insert into the visualization filter to make the chart always show the most recent date - which for my purposes I need to be the day before today. This is not working either and I am thinking it is because the formula is referencing the non-date hierarchy version of my actualdate field. 

 

Would something like this (it's incorrect) fix my issue with the formula above to always get the most recent day before today?

I do not have a "day " field like "month" or "year" instead all I have is "actualdate" which reads like "Friday, September 8, 2017. 

 

IsCurrentday = 

IF ( LNApps_FundingDateDim[month] = MONTH(
&& LNApps_FundingDateDim[year] = year(
&& LNApps_FundingDateDim[ActualDate] = day( - 1, "Yes", "No" )

Hi @Anonymous,

Actually, I am confused with your sentense "I do not have a "day " field like "month" or "year" instead all I have is "actualdate" which reads like "Friday, September 8, 2017. "? Your actualdate has different format?

Best Regards,
Angelia

Helpful resources

Announcements
Europe Fabric Conference

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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