Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filtering as SQL in PowerBI

Hello,

I have an SQL query and I'm creating a report from this query. 

I want to create similar report in PowerBI, and I'm uploading the views which I used in SQL query and trying to create relations like joins. And also I want to apply where conditions on PowerBI as filter. Bu the record counts don't match between SQL and PowerBI.

Can I create filters like in sql where conditions? And do you have any suggestions about the model creation. In model creation I'm trying to set the model like my left outer joins in the PowerBI. 

Thanks. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Dear @dax  my problem is solved. It was because of the sql query. 

Thank you very much.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , this is a too broad question. Can you share a specific examples and issue?

 

You can create left join by having +0 in a measure

Measure = Sum(Table[Col]) +0

Or using this option

ShowItemwithoutdata.JPG

 

in case you need new table

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

Anonymous
Not applicable

Dear @amitchandak  thanks for your answer.

Actually I have two main questions. First one is I want to create a PowerBI model with my tables and I want to filter them. In my SQL query they are related to each others with Left join. In your examples I think there is no PowerBI model. Is that right? Is it possible to establish a data model in PowerBI as SQL joins?

The second question is about filtering logic. In SQL, I'm using where conditions and these conditions are related to each others with AND operator. Is it possible to build this structure in PowerBI?

For example:

Where

xxx=1

and

yyy=2

and

zzz=3

and

www='test'

dax
Community Support
Community Support

Hi @Anonymous , 

I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data )? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Dear @dax  my problem is solved. It was because of the sql query. 

Thank you very much.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.