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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
GJA
Helper II
Helper II

Measure - Easiest way to access row context

Hi Everybody, 

 

I would like to know what is the best way to access a value of table with a measure (not a calculated column).

 

for sample : I display this lines :

A

A

B
B

B

C

C

 

I would like to create à measure which is able to calculate anything from from the value of the first column. I often use lastnonblank(['Column1'],1). For the row 1 it would give me "A". But is it the best way ? Which solution do you use ?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@GJA , or something like this

if(max(['Column1']) ="A", 1,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
fhill
Resident Rockstar
Resident Rockstar

Take a look at the "...X" DAX commands for some of the most common commands (COUNTX / COUNTAX / SUMX / AVERAGEX).  These allow for more Row Based logic to be included in the command.  You can do some simular functions with the CALCUALTE(... command also adding Filters into  logic.  I hope this helps get you started...

 

fhill_0-1620063339260.png

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




amitchandak
Super User
Super User

@GJA , or something like this

if(max(['Column1']) ="A", 1,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.