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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Zaky
Helper IV
Helper IV

Count Ageing Range

Hi,

 

I have a data where it has 2 report date (07/03/2019 and 15/03/2019).

What I want to is to get the count of the Remaining Ticket (992 total tickets) of [Work Order ID] by date of each ageing range for Table 2. As shown in Table 2, the formula that is used to count the Remaining Ticket by ageing range is only count for the date 07/03/2019. I want the expected result it also count for date 15/03/2019.

*Remaining_Tickets =

var FindOtherDate = CALCULATE(MAX('WO Raw Data For Ageing'[Report Date]), FILTER('WO Raw Data for Ageing', 'WO Raw Data For Ageing'[Work Order ID]=EARLIER ('WO Raw Data For Ageing'[Work Order ID])))

return

IF('WO Raw Data For Ageing'[Report Date]<> FindOtherDate && 'WO Raw Data For Ageing'[*CountForDupes]>= 2, "Remaining")

 

I believe that the formula above is working to count the duplication tickets for Table 1.

table1.PNG

Table2.PNG

Before that I have created a calculated column to count the ticket duplication of [Work Order ID] as follow:

*CountForDupes =

var FindDupes = 'WO Raw Data For Ageing'[Work Order ID]

return

CALCULATE(COUNTROWS('WO Raw Data for Ageing'), ALL('WO Raw Data for Ageing'), FindDupes='WO Raw Data For Ageing'[Work Order ID])

 

Can anyone help with the correct column formula that suit my requirement?

To get make sense, you may download the raw data and PBI files from here

 

Thank you in advanced for the help.

Thank you in advanced for the help.

 

 

 

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi Zaky,

Could you please tell us which kind of Ticket can be counted as “Remaining Ticket” in your environment?

Actually, there is no “Remaining Ticket” at 15/03/2019 if we use the regular *Remaining_Tickets, many Tickets are neither in “New”, “Closed” nor “Remaining” in your environment:

435435435342534.png

Best Regards,

Teige

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.