Forum Discussion

Sudbrl's avatar
Sudbrl
Frequent Visitor
3 years ago
Solved

CONCATENATEX with count

Dear ALL,   For a report, I want to achieve concat with the count. Please provide a solution on DAX measure for power pivot. Result/Output Name RegionCount Anil A1(2),A2(2) Sunil A1(2...
  • smpa01's avatar
    3 years ago

    Sudbrl  you can do this

    Measure 2 = 
    CONCATENATEX (
        ADDCOLUMNS (
            SUMMARIZE ( 'fact', 'fact'[Name], 'fact'[Region] ),
            "result",
                [Region] & "," & "("
                    & CALCULATE (
                        DISTINCTCOUNT ( 'fact'[Region] ),
                        ALLEXCEPT ( 'fact', 'fact'[Name] )
                    ) & ")"
        ),
        [result],
        ",",
        [Name]
    )