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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
DAX_Noob8212
New Member

Calculating daily number changes

Hi Team, I have a simple table with 4 rows.

 

Snapshot_datenew_enrreturning_enrtotal_enr
15/09/202310050150
16/09/2023200100300
17/09/2023300150450
18/09/2023400200600
19/09/2023500250750
20/09/2023600300900

 

I tried a few different codes but it's not working.

I just need a code to calculate the daily changes in numbers across these dates for 'new_enr' ,'returning_enr' and 'total_enr'.
So for example for daily changes in number for new_enr 1for the 16/09/23 would be 100 since its 100 more than 15/09/23 and likewise 50 for 'returning_enr' and  150 for'total_enr'.

 

Thanks all.

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @DAX_Noob8212 for column total_enr to get daily change do following
Create Calendar / Date table and connect with your table

Create following measure (3) and you will get Output

Did I answer correctly? Kudos appreciate / accept solution.

 

Sum of total enr measure = SUM(Sheet1[total_enr])
sum total enr previous measure =
CALCULATE(
   SUM(Sheet1[total_enr]),
    DATEADD('Date'[Date],-1,DAY)
)
diff total enr measure =
VAR __total_enr=[Sum of total enr measure]
VAR __total_enr_prev=[sum total enr previous measure]
RETURN __total_enr-__total_enr_prev

Output

some_bih_0-1694849605367.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
DAX_Noob8212
New Member

This is great! Thanks!

some_bih
Super User
Super User

Hi @DAX_Noob8212 for column total_enr to get daily change do following
Create Calendar / Date table and connect with your table

Create following measure (3) and you will get Output

Did I answer correctly? Kudos appreciate / accept solution.

 

Sum of total enr measure = SUM(Sheet1[total_enr])
sum total enr previous measure =
CALCULATE(
   SUM(Sheet1[total_enr]),
    DATEADD('Date'[Date],-1,DAY)
)
diff total enr measure =
VAR __total_enr=[Sum of total enr measure]
VAR __total_enr_prev=[sum total enr previous measure]
RETURN __total_enr-__total_enr_prev

Output

some_bih_0-1694849605367.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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