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
Toots
Frequent Visitor

Filter Measure by different date columns

Hi All,

 

I am setting up some sales pipeline reporting where on one visual

I would like to have the only sales with the likelihood "WON" filtered by the actual close date

Then have a target of sales filtered by the exp close date

And set an over target the manager will set on a target table.

The relationship to the date table is done by the start date

 

Any thoughts on a filtered measure or any other way?

 

2020-06-19_13h44_47.png2020-06-19_13h57_19.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Toots , You can join both dates with date table and use userelation to switch the relation.

 

Please find the example

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Toots 

 

I'd like to suggest you use the USERELATIONSHIP DAX function to make the inactive relationship active during the evaluation of a model calculation.

For further information, you may refer to the document .

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi There, The userelationship function works perfect thank you. Do you know if you can also use the filter function within this so I can filter out WON and Deleted out of the likelihood column?

 

 

AU Market Sales EC $ =
CALCULATE (
SUM ( 'AU Market Map'[Sales $] ),
FILTER(ALL('AU Market Map','AU Market Map'[Likelihood]="Target","Business Case","Early Days","Possible","Strong"))
USERELATIONSHIP ( 'Calendar'[Date], 'AU Market Map'[Exp Close Date ] )
)
amitchandak
Super User
Super User

@Toots , You can join both dates with date table and use userelation to switch the relation.

 

Please find the example

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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.