Skip to main content

Good morning all,

 

I have this challenge where I have to show the sales for the most recent date within each category. I'm not being able to attach the workbook but it is from the SuperStore sample. Here's the solution:

 

Filter to max date - FIXED not working?

 

So it's just sales by Category and Department, filtered out by the the Most Recent Date, i.e., { FIXED [Category] : MAX([Order Date]) } = [Order Date]

 

But now my question.

If I remove Category out of the view, sales value remains the same, which is supposed to happen, but if I remove Order Date, then the whole LOD thing falls apart. Why is this? If we have FIXED the view to Category, shouldn't it always show the correct values, despite what we have or don't have in the view?

 

Thank you and have a good day,

 

Esther

16 answers
  1. Mar 2, 2017, 3:10 PM

    I think you can get what you are looking for with nested LODs, and no filters: NOTE: I am using 10.1 and it appears that they changed Department>>Category and Category>>Sub-category

     

    Calculation:

    { FIXED [Sub-Category] : SUM(if { FIXED [Sub-Category] : Max([Order Date])} == [Order Date] then [Sales] end)}

     

    AS measure

    I think you can get what you are looking for with nested LODs, and no filters: NOTE: I am using 10.pastedImage_2.png

    Nipun Garg is correct that Fixed keeps the calculation at a higher level of detail even if the view is lower:

    pastedImage_4.png

     

    if you want to show just the list of sales without category on the view: convert the above calculation to a dimension and put it on rows:

    pastedImage_1.pngthe values are in a different order because they are not sorted by sub-category but they are the same values

0/9000