Forum Discussion
DAX - Search & Find question - post per Ruth (youtube)
- Anonymous7 years ago
Hi Aaronjoem ,
Maybe you can try to use following measure formula if it suitable for your requirement:
formula = CALCULATE ( [Total Resource Amount], FILTER ( ALLSELECTED ( OneLink_Report ), OneLink_Report[Ledger] = "ACTUALS" && LEFT ( OneLink_Report[Child Activity], 2 ) = "27" && LEN ( OneLink_Report[Child Activity] ) = 6 ) )Regards,
Xiaoxin Sheng
Here is a copy of my code the long way
CALCULATE([Total Resource Amount],OneLink_Report[Ledger] = "ACTUALS", OneLink_Report[Child Activity] = 275223 || OneLink_Report[Child Activity] = 272000 ||OneLink_Report[Child Activity] = 270533 ||OneLink_Report[Child Activity] = 271000 ||OneLink_Report[Child Activity] = 275119 || OneLink_Report[Child Activity] = 270528 || OneLink_Report[Child Activity] = 274000 || OneLink_Report[Child Activity] = 270500 || OneLink_Report[Child Activity] = 270000 || OneLink_Report[Child Activity] = 275116 || OneLink_Report[Child Activity] = 275000 || OneLink_Report[Child Activity] = 274100 ||OneLink_Report[Child Activity] = 271300)
How can I make it simpler? So far here is what I came up with. Only works 90% still include this number 27000
CALCULATE([Total Resource Amount],OneLink_Report[Ledger] = "ACTUALS", LEFT(SEARCH("27*",OneLink_Report[Child Activity],,0)=1,6))
Hi Aaronjoem ,
Maybe you can try to use following measure formula if it suitable for your requirement:
formula =
CALCULATE (
[Total Resource Amount],
FILTER (
ALLSELECTED ( OneLink_Report ),
OneLink_Report[Ledger] = "ACTUALS"
&& LEFT ( OneLink_Report[Child Activity], 2 ) = "27"
&& LEN ( OneLink_Report[Child Activity] ) = 6
)
)
Regards,
Xiaoxin Sheng