Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

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!

 

 

3 Replies

  • 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. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Ashish_Mathur 

       

      I can work with hard coded fiscal years. 

       

      How would you do it?

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

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