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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.