Forum Discussion

viajero03082's avatar
viajero03082
Regular Visitor
5 years ago
Solved

Data segmentation

Hello everyone šŸ˜€ Q= How can I extract and name the following Alloc? I have a problem with the next data separation   I have to get the different alloc (alloc_2, alloc_3 ....) with the help...
  • Fowmy's avatar
    5 years ago

    viajero03082 

    You can use RANKX to create the sequence. Use the code below for your column. T5 is my table name, you can replace it with yours.

    Allocation = 
    IF(
        [DATE]=BLANK(),
        "0_ALLOC",
        RANKX( FILTER(T5,T5[show_id] = EARLIER(T5[show_id])) , T5[DATE] ,,ASC) & "_ALLOC"
    )