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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rmcgrath
Helper I
Helper I

Need help with a measure

Hello.  I have two measures:  one measure returns the RecordPeriod (RecPD) from a slicer (only one period can be chosen).  The other measure extracts the year from that slicer value.  For example, say the user selects "202402" as the RecPd.  The Year Extract measure would return "2024".

 

How can I sum up a "Net" column of values depending on what the user chooses for the RecPD?  This is for a balance sheet and needs to be cumulative.  For example, using the above sample of 202402, the "Net" total would include "Net" values from 202400, 202401 and 202402.  Here is what I tried, but it did not work:

sample.jpg

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rmcgrath , Seem like [RecPd Selection] is measure. Use filter function

 

calculate(Sum(RawGLData[Net]), filter(dimDate, dimDate[Period] >= ([Year Extract] & 00) && dimDate[Period] <= [RecPd Selection] ))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@rmcgrath , Seem like [RecPd Selection] is measure. Use filter function

 

calculate(Sum(RawGLData[Net]), filter(dimDate, dimDate[Period] >= ([Year Extract] & 00) && dimDate[Period] <= [RecPd Selection] ))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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