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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AjayRangarajan
Frequent Visitor

how to measure a value from one date to another date in power bi

Hi All , I need a dax command for adding up the amount i.e from 9.05.20 to 27.06.20 so i should get a total of 240.It would be great if any one could help with the formula. Thanks in advance for helping out.

 

AjayRangarajan_1-1599302809531.png

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@AjayRangarajan , Assuming your dates are in DD-MM-YYYY format. You can use a date slicer on week start date and filter

Sum(Table[Amount])

You can create a measure like

calculate ( sum ( Table[Amount] ),
filter (Table ,Table[Week Starting Date] >= date ( 2020, 05, 09 ) && Table[Week Starting Date] <= date ( 2020, 06, 20 ) ))

 

Filter can be

filter (Table , or filter (allselected(Table) , or filter (all(Table) ,

 

Depending on what you want to ignore

 

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

Hope date is correctly detected as date, else refer

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AntrikshSharma
Super User
Super User

@AjayRangarajan Try this:

=
CALCULATE (
    SUM ( Table[Amount] ),
    FILTER (
        ALL ( Table ),
        Table[Week Starting Date] <= DATE ( 2020, 06, 27 )
            && Table[Week Starting Date] >= DATE ( 2020, 09, 05 )
    )
)

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!

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.