Forum Discussion
FILTER AND SUM
hi
I have a data like this...
| MODEL | QTY |
| ADB1 | 10 |
| ZDB1 | 10 |
| ADB1 | 10 |
| ADB1 | 10 |
| ADB2 | 10 |
| CDB1 | 1 |
| RAS | 10 |
| RAS1 | 10 |
I want to filter products name starting with "adb" + "cdb"+"zdb" ... and do the sum qty... Any one can guide?
Hi,
In the Query Editor, using Column from Examples, extract the text portion from the alphanumeric string. Then drag that column to the visual.
Hi srkase ,
did you solve your problem?
If I answered your question, please mark my post as solution, this will also help others.Please give Kudos for support.
9 Replies
- TomMartensSuper User
Hey srkase ,
this measure
Measure = CALCULATE( SUM('Table'[QTY]) , FILTER( 'Table' , LEFT('Table'[MODEL] , 3) IN {"ADB" , "CDB" , "ZDB"}) )allows to create something like this:
Hopefully this provides what you are looking for.
Regards,
Tom
- srkaseHelper IV
I NEED TO FILTER PRODUCT NAME CONTAINING "XXXXXX"
- srkaseHelper IV
the product name will have 3 digits or 4 digits or 5 digits... but if we extract left(3) the calculation is not performed.
- TomMartensSuper User
Hey srkase ,
are there more business rules than the length of the searchstring, that has to be contained in the model name, and that you did not mention yet.
I assume that Model (derived from the data sample you provided) means Product (what you are using, if you describe why a provided solution will not work).
I will provide a new solution, later this day
Regards,
Tom
Please consider reading this: https://www.skillsyouneed.com/write/capital-letters.html
- Ashish_MathurSuper User
Hi,
In the Query Editor, using Column from Examples, extract the text portion from the alphanumeric string. Then drag that column to the visual.