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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I
Helper I

Categorize materials by sales

Hi all,

I'm still learnig the ropes with Power BI and trying to solve this scenario and I'm stuck. The model below contains two fiscal years of data. What I need to do is identify the total sales for materials that have orders in a categorization as follows:

1. If a material has sales only in the prior year - PY

2. If a material has sales only in the current year - CY

3. If a material has sales in both years - Both

4. Neither years - None

I've looked at various ways to do this and I'm stuck. The problem I'm running into is that users want to filter the entire report by PY, CY etc. So, I need to be able to add the 'Material Categorization' to a slicer and/or the legend of a bar chart and I cannot do that with a measure.


Any suggestions would be truly appreciated!




Super User
Super User


I may be able to solve it but my solution will work only for 2 static Fiscal years.  in the next FY, when the current FY becomes the previous FY, then my solution will not work. 

Ashish Mathur

Hi @Ashish_Mathur 


I can work with hard coded fiscal years. 


How would you do it?


i can try but not sure of how successful i will be.  Share the download link of the PBI file.

Ashish Mathur

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors