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
pstanek
Post Patron
Post Patron

Page-Level Filter by measure

I would like to filter by NOW()-1, YTD, MTD and others , but I have many parameters, So I don´t want to create

 

CALCULATE( SUM( TABLE[COLUMN1];TABLE[DATE]=NOW()-1)

 

CALCULATE( SUM( TABLE[COLUMN2];TABLE[DATE]=NOW()-1)

 

CALCULATE( SUM( TABLE[COLUMN3];TABLE[DATE]=NOW()-1)

.

.

.

 

I use direct query most of time, so I can´t use time intekigence funtion. How will I do it without create the same measure multipletimes. I want one measure and use u in page level filter for example.

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @pstanek

 

If I understand what you are trying to do is to create a page level filter based on a date?

 

If so you can use the relative date slicer in the May version of Power BI Desktop?

This will allow you to filter your data in your page based on a date.

 

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-may-feature-summary/#relativeDateSlicer

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

An alternate method, should @GilbertQ's not be to your liking, is to create a calculated column which does a simple IF statement to check if the row is in the date filtered range or not.  Something like

inRange = IF(
	'Table'[Date] < Today(),
	1,
	0
)

You can set your filter to only show rows where the inRange = 1

 

Can I use use relative slicer from certain date?

 

For example If I want to filter interval NOW -14 to NOW - 7 , I can´t use relative slicer. I can use relative slicer , if I want to filter NOW -7 to NOW.

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.