Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
In SQL (this sample is Snowflake dialect but it could be easily modified for T-SQL) I would do this (although perhaps there is a better way).
select * from adverse_drug_reactions as reports right join (select count(distinct drug) = 1 or count(distinct reaction) = 1 as valid, report_id from adverse_drug_reactions group by report_id having not valid) as valid_reports on reports.report_id = valid_reports.report_id;
I could do the equivilant using the Power Query Editor and "Merge Queries" however I'm wondering if there is a preferable way of doing this in Power BI.
Solved! Go to Solution.
HI @beckyconning ,
I'd like to suggest you expand 'advanced option' on SQL connector and copy your code to t-sql statement to get a merged table instead of getting multiple tables and merge them on power query side.
Regards,
Xiaoxin Sheng
HI @beckyconning ,
I'd like to suggest you expand 'advanced option' on SQL connector and copy your code to t-sql statement to get a merged table instead of getting multiple tables and merge them on power query side.
Regards,
Xiaoxin Sheng
Essentially I want to filter out records assoicated with more than one reaction or more than one drug.
Records assoicated with reports that contain more than one reaction but only a single drug should be included.
Records associated with reports that contain more than one drug but only a single reaction should be included.
Records with a single drug and a single reaction should be included.
Other records should be filtered away.
Each row is a potential reaction to a drug e.g.
REPORT_ID,DRUG,REACTION,DRUG_CHARACTERIZATION_CODE,DRUG_CLASS,DRUG_INDICATION
10004519,OXYCONTIN (NDA 22-272),Osteopenia,1,NULL,OSTEOARTHRITIS
10004519,OXYCONTIN (NDA 22-272),Osteoporosis,1,NULL,OSTEOARTHRITIS
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
121 | |
79 | |
48 | |
38 | |
31 |
User | Count |
---|---|
192 | |
79 | |
70 | |
50 | |
42 |