The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I am trying to create a measure where it comes back with the lowest value which isn't 0.
If the dataset it 0,0,1,4,5,7,8, it should return 1 rather than 0.
I have tried COALESCE function but for some reason it doesn't allow me the select the data column.
Any help is much appreciated.
Thanks,
Solved! Go to Solution.
pls try this
M1= MINX(FILTER(ALL('yourtable'),'yourtable'[Value]>0),'yourtable'[Value])
OR
M1= MINX(FILTER(ALL('yourtable'),'yourtable'[Value]<>0),'yourtable'[Value])
The Coalesce function only gets you the first non-blank value. Since 0 is not blank, it will return 0.
You can try something like
First non-zero = calculate(MIN(table[column]),table[column]>0)
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |