Forum Discussion
Anonymous
9 years agoNot applicable
DAX Calculate help
Hi, I am wanting to use the following DAX code to retreive Values based on INET titles. However it is returning nothing... Have I formulated the DAX correctly? Thanks. PrintDigital = ...
mattbrice
Solution Sage
9 years agoFirst comment is if you use the "IN" operator, code is a bit easier to read:
PrintDigital =
CALCULATE (
[NoOfAds],
titles[mediatype] = "INET",
NOT ( userDefs[adoper] IN { "BA430", "CA148", "HX355", "MD301" } ),
titles[ttlcode] IN { "WCNE", "WHEX", "WNST", "WNWE", "WTST", "WWHA" }
)Second comment is keep in mind the individual setfilter arguments to CALCULATE are "AND" together. Your filters together read Return [NoOfAd] where mediatype = INET and adoper not one of the values listed and ttlcode is one of the values you listed. If all need to be true, you may be filtering out all the values in table.