Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text box - set analysis to 2decimal places

Hi

Hoping someone can help me please!

I have a text box in a dashboard which uses some set analysis to calculate a %, set analysis is below but i have removed a lot of the conditions to make it easier to read:

=num(Count(DISTINCT{<
[Field1]={0}
>}
Case_Dimension_ID),0.0)

/

num(Count(DISTINCT{<
[Field1]={0}
>}
Case_Dimension_ID)
+
COUNT(DISTINCT{<
[Field1]={0}
>}
Case_Dimension_ID)
+

COUNT(DISTINCT{<
[Field1]={0}
>}
Case_Dimension_ID)
+

COUNT(DISTINCT{<
[Field1]={0}
>}
Case_Dimension_ID),0.0)

*round(100,0.01)

My issue is that the result is currently to about 10 decimal places, i only want two though. When i copy the part above the division symbol into a new text box its fine and displays to 2dp, i get the same result when i copy the part below the division symbol into its own text box however, string them both together and it doesnt seem to recognise that i only want 2dp.

I have tried to tweak where abouts i have the num and round functions, wrapping all of the above in one num function doesnt create the right result, basically i need to divide the value above the division sign by the total of the three sums below the division sign.

Any help will be greatly appreciated!

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi Ashley,

You can put your above expression in another num function as shown below

Do not bother what are you processing in expression, how your number finally should look matters

=num(

(your_expression)

,'###.##')

Thanks,

Prakash

View solution in original post

3 Replies
Not applicable
Author

Hi Ashley,

You can put your above expression in another num function as shown below

Do not bother what are you processing in expression, how your number finally should look matters

=num(

(your_expression)

,'###.##')

Thanks,

Prakash

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=num(Count(DISTINCT{<[Field1]={0}>}Case_Dimension_ID)

/

(Count(DISTINCT{<

[Field1]={0}

>}Case_Dimension_ID)

+

COUNT(DISTINCT{<

[Field1]={0}

>}Case_Dimension_ID)

+

COUNT(DISTINCT{<

[Field1]={0}

>}Case_Dimension_ID)

+

COUNT(DISTINCT{<

[Field1]={0}

>}Case_Dimension_ID)), '#,##0.00')

Regards,

Jagan.

Not applicable
Author

Perfect answer, probably the only thing i didn't think to try.

Thank you