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

Multiple Dates used in Created Column

Hi Community,

 

I have 2 tables. One is a Sales Data table and one is a date table.

 

There are 2 dates in the Sales Data table - Close Date and Created date. 

 

Within my dates table I have added a column which allow me to filter for the current quarter, depending on today's date:

Quarters Passed = if(Dates[Date] >= TODAY(),-(DATEDIFF(TODAY(),Dates[Date],QUARTER)),DATEDIFF(Dates[Date],TODAY(),QUARTER)),

I can then pull this column into a filter and select 0 and it will always show the current quarter. 

 

I have my Sales Data table related to my Date table with the close date. So far, I have only needed to use the close date.

 

I have just received a request to show the number of opportunites that were created in the current quarter. Through some research I was able to find the USERELATIONSHIP syntax so I thought I could use this to create a new column in my dates table so that I could filter for opportunities in the current quarter. I created a second relationship between the tables, this time using the Created Date.

 

My questions is whether this is possible and if so, how do I utilise the USERELATIONSHIP in the above code to create a new column called Quarters Passed Created?

 

Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

See my Open Tickets quick measure, it was designed for this kind of scenario. 

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

See my Open Tickets quick measure, it was designed for this kind of scenario. 

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 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.