The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am doing some measures in PBI desktop app, counting unique values where certain criteria is met. Can someone tell me what the parentheses is for searching for text within a cell.
I know = looks for full text, <> is does not include but not sure what I need where I'm looking for a string within the text.
For context, the cell has dates in dd/mm/yy format, and I want to count where */07/* is.
Solved! Go to Solution.
Hi @Danielwood ,
It appears that you are trying to count the rows where the dd/mm/yy is July month. In that case, there are multiple ways to achive your required output. One of them is to use calculated column like below to identify the rows to be counted.
Contains /07/ =
IF ( CONTAINSSTRING ( 'YourTable'[Column], "/07/" ), "Contains /07/", BLANK () )
Best regards,
Can you not convert your text date to date format??
Create a custom column in power query - ProperDate = Date.FromText(<Date Column>, "dd/mm/yyyy")
You can then create a new measure to count where your new column month = 7...
CALCULATE(DISTINCTCOUNT(<Column to Count>) FILTER(ALL('Date'), MONTH(ProperDate)) = 7)
syntax may not be 100% just working off memory
Hi @Danielwood ,
It appears that you are trying to count the rows where the dd/mm/yy is July month. In that case, there are multiple ways to achive your required output. One of them is to use calculated column like below to identify the rows to be counted.
Contains /07/ =
IF ( CONTAINSSTRING ( 'YourTable'[Column], "/07/" ), "Contains /07/", BLANK () )
Best regards,
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |