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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

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!

 

Model.png

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

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. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur 

 

I can work with hard coded fiscal years. 

 

How would you do it?

Hi,

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.