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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nilsoo
Frequent Visitor

How to use values that are filtered with a Date Filter

Hi,
I have the following problem I have a data set containing Sales values of a specific date (my short table below should clarify the topic). I would like to use a time range filter that says how the total sales of the beginng of a period and at the end of a period is.
If I adjust the time range and set it to 2.1 - 4.1, the value of the date 1.1 is filtered out so my total sales at 2.1 is 5 )instead of 25)and 4.1 is 45 (instead of 65). Anyone an idea how to solve this? 

 

Date      Sales

1.1         20

2.1          5

3.1         25

4.1          15

5.1         10

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Nilsoo,

 

So, you want to get the running total based on your choose data range,right?


If this is a case, you can try to use below measure to calculate the running total:

 

Selected Running Total = 
var currDate=MAX('Table'[Date])
Return
SUMX(FILTER(ALLSELECTED('Table'),'Table'[Date]<=currDate),[Value])

 

 

Regards,

Xiaxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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