Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a table with multiple columns and records. I am using slicers to filter this table for my report.
What I am having problems with is the following:
I am trying to generate a table (to be displayed as a visual) with records similar (based on a common field value) to current filtered records.
Example:
TABLE Account
ID AccountNumber AccountName AccountType
1 AN192345 Aaa Type1
2 AN199833 Baa Type2
3 AN192167 Caa Type1
4 AN192341 Aca Type1
5 AN192342 Dda Type2
6 AN192343 Bdd Type3
7 AN192344 Eee Type1
Slicers:
AccountNumber = AN192345
AccountType = Type1
I want to know which accounts share the same first 6 characters of the selected account ("AN1923")
Something like: "Select rows from TableA where left(Accountnumber,6) = left(SlicerSelection(Accountnumber),6)"
Expected Output:
ID AccountNumber AccountName AccountType
1 AN192345 Aaa Type1
4 AN192341 Aca Type1
5 AN192342 Dda Type2
6 AN192343 Bdd Type3
7 AN192344 Eee Type1
Any help is much appreciated.
Solved! Go to Solution.
Hi @Sblue
First, you may create a new table as Slicer Table:
Slicer = DISTINCT ( 'TABLE Account'[AccountNumber] )
Second, you may try to create measure as below:
Measure =
IF (
HASONEVALUE ( Slicer[AccountNumber] ),
IF (
LEFT ( VALUES ( 'TABLE Account'[AccountNumber] ), 6 )
= LEFT ( SELECTEDVALUE ( Slicer[AccountNumber] ), 6 ),
1
)
)
Regards,
Cherie
Hi @Sblue
First, you may create a new table as Slicer Table:
Slicer = DISTINCT ( 'TABLE Account'[AccountNumber] )
Second, you may try to create measure as below:
Measure =
IF (
HASONEVALUE ( Slicer[AccountNumber] ),
IF (
LEFT ( VALUES ( 'TABLE Account'[AccountNumber] ), 6 )
= LEFT ( SELECTEDVALUE ( Slicer[AccountNumber] ), 6 ),
1
)
)
Regards,
Cherie
Thanks Cherie, this worked!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |