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
Anonymous
Not applicable

Month not tied to single criteria

Hi,

 

So I have landed up in a unique problem here :-

 

I have a date table and my dataset. My dataset is directly connected to the date table. My dataset is something similar to this: -

 

TaskIDOpen DateClosed Date
11/1/20142/3/2016
23/4/20166/7/2017
39/1/20165/12/2017
47/31/20151/5/2018

 

 

Now I want to plot a visual with number of tasks open and closed in the past 3 years (one visual with 2 lines). However, my date table is connected to either closed or open date. How do I fix this? I do not want to connect my date table. Just want to use that as a reference. 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

Make two inactives relationships between the date table and open/closed date then make two measures somilar to below

CALCULATE(COUNT(table[taskid]) ; USERRELATIONSHIP(table[opendate]; calendar[date])

Create one for open like above and another for closed then add it to your visual with date from.calendar table as axis.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

  1. The relatioshop from the Open Date to the Date in the Calendar Table should be active
  2. The relatioshop from the Closed Date to the Date in the Calendar Table should be inactive
  3. Drag the Date from the Calendar Table in your visual
  4. Set the relative date filter to past 3 years
  5. Write these measures

 

Cases opened = COUNT(Data[TaskID])

Cases closed = CALCULATE(COUNT(Data[TaskID]),USERELATIONSHIP(Data[Closed Date],Calednar[Date]))

 

Hope this helps.


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

Hi @Anonymous,

Make two inactives relationships between the date table and open/closed date then make two measures somilar to below

CALCULATE(COUNT(table[taskid]) ; USERRELATIONSHIP(table[opendate]; calendar[date])

Create one for open like above and another for closed then add it to your visual with date from.calendar table as axis.

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.