Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all!
I am trying to design a filter via DAX that on the loweset level (transaction) is doing a search for a substring within a columns stringvalue. I need to do this as a measure, and not a calculated column since the Substring is a variable that is selected in the report, hence it cannot be a computed column.
I have come up with the solution below.
This approach works very well when it comes to a reports that shows data on transaction level.
However, it does not always work in a report that is showing data on a aggregated level.
That is propably due to the fact that I am using FIRSTNONBLANK on ConcatenatedListOfCars and therefor, depending on the reports design (and aggregationlevels), sometimes gets the wrong ConcatenatedListOfCars. I always want to compare the Substring to the current row ConcatenatedListOfCars.
Any ideas or hints on this one?
BR:
// Michael
Example DAX:
Myfilter:=
Var Substring = "Volvo"
Var Result =
IF (
SUMX (
'FactTable';
SEARCH(Substring;CALCULATE(FIRSTNONBLANK(VALUES('FactTable'[ConcatenatedListOfCars]);1) );;0)
)
> 0;
1;
0
)
Return Result
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |