Please i need help
I have column in my data base which have some repeated attributes as column base i want to count number of repeated attributes in the same column
for example i have column name “Code” which contain many codes
thanks darcoli for fast reponse i tried countover function as you recommended but it gives me blank value in the new calculated field!! note: Code column is string type is this the problem?
I have another issue if you can support me
i have 2 tables that i should connect together to get my analysis
first table is constructed according to each order “Order_id” column so each row has a unique Order_id number and other columns containe order details like revenue, refund etc…
the second table is constructed according to each order view “Views” column per time and date so each row represent view record details for each Order_id
when i connect 2 tables together the revenue, refund amount is multiplied and explored according to “Views” column in second table so the revenue and refund amount give errors data… do you have any idea to connect two tables without make error of Order_id data like revenue and refund amount…
For example in excel i can make sumif number of views for each Order_id without affecting first table “Main table”…
note" database is SQL and the developer can’t fix it from SQL tables
If I understand correctly, the main issue here is that you have a dimension table that also contains aggregated data and then you are joining this with a metrics table. Each aggregated value will be repeated for each row in the metric table so the final sum of values will be the multiple of the original value by the number of rows in the second table.
Typically I would say you need to redeisgn the underlying table but since you mentioned that is not possible, you can use this workaround to get the correct number of views in the analysis:
Add a calculated field views_first in the analysis:
Table 1 include all store deals codes
Table 2 include all orders generated
2 tables is connected together through column Deal_Code_id
in my analysis phase i can only see deal codes that have orders generated in table 2. but i can’t see all deals created in Table 1 if there is no orders in Table 2… How can i display all Deal codes even there is no orders to these deals
Question 1
You need to change that join from a Right join to a Left join to include all Deals even those without a matching order. You may also consider using a Full other join if you want to include non-matching rows from both tables