Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
This is my Expression :
Sum({<[Name]={"'='TATA'"}>}Distinct(Sales))
Expected Output : I am using this one in Chart Expression for getting output - I want data only for Tata(Means i want to filter data in expression only for Tata)
but it is showing data for every company (like Barclay,Reliance and Tata) and not filtering.
Is their any thing wrong in my Expression, i am doing??
Please suggest me right way...
Thanks in Advance.
Regards,
Gaurav Saxena
Hey ,
Thanks for response guys...
Abhinvava it still not working.
your expression is not showing error but still it is showing all records for all names.
Martijn my data source is excel files from local machine so i can not send qvw file.(Because is will not show data)
Expression :Sum({<Name={TATA}>} DISTINCT(Sales)) is not filtering data for Tata.
Is their any other thing that i have to do and missing ?
Thanks
Hi, try this:
Sum({< Name={'TATA'} >}Sales)
ps, you don't need [ ] if your field does not contain any spaces, improved readability
Thanks for reply.
the expression you are saying is showing error. if i am tring to correct it then it is correct after modifying upto :
Sum({<[Name]={"='TATA'"}>}DISTINCT(Sales))
So how else how can we modify so it will filter data only for Tata.
Seeking for your response.
Thanks
Gaurav Saxena
Hi Gaurav,
Use the following expression.
Hope it helps.
Sum({<Name={TATA}>} DISTINCT(Sales))
Rgrds,
Abhinava
Hi, Can you post you qvw file?
Normally, name = {'Tata'} should work.
PS: sum distinct sales amounts is not a thing you do normally.... (instead count distinct customerId's would make sense)
I agree with you martin..
perhaps he should lose the distinct clause altogether..
Rgrds,
Abhinava
Hey ,
Thanks for response guys...
Abhinvava it still not working.
your expression is not showing error but still it is showing all records for all names.
Martijn my data source is excel files from local machine so i can not send qvw file.(Because is will not show data)
Expression :Sum({<Name={TATA}>} DISTINCT(Sales)) is not filtering data for Tata.
Is their any other thing that i have to do and missing ?
Thanks
Hi Gaurav,
Plz check ur data model to see if the fields Name and Sales are linked correctly.
Secondly, there is no use of distinct clause for calculating sales.
If you want to have distinct sales use the distinct clause with the key connecting the Tables containing Name and Sales.
If it still doesn't work, there might be a problem with your data model. double check it
Rgrds,
Abhinava
Hey,
Now it's working actually the problem is with it's field name. it is 'NAME' and i was used 'Name'.
Thanks Abhinava
Thanks you very much to all for response.
🙂