Forum Discussion
Inside filter
- 5 years ago
gduobaite
Please try your measure like this:Clicks = var _name = SELECTEDVALUE('table1'[Event Name]) var _table = SUMMARIZE( 'table1', 'table1'[Doctor], 'table1'[Date time], "name", CALCULATE( DISTINCTCOUNT('table1'[Doctor]), 'table1'[Event Name] = _name) ) return SUMX(_table,[name])________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
gduobaite
Please try your measure like this:
Clicks =
var _name = SELECTEDVALUE('table1'[Event Name])
var _table =
SUMMARIZE(
'table1',
'table1'[Doctor],
'table1'[Date time],
"name", CALCULATE( DISTINCTCOUNT('table1'[Doctor]), 'table1'[Event Name] = _name)
)
return
SUMX(_table,[name])
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
- gduobaite5 years agoHelper III
Dear Fowmy ,
can you please show how can I add a second filter into this formula?
Second filter should be from the same table1: 'table1'[Search Result] = "Not found"
Clicks = var _name = SELECTEDVALUE('table1'[Event Name]) var _table = SUMMARIZE( 'table1', 'table1'[Doctor], 'table1'[Date time], "name", CALCULATE( DISTINCTCOUNT('table1'[Doctor]), 'table1'[Event Name] = _name) ) return SUMX(_table,[name])- Fowmy5 years agoSuper User
gduobaite
Please check this:Clicks = var _name = SELECTEDVALUE('table1'[Event Name]) var _table = SUMMARIZE( 'table1', 'table1'[Doctor], 'table1'[Date time], "name", CALCULATE( DISTINCTCOUNT('table1'[Doctor]), 'table1'[Event Name] = _name, 'table1'[Search Result] = "Not found") ) return SUMX(_table,[name])________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂