Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I want to create a measure that counts the number of rows in a table that contains a value from one column, that is filtered by values from another column.
So, I'd like to know How many Event "A" there are that have Criteria of "A" or "C" - so in this example it would = 2.
Thanks!
Soph
Solved! Go to Solution.
Hi @Anonymous ,
if [#"Criteria "] = "A" and [#"Type of Event"] = "A" or [#"Criteria "] = "C" and [#"Type of Event"] = "A" then 1 else 0
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Thanks Nathaniel!
It's almost working - just this weird error with then and else:
Any ideas? I added "#" before "Seriousness Criteria" but that throws up an "invalid identifier" error
Hi @Anonymous ,
if [#"Criteria "] = "A" and [#"Type of Event"] = "A" or [#"Criteria "] = "C" and [#"Type of Event"] = "A" then 1 else 0
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Thanks Nathaniel!
It's almost working - just this weird error with then and else:
Any ideas? I added "#" before "Seriousness Criteria" but that throws up an "invalid identifier" error
Ignore - it's working now!
Hi @Anonymous ,
IF should be lower case. if
Proud to be a Super User!
hi @Anonymous ,
You can create a column in Power Query and then sum that column in a measure.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Proud to be a Super User!
User | Count |
---|---|
85 | |
77 | |
68 | |
49 | |
41 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |