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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How can I filter a table visual on a measure?

I have a measure defined:  StartDate1Y = DATEADD(LASTDATE(GetZeroPBaseData[ProductionDate]),-1,YEAR)
 
I want to filter a table visual based on that measure.  For clarification, a slicer defines my production date range to be, say, May - Jun 2023.  This measure will create a second date range from Jun 2022 to Jun 2023, or rather, just that start date.  Then, I want to apply those dates to an unrelated table visual where that first slicer has been turned off.  I can't get it to work.  I'm new to PowerBI and I'm trying to learn from the middle, but I have to get it figured out by Monday.
 
Thanks in advance for any help.
2 REPLIES 2
danextian
Super User
Super User

Hi @Anonymous ,

 

You can't use a measure in a slicer, only a column can. What you can do  is to reference that measure in another measure to filter a calculation. For example:

New Measure =
CALCULATE (
    [measure or aggregation],
    FILTER ( mytable, mytable[column] = [my filter measure] )
)

If you want to get a better answer, please refer to this sticky post:

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/3332479#M1112153 










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
littlemojopuppy
Community Champion
Community Champion

HI @Anonymous 

 

You cannot plug measures into slicers...only columns.

 

I'd suggest building the logic for a given selection of dates, calculate the measure for the intended dates.  You will need a date table and it marked appropriately.  But after that, there are Time Intelligence functions that will make this really easy.

 

Hope this helps!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.