Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a straight table with both dimensions and expressions in it.
I have 5 dimensions and 15 expressions. This is because the table is long and I wanted a horizontal scroll bar, and could not see any other way to achieve this.
The straight table is to display only orders which have taken place. These records have an order flag attached to them. If the order was processed, the flag is 1 or if it wasnt processed, it is 0.
The expressions I have in each of the 15 expressions is : if(Sum (orderflag)>0, [columnname] ,0) This formula is to only display the columname e.g. addressline if the orderflag is >0 This is the same format for all expressions e.g. if(Sum (orderflag)>0, AddressLine2 ,0) , if(Sum (orderflag)>0, City ,0) , if(Sum (orderflag)>0, PostCode ,0) ,if(Sum (orderflag)>0, TelNo,0) etc
The problem I am having is that for some reason some expressions are displaying a dash like this ' - ' when the orderflag = 1
Initially I thought there must be missing data from the dataset, but when I create a table box with all the required fields listed, there is data appearing which should be appearing in the straight table as a value rather than ' - '.
The funny thing is, if I click on the record in question from the table box, it correctly appears in the straight table! When I delete the table box, it reverts back to ' - '.
Also when I generate a backend SQL query, the data is also there, so it must be something to do with my expression.
Would anyone have an idea of what is happening?
Unfortunately, I am unable to share the qvd due to client confidentiality.
Thanks
If you see a dash then there are most likely several different values. If you don't explicitly use an aggregation function then the Only() function is used. And that can only return a value as a result if there is only one possible value. To test this theory try for example this expression: concat({<orderflag={1}>} TelNo, ', '). If you get a comma separated list of values then you know there are multiple values.
If you see a dash then there are most likely several different values. If you don't explicitly use an aggregation function then the Only() function is used. And that can only return a value as a result if there is only one possible value. To test this theory try for example this expression: concat({<orderflag={1}>} TelNo, ', '). If you get a comma separated list of values then you know there are multiple values.
Hi
Thank you for your response you are totally correct. I have tried the expression you provided and there is more than one value.
I overcame this by adding the unique id to the dimensions.
Thanks for helping 🙂