Forum Discussion
How to filter out zeros/nulls from MINX calculation
I have the below calc, but I want to get the MIN only when it's more than zero, also want to avoid nulls:
MINX(
ALLSELECTED( '1'[Date] ), CALCULATE([Measure1])
)
Can anyone help please ?
2 Replies
- TomMartens
Super User
Hey Anonymous ,
w/o more details about the MEASURE and the data model I have difficulties answering your question.
Consider a pbix that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix to onedrive, google drive, or dropbox and share the link. If you are using Excel to create the sample data and as a source for the pbix, share the xlsx as well.
Explain the expected result based on the day you provide.
Regards,Tom
- AnonymousNot applicable
Hi Anonymous ,
When the minimum value in the filtered date range is less than or equal to zero, then it will output blank, how do you want to output it?
please try:
Measure = VAR _value = MINX(FILTER(ALLSELECTED('1'[Date]),[Measure1]>0),[Measure1]) RETURN IF(ISBLANK(_value),"xxx",_value)Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum