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

# LOD expression

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.

• ###### 1. Re: LOD expression

Thanks,

Shin

1 of 1 people found this helpful
• ###### 2. Re: LOD expression

Thank you Shinichiro Murakami for your kind assistance, it has made me understand better. However i do have some questions regarding the first question's solution you provided, for instance i do not understand the purpose of true and false columns about and the grand total doesn't really make sense to me. I have applied you formula and most of the figures i got are very different. I would like to kindly request if you can explain the concern mentioned.

Thank you very much for your kind help once again. i have also attached my workbook package below for your reference, it is in the Office Supplies sheet.

Kirandeep Singh

• ###### 3. Re: LOD expression

I am sorry I don' quite understand your question, that really depends on how you want to show the results.

true/ False, or g.totals format is just for the purpose of my easiness of data validation.

Could you clarify the expected view with some illustrations.

Thanks,

Shin