Forum Discussion
count concurrency
Hello, I have this table where you can see that there are different articles
What I need is to Make A Measurement in Dax that tells me How many pcS I have, the sin Import brand or Models, Another That I indicated How many ups, etc.
For example PC: 2, UPS: 10, Printer: 4, etc.
Can you help me please?
Thank you.
4 Replies
- AnonymousNot applicable
Do you have another table/column for the Categories? If not, please use Power Query Text functions available in 'Transform Data Option' by creating a new column for the cleaned data for each category.
For example, in your data, every row starts with 1, so in the you can clean by removing the 1 from each row then separate PC/UPS etc.
Once this is created, you can easily do the rest of the part. Use calculate function and filter category
Count = CALCULATE( COUNTROWS(TableName), TableName[New Column] )
where, 'New Column' is the cleaned column in Transform Data which essentially uniquely identifies the Categories.
Hope this helps.
Please Accept this as a solution if this works
Thanks
- Syndicate_AdminAdministrator
Hello, thanks for replying!!!
Yes, I had already thought about doing something from power query but what I need is to do it directly from dax without having to generate new columns, is it possible?.
Thank you.
- AnonymousNot applicable
To my knowledge, It is not possible directly to write a measure on a text column.
You can do the above method in DAX. Please refer to the following link:
Data Cleaning in DAX: Splitting text strings
However, if you rely on DAX in these cases, it is not efficient. Depending on the size of the table, it may take ages to load the results. Also, It is not a best practice.
Please feel free to get back to me if you need any clarification.
If you think I answered your question, please 'Accept' it as a solution.
Thanks
- AnonymousNot applicable
Hi Syndicate_Admin ,
Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!
Hope it helps,
Community Support Team _ CaitlynIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.