Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi all,
in my mvc c# application i will pass USERNAME() as "Username | ID" in DirectQuery. How will split i need to set both condition in my Power BI Dashboard,
is this possible ?
Regards
Dinesh D
Solved! Go to Solution.
Hi @DineshDwilco ,
Yes, you are right. SEARCH/FIND and LEFT/RIGHT/MID are not supported with DirectQuery, but only when you want to create column. It still works in measure.
Another way to split ID is edit data in power query editor, but the only ID in your case.
If length of your ID is fixed, please try to use add a new column via
Text.End([username&ID],3) // The 3 is the length of ID
But if the type of the username&ID is char this won't work.
Then go to the power bi report page, use measure like above to get the username.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@DineshDwilco Use PATHITEM in a measure? Alternatives would be using LEFT and RIGHT in coordination with SEARCH/FIND. Not exactly sure of the scenario.
PATHITEM does not supports in DirectQuery. so i will find suitable
@DineshDwilco OK, then you will need to use SEARCH/FIND and LEFT/RIGHT/MID
I checked with MS Document SEARCH/FIND and LEFT/RIGHT/MID are not supported with DirectQuery.
Hi @DineshDwilco ,
Yes, you are right. SEARCH/FIND and LEFT/RIGHT/MID are not supported with DirectQuery, but only when you want to create column. It still works in measure.
Another way to split ID is edit data in power query editor, but the only ID in your case.
If length of your ID is fixed, please try to use add a new column via
Text.End([username&ID],3) // The 3 is the length of ID
But if the type of the username&ID is char this won't work.
Then go to the power bi report page, use measure like above to get the username.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 42 | |
| 30 | |
| 24 |