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
DynamicsHS
Helper II
Helper II

How to get the total amount before start date in a slicer?

Hi, 

 

I have a date slicer which is between dates. Currently the slicer is returning the amount between the to dates, which is fine for one column. However I would like to create a seperate column that calcuates the total amount from the start date of the slicer. Is this possible to do? 

 

I have a date slicer which is connected to a Leave table: 

The leave table has the transaction date & the accrual amount. 

 

Could someone please help me out with this! 

 

Thank you

1 ACCEPTED SOLUTION

3 REPLIES 3
Greg_Deckler
Super User
Super User

@DynamicsHS Maybe:

Measure = 
  VAR __MinDate = MIN('Dates'[Date])
  VAR __Table = FILTER(ALL('Leave',[Date] < __MinDate)
RETURN
  SUMX(__Table,[Accrual])

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , 

 

I was able to use this question in the forum https://community.powerbi.com/t5/Desktop/Calculate-Opening-Balance-of-Selected-Range/m-p/347777#M156...

 

Thank you for helping out. 

 

 

Hi @Greg_Deckler , 

 

I just struggling with the formula...

DynamicsHS_0-1666314053316.png

So I have the date table 

 

And leavebanktransaction table which holds:

Transaction date  & Amount ....

 

Have I placed to correct values in the right space? 

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.