Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi guys,
I' ve imported in power bi desktop by Direct Query a table (MyTable) and I've created a measure (MyMeasure) to get the column value Column2 when I select a table row:
MyMeasure = IF(ISFILTERED(MyTable[Column2]);SELECTEDVALUE(MyTable[Column2]);"No selection")
This measure works fine using Import Mode, while no value is returned by SELECTEDVALUE function in Direct Query mode
Any suggestions? How can I fix this in Direct Query?
Thanks in advance for any hint
Hello @laciodrom_80
Were you able to solve this issue?
I need to get the selected value from a table whose data source = Direct Query.
As you mention, SELECTEDVALUE, MIN or MAX don't work.
@laciodrom_80 you can use other aggregated function like MAX or MIN to get the value instead of SELECTEDVALUE
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k I've tried but no value returned also both with MAX and MIN
MyMeasure = IF(ISFILTERED(MyTable[Column2]);MAX(MyTable[Column2]);"No selection")
@laciodrom_80 not sure why that would be the case. why not just drop a Card Visual and column2 on it (use max) from aggreation and see what result you get. We expect the measure to give the same result .
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Card Visual returns Empty value when I select a table row, No selection when I don't select any row
No selection:
First row selected:
Vuoto is the italian for empty
@laciodrom_80 so i guess measure is doing the same thing, not fully sure what is going on. very hard to explain. I expected it to return 02149 when you selected first row.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@laciodrom_80 hope this helps https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-d...
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k I noticed I have the problem with a sql server on-premises (not installed on my pc), if I try using a sql server on cloud no issue, also using SELECTEDVALUE.
What could be the problem? With Power BI Desktop I don't have to use any gateway, do I ?
User | Count |
---|---|
103 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |