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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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])


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors