Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello.
I had a question about performance.
I am creating a report using DirectMode. So, I created a View with my query, and I sent it to PowerBI Desktop.
In Power BI, I can do transformations on the columns. Calculations, conditionals, ifs, etc ...
But I noticed the following. If I have the following query in my View:
select Id,
UserId,
Name,
Category,
Date
from TABLE
And in PowerBI, make the following transformations:
- Rename the column "Date" to "Date of something important";
- I make an IF in the "Category" column: If NULL then "Undefined", otherwise it, displays the "Category";
- I create a new column called "User", and do a function to concatenate "Id" + "Name";
Everything works very well.
But, PowerBI records everything I did on the right panel (steps).
If I right click on one of these steps, I have the option to see the "original query" of that transformation. And this query basically did:
select Id,
UserId,
Name,
case
when Category is null then 'Undefined'
else Category
end as [Category],
Date as [Date of something important],
cast (Id as nvarchar (MAX)) + Name as [User]
from TABLE
So, the question is: does PowerBI, in DirectMode, do this SQL for real?
Or is it only user-friendly to understand?
If it really does that, would not it be better for me to do this in my View first, and then deliver it to PowerBI all formatted?
What is the best practice in this scenario?
DirectQuery -> View -> Power BI
Performance? Patterns?
Thank you.
Solved! Go to Solution.
I personally prefer to do the logic in views (if possible) because any business logic change can be done on semantic layer than doing in Power Query and also field name will be same if you use the same view in different reports.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I personally prefer to do the logic in views (if possible) because any business logic change can be done on semantic layer than doing in Power Query and also field name will be same if you use the same view in different reports.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
77 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
100 | |
91 | |
83 | |
61 |