Forum Discussion
RRaj_293
Helper III
3 years agoDax Help - Min and Max
Hi , Scenario- I have a Line Table (A in below pic) which has different orders and their lines for which certain number of days field is calculated. It has negative and positive numbers. The var...
- 3 years ago
RRaj_293 try this measure: but you have to turn on show items with no data because when you are returning BLANK () where the
No of Days Measure = VAR __MaxDays = MAXX ( Orders, [No of Days] ) VAR __MinDays = MINX ( Orders, [No of Days] ) VAR __CountBlank = COUNTROWS ( FILTER ( Orders, ISBLANK ( [No of Days] ) ) ) RETURN IF ( __CountBlank >= 1, BLANK (), IF ( __MinDays < 0, __MinDays, __MaxDays ) )Tweak the above measure as you see fit, as I didn't understand the full logic.
order has a blank number of days by default any visual will suppress that rows:
lbendlin
Super User
3 years ago
Slightly refactored:
Order level =
var mxx = maxx('Table',[No of Days])
return if (mxx<0,minx('Table',[No of Days]),mxx)