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:
RRaj_293
Helper III
3 years agoThank you all for responding. I was able to resolve it using below dax-
IF ( (COUNTBLANK( 'Line'[NoOfDays] )>=1 ),BLANK(),IF((SELECTEDVALUE('Line'[NoOfDays]))<=0, MIN('Line',' Line'[NoOfDays]), MAX('Line','Line'[NoOfDays]))),