Forum Discussion

NantoCaparachin's avatar
NantoCaparachin
Frequent Visitor
3 years ago
Solved

CREATE A DINAMIC CALCULATED MEASURE

Hi everyone!    I have a table like this:    I want to create a dynamic calculated measure, that counts the number of customers who bought for the first time, based on the filters applied on "Id_...
  • FreemanZ's avatar
    3 years ago

    hi NantoCaparachin 

    not sure if i fully get you, you may try to plot a card visual with a measure like:

    Measure = 
    VAR _table =
    ADDCOLUMNS(
        VALUES(Tb_Table[Id_Client]) ,
        "Date",
        CALCULATE(MIN(Tb_Table[Sales Date]))
    )
    VAR _table2 =
    ADDCOLUMNS(
        _table,
        "ID_Product",
        CALCULATE(MIN(Tb_Table[ID_Product]))
    )
    RETURN
    COUNTROWS(DISTINCT(_table2))

    it worked like: