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
vaishalisah
Regular Visitor

Can we use measure in visual filter in DirectQuery Mode?

Hello,

 

I want to filter data for the current month. I have created a measure to tell me how many months old the record is. When I try to use that measure in Visual filter, its fields are disabled and doesn't allow me to apply filter. Is it because of DirectQuery mode?

Guide me where am I going wrong. MeasureFilter.PNG

 

Thanks,

Vaishali

3 REPLIES 3
v-sihou-msft
Employee
Employee

@vaishalisah

 

It should work, did you put number under "is less than" filter?

 

8.PNG

 

Regards,

Hello @Seth_C_Bauer, @v-sihou-msft

 

Thank you for your reply.

Following is the measure I created:

 

Months Old = DATEDIFF(MAX('Values'[ValueDateTime]),TODAY(),MONTH)

 

It doesn't allow me to filter by the measure, unless I add its base Column "ValueDateTime" in the visualization.

And, I cannot apply page level filter at all using measure. 

 

 

 Is adding calculated column the way out?

Regards,

Vaishali

@vaishalisah It appears that you are getting a value returned, so I don't see this as an unsupported function, otherwise you would see an error. But we'd need to see the actual DAX measure to see whether or not the function you are using is supported.

 


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.

Top Solution Authors
Top Kudoed Authors