Forum Discussion
Dax Help - Min and Max
- 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 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_2933 years ago
Helper III
Thanks parry2k . I tried this and logically looks right to me as well but not sure why the records are all blank. I have enabled 'show items with No data'. If I remove the blank count and just do Min , Max it works except for blank scenarios.
if((SELECTEDVALUE('Line'[NoOfDays]))<=0, Min('Line'[NoOfDays]), MAX('Line'[NoOfDays])),