Forum Discussion
How to use calculated columns to get data from Direct Query tables (or any other method)
- 1 year ago
Hi Anonymous,
Create a Disconnected Slicer Table:
Item Match Filter = DATATABLE( "Match Status", STRING, { {"Found"}, {"Not Found"} })Create a Measure to Determine Match Status:
Item Match Status = VAR SelectedStatus = SELECTEDVALUE('Item Match Filter'[Match Status]) RETURN SWITCH( SelectedStatus, "Found", IF( NOT ISBLANK( LOOKUPVALUE( Configuration[Item], Configuration[Item], SELECTEDVALUE(Activity[Item]) )), 1, 0 ), "Not Found", IF( ISBLANK( LOOKUPVALUE( Configuration[Item], Configuration[Item], SELECTEDVALUE(Activity[Item]) ) ), 1, 0), 1)Create a Table visual with the columns Item and Quantity from the Activity table. Apply a visual-level filter using the Item Match Status measure, setting it to 1. Next, add a slicer using 'Item Match Filter'[Match Status] to allow users to filter by "Found" or "Not Found".
I'm Attaching the file for your Reference
Thank you.
Hi Anonymous,
Create a Disconnected Slicer Table:
Item Match Filter = DATATABLE(
"Match Status", STRING,
{
{"Found"},
{"Not Found"}
})
Create a Measure to Determine Match Status:
Item Match Status =
VAR SelectedStatus = SELECTEDVALUE('Item Match Filter'[Match Status])
RETURN
SWITCH(
SelectedStatus,
"Found",
IF(
NOT ISBLANK(
LOOKUPVALUE(
Configuration[Item],
Configuration[Item], SELECTEDVALUE(Activity[Item])
)),
1, 0 ),
"Not Found",
IF(
ISBLANK(
LOOKUPVALUE(
Configuration[Item],
Configuration[Item], SELECTEDVALUE(Activity[Item])
) ),
1, 0),
1)
Create a Table visual with the columns Item and Quantity from the Activity table. Apply a visual-level filter using the Item Match Status measure, setting it to 1. Next, add a slicer using 'Item Match Filter'[Match Status] to allow users to filter by "Found" or "Not Found".
I'm Attaching the file for your Reference
Thank you.
Hi Anonymous,
We haven’t heard from you on the last response and was just checking back to see if your query was answered.
Otherwise, will respond back with the more details and we will try to help .
If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.
Thank you.