Forum Discussion

Jiangmei_wu's avatar
Jiangmei_wu
Frequent Visitor
3 years ago
Solved

Occurrence Issue

Hello, The occurrence dax below can get the correct results with small test sample generated from real date, but when it's with real data, the resuts are incorrect. do you know why?   1 time = V...
  • Jiangmei_wu's avatar
    Jiangmei_wu
    2 years ago

    Hi Neeco, please discard the request above. I found a solution as below. Thanks, Mei

     
    Names_occurred_3 =
    DIVIDE(
        CALCULATE(
        COUNTROWS('Raw Data'),
        FILTER(
            'Raw Data',
            not(ISBLANK('Raw Data'[Name])) &&
            COUNTROWS(
                FILTER(
                    'Raw Data',
                    'Raw Data'[Name] = EARLIER('Raw Data'[Name])
                )
            ) = 3
        )
    ), 3
    )