Forum Discussion
Anonymous
6 years agoNot applicable
Search same value in same table between two dates
I have one table which has my products. For each product finds if it was listed in a specific month in the past (the minimun of the date range, here lets say [oct, nov,dec,jan] with min = oct an...
- Anonymous6 years ago
amitchandak Thank you very much.
It works as expected. Really thank you! this saves long hours of work
amitchandak
6 years agoSuper User
I converted month into date to work with
Measure =
var _min = minx(all(Sheet1),Sheet1[Date])
var _max = maxx(all(Sheet1),Sheet1[Date])
var _before = CALCULATE(max(Sheet1[price]),filter((Sheet1),Sheet1[Date]=_min))
var _after = CALCULATE(max(Sheet1[price]),filter((Sheet1),Sheet1[Date]=_max))
Return
//maxx(VALUES(Sheet1[Productid]),_before & " "& _after)
if(ISBLANK(_after),-50,if(not(ISBLANK(_before)),100,50))
You can use first or last date of month
link: https://www.dropbox.com/s/kvazja8tnzqzq6a/samevalue.pbix?dl=0
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
- Anonymous6 years agoNot applicable
amitchandak Thank you very much.
It works as expected. Really thank you! this saves long hours of work