Forum Discussion

MarkDenHeijer's avatar
MarkDenHeijer
Frequent Visitor
6 years ago
Solved

M query Selected value

Hi, 

 

I'm rather new to PowerBI. I have searched the community but didn't find a satifying answer there, so I'll give it a shot to see if someone can help me. 

 

I want to achieve the following: 

I have a report with a table on one of the pages. I can drillthrough from there to the next page from there, showing details of the selected record. Because some of the details is large data (base64 strings), I want to call a datasource of type direct query (import is not an option), using the ID of the selected value as input for the query. (table valued sql function) . 

 

The big question is how do I get the selected value and pass in onto the input for my direct query. 

 

Some of my thoughts: 

1: create a hidden table visual which contains only one row at a time, containing the ID value that I need. Use M functions like Table.First / Record.Field to get the selected value. But I can't figure out the right syntax.

2: Set a parameter based on the selection and use that parameter in the direct query. But setting a parameter with the selected value doesn't seem to be possible???

 

If anyone has a brilliant idea to get this to work, please let me know how to do this. 

 

Thanx in advance!

 

kind regards, Mark

1 Reply