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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
torsten_FO
Helper I
Helper I

Select a value from Table with Power Query M

Hi,

I have this Table (Snap_To_DB):

Snapshot_to_DB.png

 

How can I select the Value from Column "Value" at the line "Value_1"?

I need this in Power Query M code.

Thanks...

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @torsten_FO ,

 

You need to further explain what your expected output is (a table, a list or others).

Please try this:

= Table.SelectRows(#"The name of the previous step", each [Data] = "Value_1")[Value]

The original table:

vcgaomsft_0-1665472242505.png

result:

vcgaomsft_1-1665472273973.png

 

Attach the test code for reference:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkvMKU2NN1TSUTI0MFCK1YGJGAFFjFBEjIEixigiIF0mGLpMQSKxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Data = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Data", type text}, {"Value", Int64.Type}}),
    #"test" = Table.SelectRows(#"Changed Type", each [Data] = "Value_1")[Value]
in
    #"test"

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @torsten_FO ,

 

You need to further explain what your expected output is (a table, a list or others).

Please try this:

= Table.SelectRows(#"The name of the previous step", each [Data] = "Value_1")[Value]

The original table:

vcgaomsft_0-1665472242505.png

result:

vcgaomsft_1-1665472273973.png

 

Attach the test code for reference:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkvMKU2NN1TSUTI0MFCK1YGJGAFFjFBEjIEixigiIF0mGLpMQSKxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Data = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Data", type text}, {"Value", Int64.Type}}),
    #"test" = Table.SelectRows(#"Changed Type", each [Data] = "Value_1")[Value]
in
    #"test"

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

AnkitKukreja
Super User
Super User

Hi! @torsten_FO 

 

Can you please share some sample data and desired output? Your problem is not very clear to me.

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
https://topmate.io/ankit_kukreja/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.