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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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