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
james_wood
Frequent Visitor

How do I create a measure for: 'sum all revenues if the year = 2022'

I have close dates for items in a column (see snap below), some of which are in 2022. A separate column has revenues for each item. How do I create a measure that calculates the total revenue for all items that were closed in 2022?: 

james_wood_0-1645720219506.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@james_wood , Measure

calculate(sum(Table[Revenue]), filter(Table, year(Table[Close date]) = 2022))

 

or

 

calculate(sum(Table[Revenue]), filter(Table, year(Table[Close date]) =year(Today()) ))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@james_wood , Measure

calculate(sum(Table[Revenue]), filter(Table, year(Table[Close date]) = 2022))

 

or

 

calculate(sum(Table[Revenue]), filter(Table, year(Table[Close date]) =year(Today()) ))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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