Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a Pivot chart item with expression as
Count
(DISTINCT{$<Flag={1},Arrears_new={'Yes','No'}>}[Estate Code])
I need to see the result as 1 instead of 'Yes' and 0 instead of 'No'. could anyone help me how to change this in Pivot chart.
Thanks
If you mean that the count() function returns only 2 values (1 or 0), so, as I understand, it's possible only when you have only 1 [Estate Code] per Arrears_New.
If I'm right, I recommend to use such expression: Only(Arrears_New) (instead of count() function).
Or you could use a dirty approach like this: if (count(....) = 0, 'No', 'Yes')
Not sure if you are asking for this:
Count(DISTINCT{$<Flag={1},Arrears_new={1,0}>}[Estate Code])
If not this, please explain a bit more.
if(<your current expression> ='Yes',1,0)
Amelia, could yu specify what you have in demensions?
anyway, I can't understand how do you get Yes and No as a result of Count() function. As I understand, this expression return a numbers of [Estate Code].
What do you try to achieve?
This current expression can't return Yes or No . It will return a number...
Hi,
Create one more flag in script as if(Arrears_New='Yes',1,if(Arrears_New='No',0)) as Arrears_New
And then use count(DISTINCT{$<Flag={1},Arrears_new={1,0}>}[Estate Code])
Regards,
Khadeer
I need to get instead of 1 Yes and instead of 0 No
If you mean that the count() function returns only 2 values (1 or 0), so, as I understand, it's possible only when you have only 1 [Estate Code] per Arrears_New.
If I'm right, I recommend to use such expression: Only(Arrears_New) (instead of count() function).
Or you could use a dirty approach like this: if (count(....) = 0, 'No', 'Yes')
Thanks Anatoly, It's working.