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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Stroopwafels
Regular Visitor

How to create a YTD filter

Hello everyone, 

 

I'm new to Power BI and I need your help with creating a formula for a YTD revenue and to implement this in a filter with a simple "YES YTD" and "NO YTD". 

 

Could anyone please help me with this?

 

Cheers, 

 

 

1 ACCEPTED SOLUTION
Rfranca
Resolver IV
Resolver IV

Hi, @Stroopwafels

 

See if this is what you need ....

1. Values with YTD calculation
2. Clacular value without YTD.
3. Browse through this information filter ...

 

if that's what you need
1. Create a measure with YTD .... [YES_YTD]
2. Create a measurement without YTD .... [NO_YTD]
3. Create an auxiliary table to serve as filters with 'Yes YTD' and 'No YTD' options.

4. Create a media that identifies what you selected

 

Item_Selected = min (TABLEOPCAO [NameOpcao])

5. Create a media to show the selected YTD measurement.

YTD_Selected = IF (
      HASONEVALUE (TABLEOPCAO [NameOpcao]),
           IF ([Item_Selected] = "Yes YTD", [YES_YTD], [NO_YTD]), 0
)


Please try and test using it. And please mark the right answer as answer if your issue has been resolved, otherwise, please feel free to ask if you have any other issue.
 
Best Regards,
Rfranca

View solution in original post

1 REPLY 1
Rfranca
Resolver IV
Resolver IV

Hi, @Stroopwafels

 

See if this is what you need ....

1. Values with YTD calculation
2. Clacular value without YTD.
3. Browse through this information filter ...

 

if that's what you need
1. Create a measure with YTD .... [YES_YTD]
2. Create a measurement without YTD .... [NO_YTD]
3. Create an auxiliary table to serve as filters with 'Yes YTD' and 'No YTD' options.

4. Create a media that identifies what you selected

 

Item_Selected = min (TABLEOPCAO [NameOpcao])

5. Create a media to show the selected YTD measurement.

YTD_Selected = IF (
      HASONEVALUE (TABLEOPCAO [NameOpcao]),
           IF ([Item_Selected] = "Yes YTD", [YES_YTD], [NO_YTD]), 0
)


Please try and test using it. And please mark the right answer as answer if your issue has been resolved, otherwise, please feel free to ask if you have any other issue.
 
Best Regards,
Rfranca

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.