Forum Discussion

matteob's avatar
matteob
Frequent Visitor
5 years ago
Solved

manage table with entry date and exit date

Hi, I have a table with a list of material with a unique code with the relative purchase cost. For each row there is an entry date and an exit date. I would like to be able to view a list with the m...
  • PaulDBrown's avatar
    5 years ago

    matteob 

    Create a measure to identify the rows in which the date_in is before the minimum date selected and the out_date is after the maximun date selected using:

     

    Code In Stock = 
    VAR InDate = MIN(calendario[Date])
    Var OutDate = MAX(calendario[Date])
    RETURN 
    COUNTROWS(
        CALCULATETABLE(
                VALUES(Foglio1[code]),
                FILTER(Foglio1,
                Foglio1[date_in] <= InDate &&
                Foglio1[date_out] > OutDate)))

     

    Add this measure to the filter on the visual in the filter pane and set the value to 1.

     

    I've attached the sample PBIX file