Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I have the following code
Conditions_Legend = var X = SUMMARIZE(fact,fact[country],fact[WeekText],"MIN", RANDBETWEEN(1,40)+0) var Min_Country = MINX(X,[MIN]) return Min_Country
Which applied to a matrix with WeekText as row headers and Country as Column Header produces the following:
For Japan is NULL because for that specific week it does not hold data and my objective is when I take the country dimension from the matrix header, that the minimum retrieved to be 0 due to Japan.
Unfortunately, when I take the country dimension of the Matrix, it does not recognize the null value as 0 and so puts the minimum number value, which is 5
I have played around with if statement to convert null to zero, but I end up having the same result.
Any ideas on how not to ignore the null value in the condition above?
Thanks!
Ps: I used random values and added a 0 to try and force a 0 to appear instead of null
Solved! Go to Solution.
I have actually used the following approach and did what the trick:
I would use IF(ISBLANK()) here.
Something along the lines of
var Min_Country = IF(ISBLANK(MINX(X,[MIN])),0,MINX(X,[MIN]))
If it's blank, you give it a default value of zero, otherwise return the normal value.
I have actually used the following approach and did what the trick:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
107 | |
70 | |
70 | |
43 |
User | Count |
---|---|
148 | |
104 | |
104 | |
89 | |
66 |