Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Helllo,
rather than writing out all this in example 1 (which gives correct result), how do I specify the NOT in (i want to count everything in table[sport] column except "09" and "99"
1. this gives right result
my measure =
CALCULATE(count(table[sport]),
table[sport] in {"01","02","03","04","05","06","07","08","10","11","12"},
table[year] = "2017/18")do you know why these three examples below don't work?
2.
test =
CALCULATE(count(table[sport]),
(table[sport]<> "09" &&
table[sport]<> "99"),
table[year] = "2017/18")3.
test2 =
CALCULATE(count(table[sport]),
not(table[sport] in {"09","99"}),
table[year] = "2017/18")4.
test3 =
CALCULATE(count(table[sport]),
table[sport] <> "09",
table[sport] <> "99",
table[year] = "2017/18")Thanks
Hi @adavid999 ,
Can you try this:-
test3 =
CALCULATE (
COUNT ( table[sport] ),
FILTER (
table,
( table[sport] <> "09"
|| table[sport] <> "99" )
&& table[year] = "2017/18"
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@adavid999 , Can you please share your PBIX after removing sensitive data and also the expected output?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@adavid999 You mean like NOT("something" IN 'Table'[Column])
@Greg_Deckler hi there, yes, in this case i want to count everything that is not "09" and not "99" in table[sport] where availabe values are:
"01","02","03","04","05","06","07","08","09","10","11","12","99"
Just lookinf for a better way of writing it as my example 1 above, does the job. Also, I'm not 100% clear on why my other examples don't work.
maybe you can try this
test3 =
CALCULATE(count(table[sport]),
(table[sport] <> "09"||
table[sport] <> "99" &&
table[year] = "2017/18")
Proud to be a Super User!
hi @ryan_mayu no this did not work. Your suggestion...
test3 =
CALCULATE(count(table[sport]),
(table[sport] <> "09"||
table[sport] <> "99" &&
table[year] = "2017/18")gives a different result to this (which gives the result I expect)
my measure =
CALCULATE(count(table[sport]),
table[sport] in {"01","02","03","04","05","06","07","08","10","11","12"},
table[year] = "2017/18")I want to count values that are not "09" or "99" from available values that are:
"01","02","03","04","05","06","07","08","09","10","11","12","99"
grateful for any help with this.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |