The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hii,
I am connecting two Tables Customer (StoreID) and Store(BusinessEntityID) --
I need to create a IF Measure using Columns from both the Tables like this --
Columns from Different Tables (IF) =
IF(SELECTEDVALUE(Store[Name]) = "A Bike Store" && SELECTEDVALUE(Customer[StoreID]) = 934,"Working","Not Working")
but while using this in a Table visual , values are duplicating and the attributes are not filtering as expected
Before --
After Adding that Measure --
How to resolve this?
Solved! Go to Solution.
After my testing, you can put the BusinessEntityID field in place of the StoreID field in the visualization if you wish.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
How do I extract data from another table that matches one or more columns?
You can import the table and then use Merge or Append queries in Power Query, the "Merge queries" is to merge the columns of the tables together, and the "Append queries" is to add the row data.
For more details, you can read related document link:
Merge queries overview - Power Query | Microsoft Learn
Append queries - Power Query | Microsoft Learn
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Is this possible through a measure
Does the method I provide work for you? If you have any further questions, please feel free to ask me.
Best Regards,
Yulia Xu
After my testing, you can put the BusinessEntityID field in place of the StoreID field in the visualization if you wish.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The following steps are for your reference:
sample:
Merge two tables in Power Query
Expand the table
Close & Apply
Create a measure as follows:
Measure = IF(MAX([Name]) = "A Bike Store" && MAX([Customer.StoreID]) = 934, "Working", "Not Working")
Final Output:
If there are still questions, please feel free to ask me.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
We don't want to merge as data is huge
Will consider this as the last option
Hi,
Try below.
Columns from Different Tables (IF) =
VAR SelectedStoreName = SELECTEDVALUE ( Store[Name] )
VAR SelectedStoreID = SELECTEDVALUE ( Customer[StoreID] )
RETURN
IF (SelectedStoreName = "A Bike Store" && SelectedStoreID = 934, "Working", "Not Working")
Same thing , values are duplicating
hey, try to use switch function. Might you'll get correct answer.
Hi @Prarabdha_07
As per your measure if the condition is satisfied then working is displaying where condition is not satisfying showing Not working.
Can you share the expected output by typing into excel like Input and output also?
or share the screenshot of your expected output. would be better for us to quickly solve your problem.
this is expected --
Measure is actually duplicating the values
What do you like to resolve? The outcome matches your request exactly.
No , Store id is duplicating
Do you want to suppress blank stores and "Not Working" rows where a "Working" row also exists?
I remove the blanks from both the tables
And I want this output
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |