Forum Discussion
InsightSeeker
2 years agoHelper III
Need help with measure
I have got tables through between which I need to create a measure to get the desired results. Conditional Logic: The IF statement checks if: Table 1 Customer equals Table 2 Customer Table 1...
- 2 years ago
Hi,
Please check the below picture and the attached pbix file.
Thank you.
Expected result measure = VAR _customerselect = SELECTEDVALUE('Table 2'[Customer]) VAR _statusselect = SELECTEDVALUE('Table 2'[Status]) VAR _type = SUMMARIZE ( FILTER ( 'Table 1', 'Table 1'[Customer] = _customerselect && 'Table 1'[Tool] = "Yes" ), 'Table 1'[Type] ) VAR _condition = _statusselect = "Online" RETURN IF ( _condition, _type )
Jihwan_Kim
2 years agoSuper User
Hi,
I am not sure if I uderstood your question correctly, but if you want to create calculated column, please try something like below.
Please check the below picture and the attached pbix file.
Expected result calculated column =
VAR _type =
SUMMARIZE (
FILTER (
'Table 1',
'Table 1'[Customer] = 'Table 2'[Customer]
&& 'Table 1'[Tool] = "Yes"
),
'Table 1'[Type]
)
VAR _condition = 'Table 2'[Status] = "Online"
RETURN
IF ( _condition, _type )
- InsightSeeker2 years agoHelper III
Hi Jihwan_Kim - The result you obtained is what I need. Instead of a calculated column, can I achieve this through a measure?
- Jihwan_Kim2 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
Thank you.
Expected result measure = VAR _customerselect = SELECTEDVALUE('Table 2'[Customer]) VAR _statusselect = SELECTEDVALUE('Table 2'[Status]) VAR _type = SUMMARIZE ( FILTER ( 'Table 1', 'Table 1'[Customer] = _customerselect && 'Table 1'[Tool] = "Yes" ), 'Table 1'[Type] ) VAR _condition = _statusselect = "Online" RETURN IF ( _condition, _type )