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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
equevedo84
Frequent Visitor

Create New Measure that Filters Current Measure to a Specific Year

Need assistance on syntax,  I have a measure Compliance % that exists in a Compliance Data table and has the following syntax:

 

Compliance % = [Compliant Mems]/[Eligible Mems]
 
Now I need to create two more measures that simply take Compliance % measure and filters to 2023 and 2024 from the Date table Year column in order to do YoY side by side comparisons in my visuals.
 
I apologize for lack of sample data as I work with sensitive data but syntax or examples for what I want to create would be greatly appreciated.
1 ACCEPTED SOLUTION
Shivu-2000
Super User
Super User

Hi   

You can create two separate measures that filter the Compliance % measure for 2023 and 2024 using the CALCULATE function in DAX. Assuming your date table is named 'Date' and the year column is 'Year', the syntax would be:

 

Compliance 2023 % = 
CALCULATE( 
    [Compliance %], 
    'Date'[Year] = 2023 
)
Compliance 2024 % = 
CALCULATE( 
    [Compliance %], 
    'Date'[Year] = 2024 
)

Let me know if you need further refinements! 🚀

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Happy to help!

View solution in original post

2 REPLIES 2
Shivu-2000
Super User
Super User

Hi   

You can create two separate measures that filter the Compliance % measure for 2023 and 2024 using the CALCULATE function in DAX. Assuming your date table is named 'Date' and the year column is 'Year', the syntax would be:

 

Compliance 2023 % = 
CALCULATE( 
    [Compliance %], 
    'Date'[Year] = 2023 
)
Compliance 2024 % = 
CALCULATE( 
    [Compliance %], 
    'Date'[Year] = 2024 
)

Let me know if you need further refinements! 🚀

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Happy to help!

Success! Thank you very much, I was overthinking the measure syntax turns out.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.