Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Compartmentalise Data originating from one table - Use Measures, Query Editor or DAX?

Hi ,

 

I have questions around compartmentalisation of data from one common table. I want to understand the pros and cons of the possible options.  

 

I have following 

1. Source = OData Feed

2. Table = Item Ledger (It records all types of inventory transactions )

 

Objective:

Perform Sales, Purchase and Inventory Analysis

 

Solution Approach 1: 

1. Do not separate table and create your measures accordingly. 

 

My view: This will make the use of Quick Measures difficult for the users.

 

Solution Approach 2:

Create Calculated table using the CALCULATETABLE.

 My View: Will both the original and calculated table be in memory impacting performance?

Solution Approach 3:

Create table using Query Editor (duplicate the table) and then filter rows in M Code as below.

 

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Entry Type] = "Sale")) 

 

If I use this approach, I can split tables for Sales, Purchasing and other summarisations and have original table (Item Ledger) not load to Data Model and hence hide it from the data model and users alltogether.

 

The current problem I have at hand is that new table is also pointing to the original OData Feed (Hence downloading data twice).  How can I have this new table point to the other table? I have answered this question already.

 

Larger question that I have is: What are the pros and cons of each of the approach above?

 

Thanks in advance.

Devinder

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous,

Actually, you mention two approaches: DAX or M code. Generally, we import and model data by using M code in Power BI, and we use DAX to create calculation. In your scenario, I would choose approach 3.

For more details about pros and cons of each approach, please review the following blog.
http://radacad.com/m-or-dax-that-is-the-question

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@Anonymous,

Actually, you mention two approaches: DAX or M code. Generally, we import and model data by using M code in Power BI, and we use DAX to create calculation. In your scenario, I would choose approach 3.

For more details about pros and cons of each approach, please review the following blog.
http://radacad.com/m-or-dax-that-is-the-question

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

 Thanks you v-yuezhe-msft

 

Your reply is much appreciated; it cleared my doubts.

 

Regards

Devinder

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.