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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AutyDA
Helper I
Helper I

Calculate column data for a date based upon a slicer

I am new to PowerBI and slowly learning how to advance.

 

I have different financial data for various companies and periods. Based upon a series of slicers (company, dates, quarterly/annual data) this data is filtered. From this filtered data I want to identify the data at the chosen start and end dates. I've added some measures which determine the start and end dates selected by a slicer but don't know how to use this to find the data (revenue for example) on these dates.

 

For example, in the visual shown below the yellow box is reporting on the results of the slicers and I am trying to obtain the revenue on the starting data (2.5m based upon the slicers) and end date (3.5m based upon the slicers) and a comment on this.

 

Here is a link to the sample data I am using - Sampledata.pbix 

 

Any help appreciated.

 

AutyDA_2-1725951853125.png

 

AutyDA_1-1725950772382.png

 

 

AutyDA_0-1725950682573.png

 

 

 

1 ACCEPTED SOLUTION
zenisekd
Super User
Super User

Hi, create these two measures (not columns):

FirstDateRevenue =
CALCULATE (
SUM ( 'Table'[Revenue] ),
'Table'[Date] = MIN ( 'Table'[Date] )
)

LastDateRevenue =
CALCULATE (
SUM ( 'Table'[Revenue] ),
'Table'[Date] = MAX( 'Table'[Date] )
)

View solution in original post

2 REPLIES 2
AutyDA
Helper I
Helper I

Thank you, that worked perfectly!

zenisekd
Super User
Super User

Hi, create these two measures (not columns):

FirstDateRevenue =
CALCULATE (
SUM ( 'Table'[Revenue] ),
'Table'[Date] = MIN ( 'Table'[Date] )
)

LastDateRevenue =
CALCULATE (
SUM ( 'Table'[Revenue] ),
'Table'[Date] = MAX( 'Table'[Date] )
)

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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