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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Jeni2608
Frequent Visitor

create power BI report based on OR condition on multiple dimensions columns

Hi,

i want to create a Power BI report which shows as below, how can i apply a OR condition on multiple dimensions while creating the report.

select EMP_NAME,DEPT_NAME,LOCATION,SALARY from EMPLOYEES a,

DEPT b,

LOCATION C

where <JON the tables>

and (DEPT_ID = 20 or LOCATION='USA')

2 REPLIES 2
Jeni2608
Frequent Visitor

Thx Greg, i will try this out.

Greg_Deckler
Super User
Super User

@Jeni2608 Depends. In DAX, you could use SELECTCOLUMNS, NATURALINNERJOIN and FILTER. So you could create three table VAR's, one for Employees, one for DEPT (FILTER('DEPT',[DEPT_ID=20)) and one for LOCATION (FILTER('LOCATION', [LOCATION] = "USA"). Use SELECTCOLUMNS to pull just the rows you need and then NATURALINNERJOIN to join them together. 

 

In Power Query, similar approach, three queries, filter them and select the columns you want and then use Merge query steps to merge them together.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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