Forum Discussion
mmace1
Impactful Individual
7 years agoDAX equivalent of SQL's NOT IN?
There's an extremely similar equivalent for SQL's IN - I have no imagination, so an example extremely similar to the last one I actually wrote: Card Sales =
CALCULATE (
[total valid spend],
...
- 7 years ago
Hi mmace1,
You need to place the NOT formula on the column and then use the in to make the level you need.
So you measure should look something like this:
MEASURE NOT IN = CALCULATE ( SUM ( Table1[Value] ); FILTER ( Table1; Table1[Category] = "C" && NOT ( Table1[CAT LEVEL] ) IN { 2; 3 } ) )As you can see below in category C the total is 1500 if you took out the category 2 and 3 it's 1000.
Regarrds,
MFelix
Anonymous
6 years agoNot applicable
I solved this by using excel as a source. Following this method I don't have to work with HTML code in my power query to get all the sheets
https://stackoverflow.com/questions/45945815/how-to-connect-google-sheet-with-power-bi
MFelix
Super User
6 years agoHi Anonymous,
Believe that you have make this answer on the incorrect post. This post has nothing to do with linking to google sheets or excel.