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
DAXhelpAcc
Frequent Visitor

Filtering by rows instead of colums with DAX

Is there any way to filter rows in power BI? And is there any way to pick a certain row(lets say i need the 3rd row of a table only)? Also wanted to ask whether it is possible to filter by rows like you can filter by columns.

 

Situation:

1. I have a table from excel that looks like this:

powerBI1.PNG

 What i have to do is to check whether one of the users on the date needed (dates start from the 7th column) have a value 1, 2 or null when i get one of the values (1,2,null) i have to go to the next table:

PowerBi2.PNG

And in the column "Vacation" I have to insert a value Yes No (based on wherether i get 1,2 or null).

So i don't really know how i can get the value when i have to check the dates which are in the 1st row and the users which are in the 1st column.

Thanks in advance.

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @DAXhelpAcc,

 

You can create a measure to check whether a person has a break that returns 1 or 0. Then, you can add this measure to visual level filter and specify its value, so that the visual will be filtered based on specific rule on row level.

 

Besides, it would be better to share smaple data and show us desired result.

 

Regards,

Yuliana Gu

 

 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

First, sample data would help. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, you would need to add an index in your query to be able to pull out specific rows. I'm not sure that I understand your question around filtering by rows though, the scenario that you are presenting seems easily an application of filtering based upon information in columns.


@ 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...

Kind of hard to ask the question when i don't even know how to aproach this problem. But i tried to make ir more detailed thank you for the information. Can you explain about the index? how does it work?

Hi @DAXhelpAcc,

 

The source table from Excel is not readable and editable after being imported into desktop. Please adjust the table structure in source file, similar to below.

 

From

1.PNG

 

To

2.PNG

 

In Power BI desktop, please refer to below steps applied in Query Editor mode.

Prompt headers.

3.PNG

 

Replace null with number 0 or any other numerical value for those columns after Column7.

5.PNG

 

Select all columns from Column7, click unpivot columns.

4.PNG

 

Add a conditional column.

6.PNG

 

Save all above changes, and return back to Data View mode. For "And in the column "Vacation" I have to insert a value Yes No (based on wherether i get 1,2 or null).", please use LOOKUPVALUE function.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.