LOD expression tableau calculating avg sales above avg global sales

Today 22/5/2023

This Question is related to Tableau Sample Super Store Dataset:

Q. For each Category, calculate the percentage of manufacturer that have sales above the global average sales.

Eg. global average sales: 228.23

For category furniture, 47 manufacturers are there out of which 40 manufacturers' sales is above the global average sales.

Required outcome:

Category%age of manufacturer above global average sales
Furniture85.11%

to do this by using LOD expression
1. calculating the global avg sales by using fixed:
2. calculating avg sales per manufacturer per regional by using fixed also:
3. making boolean filter which category avg sales>global avg sales:
4. calculating the manufacture total per category:
5. calculating the manufacture:
6. calculating percentage of manufacture category avg sales>global avg sales:
7. adding filter(calculation2) to be true value
adding category as row
add calcualtion4 
add manufacturetotal
add calcualtion1
 
HERE WE GO
8. remove the calculation4 and manufacturetotal from marks



FINISH

Comments

Popular posts from this blog

sorting multiple measure value on tableau, works!

reset many filters with one action click tableau

tableau needs upgrade: control parameter by specific user