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

How to create measure instead of custom tables/columns

Hi all,

 

I have two tables like : 

skondi_0-1605019842372.png

 

 

I have created a Custom Table for getting my calcuations :

skondi_2-1605019969191.png

 

Summary = SUMMARIZE('Fact','Fact'[MUID],'Fact'[Category],"Frequency",COUNTX('Fact',COUNT('Fact'[TBID])),"MF",COUNTX('Fact',COUNT('Fact'[TBID]))* (ALLSELECTED(tb_weights[Weight])))
 
Here how can I create a measure which can get the total Calculations(highlighted) for every MUID like this ? 

 It Should be a measure not a visual.

skondi_0-1605022125234.png

 

 

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

1.Create a new table. Then create a calculated column in the new table. There needs to be a relationship between the two tables.

Table = ADDCOLUMNS('Fact',"Weight",RELATED(tb_weights[Weight]))
MF = CALCULATE(SUM('Table'[Weight]),ALLEXCEPT('Table','Table'[MUID]))

 1.png2.png

 

2.Create another new table. This new table is the result.

Summary = DISTINCT(SELECTCOLUMNS('Table',"MUID",[MUID],"MF",[MF]))

3.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

1.Create a new table. Then create a calculated column in the new table. There needs to be a relationship between the two tables.

Table = ADDCOLUMNS('Fact',"Weight",RELATED(tb_weights[Weight]))
MF = CALCULATE(SUM('Table'[Weight]),ALLEXCEPT('Table','Table'[MUID]))

 1.png2.png

 

2.Create another new table. This new table is the result.

Summary = DISTINCT(SELECTCOLUMNS('Table',"MUID",[MUID],"MF",[MF]))

3.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.