Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi there,
I am looking to create a measure that counts the unique values of column "Batch" if the "Severity" column equals BLANK, Minor, or Event while also excluding the value from the count if the "Severity" column equals Major or Critical. For example based on the table below, the measure should equal 4 because it includes batches A, C, D, H, while excluding batches B and G.
I tried using the formula:
Solved! Go to Solution.
Hi @MikePowerBI
Try this measure:
Measure =
VAR _A =
CALCULATETABLE (
VALUES ( 'Table'[Batch] ),
FILTER ( 'Table', 'Table'[Severity] IN { "", "Minor", "Event" } )
)
VAR _B =
CALCULATETABLE (
VALUES ( 'Table'[Batch] ),
FILTER ( 'Table', 'Table'[Severity] IN { "Major", "Critical" } )
)
VAR _C =
EXCEPT ( _A, _B )
RETURN
COUNTROWS ( _C )
output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @MikePowerBI
Try this measure:
Measure =
VAR _A =
CALCULATETABLE (
VALUES ( 'Table'[Batch] ),
FILTER ( 'Table', 'Table'[Severity] IN { "", "Minor", "Event" } )
)
VAR _B =
CALCULATETABLE (
VALUES ( 'Table'[Batch] ),
FILTER ( 'Table', 'Table'[Severity] IN { "Major", "Critical" } )
)
VAR _C =
EXCEPT ( _A, _B )
RETURN
COUNTROWS ( _C )
output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi VahidDM. This worked great, thank you for your prompt reply!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
60 |
User | Count |
---|---|
197 | |
118 | |
108 | |
78 | |
69 |