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
lamysroe
Advocate I
Advocate I

Combining Tables or getting count of visual

I am building a report and one point of data I need is the number of IT tickets within 30 days of hire.

 

I table Staffing as follows

Email

Hire Date

Days from Start

(Calc column=Days NOW()-'Staffing Sheet'[Hire Date])

 

A

1/1/2019

 

B

1/1/2019

 

C

5/6/2019

 

D

8/3/2019

 

E

1/5/2020

 

 

I have table Total Tickets as follows

Email

Ticket ID

Created Date

Subject

A

1

1/2/2019

Ada

C

2

6/2/2019

Rgtsfgs

E

3

1/8/2020

Sdfgsd

D

4

8/25/2019

Fdgsdfg

A

5

1/15/2019

Sdfgsdfg

A

6

2/1/2020

Dfgsdf

B

7

1/20/2019

sdfgsd

 

I also have measure Ticket Creation Days From Start which is days the number of days between start date and ticket creation. 

Ticket Creation Days From Start =

DATEDIFF (

  SELECTEDVALUE( 'Staffing Sheet'[Hire Date]),

  SELECTEDVALUE('Totals Tickets'[Created Date] ),

    DAY

)

 

My tables are connected with a relationship of one to many from Staffing Email to Total Ticket Email

With that, I have created the following table visual with filter of Ticket Creation Days fom Start less than 30. The table will change based on the slicer year and month I choose.

 

Tickets within 30 days of hire

Email

ID

Ticket Creation Days from Start

A

1

1

A

5

2

A

6

5

A

9

15

A

12

20

B

7

7

B

13

18

B

14

21

C

2

23

D

4

12

D

20

28

 

I need to figure out how to have a table that looks something like this using the same parameters as less than 30 days from hire and able to change based on my slicer ticket creation date.

Email

Ticket Count

A

5

B

3

C

1

D

2

 

Thanks for any ideas!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @lamysroe ,
 
You may add an additonal measure as shown below.
Ticket Count = CALCULATE(
    COUNTROWS(Tickets),FILTER(Tickets,[Ticket Creation Days From Start]<=30))
 
Then drag 'Staffing ' [email] and [ticket count] into the table view
test_ticket_count.PNG
You can also refer to the pbix.
 
Best Regards,
Liang
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

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @lamysroe ,
 
You may add an additonal measure as shown below.
Ticket Count = CALCULATE(
    COUNTROWS(Tickets),FILTER(Tickets,[Ticket Creation Days From Start]<=30))
 
Then drag 'Staffing ' [email] and [ticket count] into the table view
test_ticket_count.PNG
You can also refer to the pbix.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.