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 September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.