I am new to Power BI.. I have one issue
two tables,
analyst table:
event id. Name. Time. Date
1865. Lopez. 5.63. 22/07/2022
1867. Stanf. 1.63. 14/08/2022
QC table:
event id. Name. Time. Date
1865. Lopez1. 6.00. 24/07/2022
1867 Stanf. 3.00 14/08/2022
here I am using name from Analyst table in my table visual in power bi desktop and date as a slicer from analyst table as well
now I am looking to show qc time infront of the qc name
Ex: if I do lookupvalue it is showing infront of analyst name
here with lookupvale
for event Id: 1865 ,time 6.00 is showing infront of Lopez but it need to show infront of Lopez1
and user able filter the data based on date as well.
Any suggestions please
Thanks in advance
Solved! Go to Solution.
Hi @Dhruv-123 ,
To show the QC time in front of the QC name, you can use a combination of the LOOKUPVALUE function and a JOIN clause in a calculated column in your Analyst table.
Here's an example of how you can do this:
First, add a calculated column to your Analyst table and name it QC Time.
In the formula for the calculated column, use the LOOKUPVALUE function to retrieve the time from the QC table, using the event id and Name columns from the Analyst table as the lookup values. The formula should look something like this:
QC Time = LOOKUPVALUE(QC[Time], QC[event id], Analyst[event id], QC[Name], Analyst[Name])
Next, you can use the JOIN function to join the Analyst table to the QC table, using the event id column as the join key. The formula should look something like this:
JOIN(Analyst, QC, "event id", "event id")
You can then use the QC Time column in your table visual to show the QC time in front of the QC name.
Note that the JOIN function will only work if there is a one-to-one relationship between the Analyst table and the QC table, meaning that each event id in the Analyst table corresponds to exactly one event id in the QC table. If this is not the case, you may need to use a different approach, such as using a LEFT JOIN or a RIGHT JOIN to handle cases where there are missing values in one of the tables.
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Dhruv-123 ,
To show the QC time in front of the QC name, you can use a combination of the LOOKUPVALUE function and a JOIN clause in a calculated column in your Analyst table.
Here's an example of how you can do this:
First, add a calculated column to your Analyst table and name it QC Time.
In the formula for the calculated column, use the LOOKUPVALUE function to retrieve the time from the QC table, using the event id and Name columns from the Analyst table as the lookup values. The formula should look something like this:
QC Time = LOOKUPVALUE(QC[Time], QC[event id], Analyst[event id], QC[Name], Analyst[Name])
Next, you can use the JOIN function to join the Analyst table to the QC table, using the event id column as the join key. The formula should look something like this:
JOIN(Analyst, QC, "event id", "event id")
You can then use the QC Time column in your table visual to show the QC time in front of the QC name.
Note that the JOIN function will only work if there is a one-to-one relationship between the Analyst table and the QC table, meaning that each event id in the Analyst table corresponds to exactly one event id in the QC table. If this is not the case, you may need to use a different approach, such as using a LEFT JOIN or a RIGHT JOIN to handle cases where there are missing values in one of the tables.
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Your requirement is not at all clear. in the first place, you should create Dim tables for all 4 fields. Next, add another field in each Fact table with the title of Type and have Analyst or QC in each row. Append the two tables. Create a relationship (Many to One and Single) between the 4 fields of the appended table and the 4 dim tables.
Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
138 | |
60 | |
56 | |
56 | |
46 |
User | Count |
---|---|
135 | |
74 | |
57 | |
56 | |
51 |