Forum Discussion

sabedin's avatar
sabedin
Helper I
8 years ago
Solved

Top visited category description

I need help with the attached file. Please download it and see.   I need a calculated column in 'Member_event_facts' table. I need it to show the top visited category name (club_event_groups[naam])...
  • Vvelarde's avatar
    Vvelarde
    8 years ago

    sabedin

     

    Hi, try this:

    Top Visit Category =
    VAR RankingContext =
        VALUES ( Club_event_groups[naam] )
    RETURN
        CALCULATE (
            FIRSTNONBLANK ( Club_event_groups[naam]; Club_event_groups[naam] );
            TOPN ( 1; ALL ( Club_event_groups[naam] ); [Total visits] );
            RankingContext
        )

    Regards

    Victor