Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Same Assets with different Class

Hi team,

need help to get the Result column.

Here the requirement is, Multiple AstDep can associated with only single Asset class.
For Example, {A=Fan,Pen}. Here Fan amd Pen is only for Aset class of A. and they should not be used for Other Asset class
       if Fan or pen used for Other Asset class is then the result is "Anamoly".
Asset class:- A  and having Ast de{Fan, Pen} with their Cocd:{i,h}

 

Siva554_0-1634881192626.png

 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi there. If I understood correctly, then Fan and Pen are ANAmoly.

You can build a DAX Column like this:

Result = 
VAR __dep = 'Table'[Dep] // current row value
VAR __class_by_dep = // number of classes by current dep in the whole table
CALCULATE(
    DISTINCTCOUNT('Table'[Class])
    , 'Table'[Dep] = __dep
    , REMOVEFILTERS('Table')
)
RETURN
IF (__class_by_dep = 1 , "Not An", "ANAmoly")
// If the current Dep has more than 1 class asign in the whole table, then ANAmoly

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi there. If I understood correctly, then Fan and Pen are ANAmoly.

You can build a DAX Column like this:

Result = 
VAR __dep = 'Table'[Dep] // current row value
VAR __class_by_dep = // number of classes by current dep in the whole table
CALCULATE(
    DISTINCTCOUNT('Table'[Class])
    , 'Table'[Dep] = __dep
    , REMOVEFILTERS('Table')
)
RETURN
IF (__class_by_dep = 1 , "Not An", "ANAmoly")
// If the current Dep has more than 1 class asign in the whole table, then ANAmoly

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.