Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have two columns "Company A products" and "Company B products". Now I want to create a "Results" column which contains only those "Company A products" that are also present in "Company B products". I was tring to do it using CONTAINSROW function but I'm using direct query mode so CONTAINSROW function is not supported. Can anyone guide me how can I achieve this in power BI Direct query mode. I have attached a screenshot for better understanding of my requirement.
Thanks
Solved! Go to Solution.
Hi @Simran-Fathima ,
The use of calculated columns in DQ mode has many limitations and it is recommended to use measure to solve this problem.
Measure =
VAR _a =
MAX('Table'[Company A Products])
VAR _result =
CALCULATE(
COUNT('Table'[Company B Products]),
FILTER(
ALL('Table'),
'Table'[Company B Products]=_a
)
)
RETURN
_result
DirectQuery in Analysis Services 2016 - SQLBI
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
I didnt get the desired output. And in the filter also I'm unable to change it to "is not blank". Can u help me out. I'm sharing the screenshot of what i got
User | Count |
---|---|
98 | |
91 | |
84 | |
72 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |