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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
FatherTheWizard
Resolver I
Resolver I

Cumulate between two dates in same table, USERELATIONSHIP needed for the same DAX

Hi,

 

I tried 4 different topics here but could not solve the issue.

 

Target ( I have Ticketing data where One row = one ticket):

- Cumulate count of [ticket_id] for each day between [due_by] +1 to [resolved_at] -1 -> all this data in the same table (fact) Tickets

- Use USERELATIONSHIP from [due_by] to date table (table name (dim) Date, column date).

 

I have ticketing data where one row is one ticket and important date columns are due_by and resolved_at. I also need to use USERELATIONSHIP from due_by to date column in date table to get the chart working (=using due_by as the date dimension in an indirect way).

 

How to get the cumulating working? I seemed to have odd issues when applying the userelationship included so that is another problem.

 

Example of target to show for one ticket:

Date due_by resolvet_at ticket_id DAX for cumulative count  
14.1.2021 14.1 17.1 example1 0  
15.1.2021 14.1 17.1 example1 1  
16.1.2021 14.1 17.1 example1 1  
17.1.2021 14.1 17.1 example1 0  
18.1.2021 14.1 17.1 example1 0  
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@FatherTheWizard 

First of all, you need to change the all those date data into actual Date Type column.

 

You can create a flag column first for the row in between the due date and resolve date. If all information are from the same table, you don't need userelationship to activate the date in the Dim date table.

 

flag = IF([Date] in CALENDAR([due_by],[resolvet_at]),1,-1)
Column = CALCULATE(SUM('Table'[flag]),FILTER('Table',[Date]<=EARLIER([Date])))
V-pazhen-msft_1-1622785286957.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@FatherTheWizard 

First of all, you need to change the all those date data into actual Date Type column.

 

You can create a flag column first for the row in between the due date and resolve date. If all information are from the same table, you don't need userelationship to activate the date in the Dim date table.

 

flag = IF([Date] in CALENDAR([due_by],[resolvet_at]),1,-1)
Column = CALCULATE(SUM('Table'[flag]),FILTER('Table',[Date]<=EARLIER([Date])))
V-pazhen-msft_1-1622785286957.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors