3 Replies Latest reply on Feb 3, 2019 10:29 PM by Shinichiro Murakami

    LOD expression

    Kirandeep Singh

        Greetings to fellow tableau users, I am new to tableau desktop and tableau in general. I am currently completing my accounting degree course in Malaysia. The reason i am writing this forum is because i am having a tough time understanding LOD expression and applying it in real case scenario. I understand the basic concept of Include, Exclude  and Fixed but i don't understand what is the purpose of the mentioned types of LOD expression in dept. It would be great if someone can explain with clarity, as it will be really helpful to apply in challenging cases.


         However i do have a question which i need help resolving, the question is " A single order can include multiple items across multiple product categories. Each item will be on a different row of the data, but the rows will share a single Order ID. Find the average sales value for orders which include office supplies". My trouble for this question is finding the Average sales for a specific category ( Office Supplies) using LOD expression. I have tried using Fixed LOD formula SUM({Fixed[Order ID]:max(IF[Product Category]="Office Supplies"THEN 1 ELSE END)}*[SALES])/COUNTD(IF[Product Category]="Office Supplies" THEN[OrderID] ELSE NULL END). However the calculation is errored and i can't find other ways either using LOD expression.


         My second question is pertaining this question " How many days in January of 2011 had a positive total profit" this is my last question and the main focus is specific to month of january and and positive profit for the year 2011, which i am struggling to apply. I know it is using Fixed LOD but not sure how to condition it.


          I have attached my workbook package below together with the sample data. I hope to learn more via this platform to enhance my tableau skills and at same time be useful in future to help others.