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
summerpolice
Regular Visitor

Summarize and Slice based on time period( start and end date)

 Start Date End Date Name BalanceStart yearEnd year
1/1/201412/31/2014XX10020142014
1/1/201512/31/2015XX20020152015
1/1/201612/31/2016XX30020162016
8/1/20157/31/2016YY40020152016
8/1/20167/31/2017YY50020162017
8/1/20177/31/2018YY60020172018

 

I am trying to calculate my balance exposure as of a  random date between the start and end date. Let me know if you help me in this

1. I need to create a date dimension so thatIcan pick any date and say how much is the balance of that day 

if I pick 9/1/2016 my exposure is - 300+500

2. I also a need a financial year exposure.Filter all rows with exposure in the year 2016 ( slicer by any year).In this case, the rows will be 3,4,5 as the start and end year can be in 2016 ...

3. Using the slicer( date dimension), I want to select all rows where the eg Like start date > date dimension -30 days or end date < date dimension +30 days

 

Any thoughts .Thanks for your help

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @summerpolice

 

Create below measure. Dim is a calendar table which used as date dimension for users to pick up any date.

Sum balance =
CALCULATE (
SUM ( 'time period'[ Balance] ),
FILTER (
'time period',
AND (
'time period'[Start Date] <= MAXX ( ALLSELECTED ( dim[Date] ), 'dim'[Date] ),
'time period'[ End Date] >= MAXX ( ALLSELECTED ( dim[Date] ), 'dim'[Date] )
)
)
)

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks it helps but i am still running into few issues.

 

If i pick a range of date in "Dim" , how do i identify all the rows in "timeperiod" which fall in the range and get a sum of balance.

The exposure could be as of  a day or for a range of days

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!

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.

Top Solution Authors
Top Kudoed Authors