Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a straight table with dimension of "$Field" and expression of count() of field named in $Field. Pseudo code for expression would be something like:
=count( ValueOf($Field) )
I've tried:
=count($(='[' & [$Field] & ']'))
but that only works when one $Field value is selected.
Any ideas?
Thanks,
Rob
Ralf & Marcus,
Good solution. I'd like to mark them both correct but only one allowed.
-Rob
Just to attach an example as a show case (integrated in a funny ancient QV app ;-).
Also added $Table as dimension but this seems to be a bit confusing. Key fields always have a count result of all occurances in all tables. But one can play around with dimensions and other expressions to find things.
Ralf, excellent solution!
Hello There,
It has been a long time since this thread is active. But it is usefull to for my reffrence.
My question:
How could we use something like the experssion that was dicussed to count the Blank values within a field Blank =''
Hi Rayana,
this work to count fields with an empty string:
$(=concat('if($Field=' & chr(39) & $Field & chr(39) & ',count({1<[' & $Field & ']={""}>}[' & $Field & '])', ',') & concat(right($Field&')',1)))
- Ralf
Thanks alot Ralf. Currently I am using this expression is QVDobserver.QVW you have created and it is perfomance is very solw as am loading a QVD that contain ~40,000 records but I am getting what I am expecting. Thanks any way and I looking forward to dicuss any perfomance tweaking ideas
I was facing also perfomance issues. The only work around so far was to disable expression you do not need at the moment, so only a few are enabled at one time..
And is it possible to add the fieldvalues to it?
What I want is a table with all or a selection of fields and with some expressions I could see de difference between 2 alternate states.
Something like this exemple:
Field Value state1 state2 difference
Country A 100 80 20
Country B 100 120 -20
Product X 6 6 0
Product Y 10 0 10
hi Ralf , that's excellent but I have a problem
when total number of field from all tables exceed the 99 all expressions return NULL
and when you select a table from any filter that's comeback with value !!
for test you can add some table from any source an see when field count exceed 99 what happen
Hassan
Hi Hassan,
can you upload a sample QVW?
- Ralf