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
Artefact
Helper II
Helper II

Workload history pattern, but with several distinct statusses

Hello,

The workload DAX pattern to calculate the workload (eg on helpdesk tickets) on every day in the past is clear. But I want the workload, specified also by the status of a ticket. The table with the source data for this shows the following columns, and sample data (european date format!) :
I want a visual which shows the number of tickets of each status which were open on a daily basis, with history. 

Ticket_idStatusDate to this statusDate from this status
1analyse1-1-20251-2-2025
1work2-2-20252-3-2025
1hold3-3-202520-3-2025
2intake2-2-20254-2-2025
2work5-2-202523-2-2025
5 REPLIES 5
v-vpabbu
Community Support
Community Support

Hi @Artefact,

 

Thanks @Hakuna_matata  and @DataNinja777 for Addressing the issue.

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @Artefact,

 

May I ask if you have gotten this issue resolved?

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Vinay Pabbu

Hi @Artefact,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Hakuna_matata
Resolver I
Resolver I

Hi @Artefact ,

First lets create a date table 

DateTable = CALENDAR(MIN('Table'[Date to this status]), MAX('Table'[Date from this status]))
Than we can create a measure 
TicketsInStatusOnDate =
CALCULATE(
COUNTROWS('Table'),
'Table'[Date to this status] <= MAX('DateTable'[Date]) &&
'Table'[Date from this status] >= MIN('DateTable'[Date])
)
 
Than we can use any visual I have used stacked column chart
Hakuna_matata_0-1742722334260.png

Hope it helps!
Please mark this as a solution if this help.

DataNinja777
Super User
Super User

Hi @Artefact ,

 

To show the number of tickets in each status on a daily basis using DAX, you can apply a pattern similar to headcount logic. Instead of expanding the dataset in Power Query to create one row per ticket per date, you can calculate whether a ticket was open on a given date using a measure. This approach keeps your data model lean and allows you to work with the original StatusLog table, which includes columns: Ticket_id, Status, Date from this status, and Date to this status.

First, create a calendar table that dynamically covers the date range of interest. This version expands from the earliest "from" date in the data up to today:

Calendar =
ADDCOLUMNS (
    CALENDAR (
        MIN ( 'StatusLog'[Date from this status] ),
        MAX ( MAX ( 'StatusLog'[Date to this status] ), TODAY () )
    ),
    "Date", [Date]
)

Make sure you create a relationship between Calendar[Date] and a separate date field in your visuals. Since the StatusLog table does not have a native date column for daily analysis, the relationship will be indirect—so the DAX measure will be responsible for enforcing the logic.

Now, create the measure to count the number of tickets open on each day per status. This checks whether the selected date in the context falls between the Date from this status and Date to this status:

Open Tickets = 
CALCULATE(
    DISTINCTCOUNT('StatusLog'[Ticket_id]),
    FILTER(
        ALL('StatusLog'),
        'StatusLog'[Date from this status] <= MAX('Calendar'[Date]) &&
        'StatusLog'[Date to this status] >= MAX('Calendar'[Date])
    )
)

To analyze by status, simply include StatusLog[Status] as a legend or column in your visual (e.g. a stacked area chart or matrix). This will break down the count of open tickets by their current status on each date.

This approach is flexible and efficient, avoiding unnecessary data expansion while still providing a detailed historical workload view by ticket status.

 

Best regards,

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.