Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I think this part of your solution will cause an error when you try to compare a number to text using the "equals" comparison? IE one or the other of these could cause an error
_Calculation = 0, "-",
_Calculation = "","-",
Therefore I think it is simpler to just use coalesce to resolve blanks to zeros. I also eliminated the "empty string" option entirely because it was not mentioned by @zraopingm .
Measure_Name =
Glad to have been able to help @zraopingm. I would try @kpost's solution first before moving onto mine - I think it is the better one.
Proud to be a Super User! | |
Hello,
I tried both, COALESCE works perfect( see below), and yes, switch gave me the calssic error.
thank you
Zoey
Thank you all for the great suggestions! I am going to try them on desktop. Meanwhile, I was able to solve the issue via power pivot after some effort, that is where my final destination.
But I am definitely going to try all of the suggestions you kindly provided to me. I will let you know in one or two days. Thank you kindly again Zoey
Hello,
One solution you can consider is using a SWITCH function, like so:
Measure =
VAR _Calculation = [Calculation]
RETURN
SWITCH(TRUE(),
_Calculation = 0, "-",
_Calculation = "","-",
ISBLANK(_Calculation),"-",
_Calculation
)
Proud to be a Super User! | |
I think this part of your solution will cause an error when you try to compare a number to text using the "equals" comparison? IE one or the other of these could cause an error
_Calculation = 0, "-",
_Calculation = "","-",
Therefore I think it is simpler to just use coalesce to resolve blanks to zeros. I also eliminated the "empty string" option entirely because it was not mentioned by @zraopingm .
Measure_Name =
User | Count |
---|---|
85 | |
80 | |
77 | |
49 | |
41 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |