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 August 31st. Request your voucher.
MyColumn =
VAR1 = ...
VAR2 = ...
VAR3 = ...
VAR4 = ...
I want to get the minimum value of all these variables excluding empty values.
MIN only takes two arguments.
Nesting is boring.
Is there a better way?
Thank you!
Solved! Go to Solution.
Hi @webportal
Yes it can handle that.
Measure =
VAR a = 8
VAR b = BLANK()
VAR c = 21
VAR d = 5
VAR tab = {(a),(b),(c),(d)}
RETURN MINX(tab,[Value])
Regards
Phil
Proud to be a Super User!
Hi @webportal
Define empty! If its an empty string then using MIN won't work as hoped and you mentioned MIN in the qs so assumed we were dealing with numbers.
It will discount BLANK values.
Phil
Proud to be a Super User!
Hi @webportal
Yes it can handle that.
Measure =
VAR a = 8
VAR b = BLANK()
VAR c = 21
VAR d = 5
VAR tab = {(a),(b),(c),(d)}
RETURN MINX(tab,[Value])
Regards
Phil
Proud to be a Super User!
Hi @webportal
Try this
Measure =
VAR a = 3
VAR b = 4
VAR c = 2
VAR d = 5
VAR tab = {(a),(b),(c),(d)}
RETURN MINX(tab,[Value])
Regards
Phil
Proud to be a Super User!
User | Count |
---|---|
75 | |
70 | |
40 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
50 | |
46 |