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
harishkanyal
Frequent Visitor

How to create Incident created and closed metrics based on Created and closed dates

Hi,

 

Need help in creating Incident closed and created IN based on closed and created dates.

 

I have craeted 

 

Incident data 

INCreated onClosed on
IN00110-Jun-1910-Jun-19
IN00210-Jun-1911-Jun-19
IN00309-Jun-1910-Jun-19
IN00410-Jul-1911-Jul-19
IN00510-Jul-1910-Jul-19
IN00610-Jul-1910-Jul-19
IN00711-Jul-1912-Jul-19
IN00810-Jun-1901-Jul-19
IN00911-Jul-1911-Jul-19
IN01012-Jul-1913-Jul-19

 

Report

 

 OpenedClosed
June43
July67

 

Thanks

Harish

1 ACCEPTED SOLUTION

Hi @harishkanyal ,

 

Attached the file here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/ETgYiqiwf5xHrYrApGa01X...

 

NrofCl&NrofCR are measures, not calculated column.
 

Best regards,

Dina Ye
Community Support Team _ Dina Ye
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

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @harishkanyal 

 

You can add a calculated table and manage the relationship between the fact table, note there’re 2 relationships. [Closed on]with[Date] is active, [Created on] with [Date] is inactive.

 

Table = CALENDAR(DATE(2019,6,1),DATE(2019,7,31))

8.png

Then add the calculated column and measures:

Month = MONTH('Table'[Date])

NrofCl = CALCULATE(DISTINCTCOUNT('Incident data'[IN]),VALUES('Table'[Month]))
NrofCR = CALCULATE(DISTINCTCOUNT('Incident data'[IN]),USERELATIONSHIP('Incident data'[Created on],'Table'[Date]),ALLEXCEPT('Table','Table'[Month]))

Results shown as:

9.png

Best regards,

Dina Ye

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Thanks @v-diye-msft  . Let me try it

Hi @harishkanyal ,

 

If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

 

Hi Dina,

 

I tried the solution but not getting right output for created on.

 

Could you please help. I uploaded my file in one drive Linkhttps://microsoft-my.sharepoint.com/:f:/g/personal/v-hcsing_microsoft_com1/EvLOOMTwMV1NhQhj_d-2BIUBx...

 

Thanks

Harish

Hi @harishkanyal ,

 

Attached the file here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/ETgYiqiwf5xHrYrApGa01X...

 

NrofCl&NrofCR are measures, not calculated column.
 

Best regards,

Dina Ye
Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Thanks Dina, this worked

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.