Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to use the variable in the calculated field. I need the Distinct count result based on ID and Data like table
ID | Name | Data | Distinct Count(ID,Name) |
1 | A | KPI | 2 |
1 | A | KPI | 2 |
1 | A | RI | 3 |
1 | A | RI | 3 |
1 | A | RI | 3 |
2 | B | SP | 1 |
2 | B | TS | 1 |
Is there another way to get same result
What is wrong with this one? I mean without knowing the whole problem, it would be difficult to provide you a solution which fits your need
Based on count column I need to create one more conditional column and I have a big table where I need count on diffrent columns like
ID | Name | Data | Distinc Count(ID,Name) | Result |
1 | A | KPI | 2 | if (count =2, Result, else Blank() |
1 | A | KPI | 2 | if (count =2, Result, else Blank() |
1 | A | RI | 3 | if (count =2, Result, else Blank() |
1 | A | RI | 3 | if (count =2, Result, else Blank() |
1 | A | RI | 3 | if (count =2, Result, else Blank() |
2 | B | SP | 1 | if (count =2, Result, else Blank() |
2 | B | TS | 1 | if (count =2, Result, else Blank() |
May be use two left joins....
Left Join (TableName)
LOAD ID,
Name,
Data,
Count(ID) as Count
Resident TableName
Group By ID, Name, Data;
Left Join (TableName)
LOAD ID,
Name,
Data,
Count as Result
Resident TableName
Where Count = 2;