Forum Discussion
Anonymous
9 years agoNot applicable
SQL to DAX
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 h...
- 9 years ago
Helllo Anonymous
try with:
Measure= Calculate(Values(Table[Col1]),Filter(Table,Table[Col2]="x" && Table[Col3]="y"))
- 9 years ago
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.:smileyhappy:
Measure = CALCULATE ( FIRSTNONBLANK ( VALUES ( 'TableName'[Col1] ), 1 ), FILTER ( 'TableName', 'TableName'[Col2] = "x" && 'TableName'[Col3] = "y" ) )Regards
Anonymous
9 years agoNot applicable
Alan, can I assign this to a measure?
v-ljerr-msft
9 years agoMicrosoft Employee
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.:smileyhappy:
Measure =
CALCULATE (
FIRSTNONBLANK ( VALUES ( 'TableName'[Col1] ), 1 ),
FILTER ( 'TableName', 'TableName'[Col2] = "x" && 'TableName'[Col3] = "y" )
)Regards