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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
HarrisonBi
Frequent Visitor

How to filter visuals correctly when using multiple dates

Hi,

 

I would like to know how (if possible) I can filter visuals correctly when I am using multiple dates. I will explain my situation below:

 

I have a date table and a sales table. These two tables are related by Date[Date] and Sales[InvoiceDate] as I usually report sales based on the invoice date and this has worked fine. 

 

However, on the sales table there is also another date called CreationDate, I would now like to see all my sales broken down by the creation date. So what I have done is, created an inactive relationship between Date[Date] and Sales[CreationDate] and created a measure 

CALCULATE(Sales[SalesTotal],

USERELATIONSHIP('Date'[Date],Sales[CreationDate]))

This works and I am able to use various columns from the date table (i.e. Financial Year) and see my sales according to the CreationDate - I have this displayed in a matrix.
 
However the problem I am facing is - if I click a month in the matrix, all the other visuals on the page are filtering the results based on the InvoiceDate NOT the CreationDate. I believe this is because the active relationship between the two tables is based on InvoiceDate.
 
How can I make the other visuals filter based on CreationDate when clicking a month in my matrix ?
 
Thanks
2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I think you will have to rewrite all the measures with the USERELATIONSHIP() function.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@HarrisonBi , When you filter months from the date table. Visual using USERELATIONSHIP('Date'[Date],Sales[CreationDate]) will filter on Creation date.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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