Forum Discussion
Date when value is negative
- 6 years ago
Hi iiomarioii,
Try add filter to the formula.
positive = IF ( 'Gesamt2'[Date] = CALCULATE ( MAX ( 'Date'[Date] ), FILTER ( ALLEXCEPT ( Tablle1, 'Tablle1'[Artikelnummer] ), [total] >= 0 ) ), 'Gesamt2'[Date], BLANK () )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
iiomarioii - Seems like you want a variation on Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
- iiomarioii6 years ago
Helper II
Thank you!
I tried to implement the formula "Loopup min" but unfortunately I am not able to do it that way because my Quantity column is a measure. It's not part of table 1
- Greg_Deckler6 years ago
Community Champion
iiomarioii - Right, so what you will need to do is to use SUMMARIZE or ADDCOLUMNS or a combination of the two to recreate your table as a variable within your DAX code. You can then FILTER across that table to find the rows where your measure is greater than zero. Then you get the MINX of that. Some examples of how to do it can be found here:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Days-of-Supply/m-p/635656#M318
https://community.powerbi.com/t5/Quick-Measures-Gallery/TRIMMEAN/m-p/1074075#M504
https://community.powerbi.com/t5/Quick-Measures-Gallery/While-Loop/m-p/637535#M320