Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to show a chart like:
| code | codeText | Information | 2012 (formula) | 2013 (formula) |
|---|---|---|---|---|
| A1 | Text1 | S | 1 | 1 |
| A1 | DifferentText1 | S | 1 | 1 |
| A2 | Text2 | M | 1 | 1 |
| A3 | Text3 | M | 0 | 1 |
This is the table in QV:
| code | codeText | Information | year | count |
|---|---|---|---|---|
| A1 | Text1 | S | 2012 | 1 |
| A1 | DifferentText1 | S | 2013 | 1 |
| A2 | Text2 | M | 2012 | 1 |
A2 | Text2 | M | 2013 | 1 |
| A3 | Text3 | M | 2013 | 1 |
I want to show the first table here in a chart.
2012 and 2013 should be formulas which do the following:
If the sum of count is > 1 and year=2012 and the field codeText is left out, then write 1.
Same with 2013.
I thought about:
sum({<year={'2012'}, codeText=>} count)
but there is a '0' in A1 - Text1- 2013 and also a '0' in A1-DifferentText1 - 2012 which should be filled with 1 because there is a code with the information in the years.
Thanks!
Maybe I have to write it more clearly:
I want to know if the codes with the information in the years 2012 , 2013 do exists. Doesn't matter which codeText they have. But in the chart the codeText has to be shown because not everyone knows what the code means (it just changes in some details).
I admit I haven't understood all your requirements, but try maybe something like
sum({<year={'2012'}>} total<code> count)
resp.
sum({<year={'2013'}>} total<code> count)
using code and codetext as dimensions (and maybe another expression =only(Information) )