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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
pkoppurapu
Frequent Visitor

How to display selected value on table view in direct query mode?

Usage:

I have table view that has multiple columns where users need to scroll right most to get complete information. I was to display the selected row in a text box or a card with all the column details that I want to display.

 

What I tried: 

I tried to use SELECTVALUE(), MAX(), MIN() and VALUE() in a measure to get all the values of each column. But I am getting an empty result although when I place this measure in the same table that I am retrieving data from each row has combined values.

 

For example:

Measure

(SELECTEDVALUE('Table'[Col1])& " - " & SELECTEDVALUE('Table'[Col2]) & " - " &SELECTEDVALUE(Table'[Col3])& " - " & SELECTEDVALUE(Table'[Col4]))

 

Table   Col1   Col2   Col3  Col4   Measure

   1         a        b        c        d     a - b - c - d

   2         x        y        z        r       x - y - z - r

 

Measure is displayed as empty/Blank in a text box. I've tried MAX(), MIN(), and Value().  ===> Direct Query Mode

Please help me with this issue.

Thanks in advance.

4 REPLIES 4
Anonymous
Not applicable

Hi @pkoppurapu ,

 

For direct query mode, you can't view table data in table view, you can only create calculated column to display the result in table visual or create calculated table with the help of addcolumn function. refer below:

vkongfanfmsft_0-1714368437090.png

vkongfanfmsft_1-1714368467782.png

 

Table =
ADDCOLUMNS (
    Table_1,
    "Result",
        Table_1[Col1] & "-" & Table_1[Col2] & "-" & Table_1[Col3]
)

vkongfanfmsft_2-1714368525026.png

Best Regards,
Adamk Kong

 

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

 

@Anonymous what if I want to display selected row of a table for a user? Like if a row is selected i want to display the whole row into a text box or a card visual. 
calculated column provides the whole column values into a table.

Anonymous
Not applicable

Hi @pkoppurapu ,

 

I replicated your scenario, connecting to a data source in a direct query. Tried the following formula, which displays the results correctly.

vkongfanfmsft_0-1714356037855.png

 

MEASURE =
SELECTEDVALUE ( Table_1[Col1] ) & "-"
    & SELECTEDVALUE ( Table_1[Col2] ) & "-"
    & SELECTEDVALUE ( Table_1[Col3] )
M_ =
MAX ( Table_1[Col1] ) & "-"
    & MAX ( Table_1[Col2] ) & "-"
    & MAX ( Table_1[Col3] )

vkongfanfmsft_1-1714356054266.png

 

Best Regards,
Adamk Kong

 

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

Hey @Anonymous 

I can see the results in the same table of col1 and col2 but not in a text box/new table. Can you try to print these values in a text box/card/new table? I guess you would face the same issue.

Thank you. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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