Forum Discussion

NicoData1's avatar
NicoData1
New Member
4 years ago
Solved

Identify by cart distinct value

Dear all,   This is my first ever post on a forum so if I don't respect a rule please forgive me πŸ™‚    MY issues is that I have a listing of supplier (identifiy by a unique code) that work with 4...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi NicoData1,

    Can you please share a pbix or some dummy data that keep raw data structure with expected results? It will help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

    In addition, you can also take a look at the following measure formula if helps:

    DC_PCount =
    VAR dcSupplier =
        SELECTCOLUMNS (
            FILTER (
                SUMMARIZE (
                    ALL ( Table ),
                    Table[SupplierCode],
                    "PoleCount", COUNTROWS ( VALUES ( Table[SupplierCode] ) )
                ),
                [PoleCount] = 1
            ),
            "SupplierCode", [SupplierCode]
        )
    VAR currList =
        CALCULATETABLE ( VALUES ( Table[SupplierCode] ), ALLSELECTED ( Table ) )
    RETURN
        COUNTROWS ( INTERSECT ( currList, dcSupplier ) )

    Regards,

    Xiaoxin Sheng