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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jacostal
New Member

Userelationsihp with dates power bi

Hi Comunity could you help me 

i have a database with tow columns with dates one marks when a register has been created and other one mark the date when this is closed.  the thik is that i want to display in the same graph the number of tickets had been created on one day and how many had been close.  both coulmns has a relationship with my Calendar table.  right now the counting for my open items works but for the Closed items is just counting the cases which happens during the same month of the creation.

 this is what i have till now 

 

 

jacostal_0-1712779517584.pngjacostal_1-1712779546914.pngjacostal_2-1712779574576.png

 

this is what i want 🙂 

jacostal_3-1712780096585.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jacostal ,

First of all, many thanks to @audreygerred  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712809590161.png

2.Create the new measure to calculate created tickets.

 

created Tickets = 
VAR ticket_ = CALCULATE(
    COUNTROWS('Task Table'),
    USERELATIONSHIP('Task Table'[Created Date], 'Table'[Date])
)
RETURN
IF(ticket_ = 0, 0 , ticket_)

 

3.Create the new measure to calculate closed tickets.

 

closed tickets = 
CALCULATE(
    COUNTROWS('Task Table'),
    USERELATIONSHIP('Task Table'[Closed Date], 'Table'[Date])
)

 

4.Drag the measure into the table visual and line chart.

vjiewumsft_2-1712809663422.png

vjiewumsft_1-1712809650818.png

5.The result is shown below.

vjiewumsft_3-1712809679234.png

vjiewumsft_4-1712809688516.png

Best Regards,

Wisdom Wu

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jacostal ,

First of all, many thanks to @audreygerred  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712809590161.png

2.Create the new measure to calculate created tickets.

 

created Tickets = 
VAR ticket_ = CALCULATE(
    COUNTROWS('Task Table'),
    USERELATIONSHIP('Task Table'[Created Date], 'Table'[Date])
)
RETURN
IF(ticket_ = 0, 0 , ticket_)

 

3.Create the new measure to calculate closed tickets.

 

closed tickets = 
CALCULATE(
    COUNTROWS('Task Table'),
    USERELATIONSHIP('Task Table'[Closed Date], 'Table'[Date])
)

 

4.Drag the measure into the table visual and line chart.

vjiewumsft_2-1712809663422.png

vjiewumsft_1-1712809650818.png

5.The result is shown below.

vjiewumsft_3-1712809679234.png

vjiewumsft_4-1712809688516.png

Best Regards,

Wisdom Wu

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

audreygerred
Super User
Super User

Hi! This video on YouTube should get you where you need to be 🙂 

DAX measure with start AND end date for Power BI (youtube.com)





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

Proud to be a Super User!





Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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