1 Reply Latest reply on Aug 22, 2018 8:55 PM by Ankit Bansal

# Tableau LOD calculation

How to solve this calculation in Tableau. Can some one please guide me how to work on it.

each ID has different charts and each chart has different codes. I need to Calculate three columns based on the given conditions.

* Column 1 - Total User Charts - Based on ID need to show how many charts went to each user level

conditions for this column - If user1 status =user2 status then count is 0 else  1, if user1 status =user 3 status then 0 else 1,

while comparing with user1 and user2 if user 2 is null then check with user 3 if user2 and user3 are null then 'N/A', No comparison between user2 and user3 status.

*Column 2 - Total errors in chart - Count of charts with errors based on user status

"Except delete code status all user status follow this rule" -

If user1 status =user2 status =user3 status then error count is zero.

user1 status= user2 then error count is Zero, user1=user2 but <>user3 then error count is 1, user1<>user2=user3 then error count is 1

When ever 'delete code' status come in to picture then comparison has to made between user1, user2  and user3 and then need to compare with second status existing below this 'delete code' status.

In first case both users are <> user3 so total error chart count is 1 and total error code count is 2,

In Second case all three users have delete code but second status  is not same so total chart error is 1 and total error code count is 1

user1 status

user2 status

user3 status

delete codedelete codeDelete
delete codedelete codedelete code

*Column 3 - Total errors in code - Count of codes with errors based on user status

If user1 status =user2 status =user3 status then error count is zero.

user1 status= user2 then error count is Zero, user1=user2 but <>user3 then error count is 1, user1<>user2=user3 then error count is 1

In below case total code errors = 2

code user1 status user2 status z684 user3 status z794 delete delete delete auto code add z682 confirm confirm confirm auto code add

Sunny,