Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello everyone.
I need to extract the single value of a cell from a table and showcase it. My initial thoughts are to write a DAX query and assign it to a measure.
However, I'm not sure of how to write the DAX query. The query in SQL will look like this -
SELECT <COL1> FROM <TABLENAME> WHERE <COL2> = 'x' AND <COL3> = 'y' ;
Can someone help me convert this to DAX?
Thanks in advance!
Solved! Go to Solution.
Helllo @Anonymous
try with:
Measure= Calculate(Values(Table[Col1]),Filter(Table,Table[Col2]="x" && Table[Col3]="y"))
Hi @Anonymous,
Have you tried the measure provided by Vvelarde? It should work.
In addition, just in case there may be multiple values returned with the condition of the filter, we can add FIRSTNONBLANK Function (DAX) within the measure in this scenario.![]()
Measure =
CALCULATE (
FIRSTNONBLANK ( VALUES ( 'TableName'[Col1] ), 1 ),
FILTER ( 'TableName', 'TableName'[Col2] = "x" && 'TableName'[Col3] = "y" )
)Regards
Hello @Anonymous,
You can use the FILTER function to achieve this. See below:
EVALUATE
FILTER( VALUES('TableName'[Col1], AND('TableName'[Col2] = "x", 'TableName'[Col3] = "y" ))Hope this helps,
Alan
Alan, can I assign this to a measure?
Hi @Anonymous,
Have you tried the measure provided by Vvelarde? It should work.
In addition, just in case there may be multiple values returned with the condition of the filter, we can add FIRSTNONBLANK Function (DAX) within the measure in this scenario.![]()
Measure =
CALCULATE (
FIRSTNONBLANK ( VALUES ( 'TableName'[Col1] ), 1 ),
FILTER ( 'TableName', 'TableName'[Col2] = "x" && 'TableName'[Col3] = "y" )
)Regards
Helllo @Anonymous
try with:
Measure= Calculate(Values(Table[Col1]),Filter(Table,Table[Col2]="x" && Table[Col3]="y"))
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 38 | |
| 34 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |