Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is my database
Product | Status |
---|---|
Notebook | Broken |
Notebook | Broken |
Notebook | Broken |
Notebook | Stolen |
Notebook | Borrowed |
Cellphone | Broken |
Cellphone | Broken |
Cellphone | Broken |
Cellphone | Sold |
Cellphone | In used |
I want QV to return in a Textbox
Broken Products = 6
Not Broken Products = 4
I used this as expression
if(Status='Broken', count(Product))
if(Status=<>'Broken', count(Product))
Unfortunetely it is not working. Is there a solution with if expression and set analysis?
Try this:
1) Count({<Status = {'Broken'}>}Product)
2) Count({<Status -= {'Broken'}>}Product) or Count({<Status ={'*'} - {'Broken'}>}Product)
Try this:
1) Count({<Status = {'Broken'}>}Product)
2) Count({<Status -= {'Broken'}>}Product) or Count({<Status ={'*'} - {'Broken'}>}Product)
May be as below:
=Count( {<Status={'Broken'}>}Product)
=Count( {<Status - ={'Broken'}>}Product)
Try this -
='Broken Product = ' & Count({<Status={'Broken'}>}Product) & chr(13) &
'Not Broken Products = ' & Count({<Status-={'Broken'}>}Product)
PFA.
$@M.
Sample attached
Thank you for the solution. Is there a solution with an IF- Expression?
Like this:
1) Count(If(Status = 'Broken', Product))
2) Count(If(Status <> 'Broken', Product))
Updated sample. But I am curious to know why do you want to use if rather than set analysis here? Any specific reason here?
Set expression will give better performance as it works with reduced set of records