Forum Discussion
manage table with entry date and exit date
- 5 years ago
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
Hi, matteob
You need to know that the calculated column is calculated when the data is loaded. It won't change with your choice. To filter the data, you need to change the calculated column to measure, and then put it in the filterpane.
measure =
VAR seldata =
SELECTEDVALUE ( calendario[Date] )
VAR datacons = SELECTEDVALUEQuery1[Consegna]
VAR dataarr = SELECTEDVALUEQuery1[Carico]
RETURN
IF ( ( dataarr < seldata && datacons >= seldata ), 1, 0 )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- matteob5 years agoFrequent Visitor
Thanks v-janeyg-msft,
I tried with the measure as you said, but unfortunately the table view is not filtered.- v-janeyg-msft5 years ago
Community Support
matteob ,Have you put it in filter pane?
Like this:
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- matteob5 years agoFrequent Visitor
@v-janeyg-msft, yes, I tried,
but it doesn't work, the measure gives me the table values only with 0