Forum Discussion

bapt69's avatar
bapt69
Helper I
3 years ago
Solved

Related with sorted agregated table

Hello everyone, I don't know which subject I have to write...   I got a table with my customers (with client_id) :   and a table with the historic (with client_id -> active relationship wi...
  • bapt69's avatar
    bapt69
    3 years ago

    Sorry, I fixed it...

    I got a table with my status and a level for each one.

     

    So, I create a measure that get the max level status :

    Max_statut = CALCULATE(
       MAX(d_client_histo[Niveau_statut]),
            FILTER(d_client_histo,
            d_client[client_id]=d_client_histo[client_id]
            &&d_client_histo[date_fin]>=(TODAY()-365)))

     

    Then, I created a measure that check this max to fill the good type_status :

    Type_statut = IF(
    d_client[Max_statut]=100,"CLUB",IF(d_client[Max_statut]>100,"VIP",IF(d_client[Max_statut]<100,"Anonyme","")))

     

    Thank you for your answer and your help!!

    Baptiste