Forum Discussion

pwissing29's avatar
pwissing29
Regular Visitor
5 years ago
Solved

Calculating the Inverse

So I have a large dataset. Its made up of 124,000 rows and 55 Columns.  One column in particular is named "Product Family"  In this column there are roughly 26 different Product Families, an example ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi pwissing29 ,

     

    1.Create a separate category table by entering data.

     

    2.Create a measure to count, for example how many rows in the row have names other than "Isilon".

    Count = 
    SWITCH (
        SELECTEDVALUE ( 'Category'[Category] ),
        "Isilon",
            CALCULATE (
                COUNTROWS ( 'Table' ),
                FILTER ( 'Table', [Product Family] <> "Isilon" )
            ),
        "DataDomain",
            CALCULATE (
                COUNTROWS ( 'Table' ),
                FILTER ( 'Table', [Product Family] <> "DataDomain" )
            ),
        "ABC",
            CALCULATE (
                COUNTROWS ( 'Table' ),
                FILTER ( 'Table', [Product Family] <> "ABC" )
            ),
        "BCD",
            CALCULATE (
                COUNTROWS ( 'Table' ),
                FILTER ( 'Table', [Product Family] <> "BCD" )
            )
    )

     

     

    You can check more details from here.

     

     

     

    Best Regards,

    Stephen Tao

     

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