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
lucas105
Advocate II
Advocate II

Workaround around default M2M calculation

Hi all, 

 

I'm struggling with a bit of an issue as I'm trying to figure out a workaround to avoid default Tabular's behaviour. 

 

So, my scenario is somehow like this: 

 

ProductIDStoreIDArea
1110
21

20

2220
3315
Total 45

 

As I have my fact table on product level and then I have to join it to product dimension from which it's being populated to stores dimension. 

 

So based on fact table I don't know how much area a given product occupies in a store, but since it's constant, I want to calculate total Area for calculation of share. 

 

The problem is that as Tabular will give me 10 for ProductID = 1 in any store it's in, my Total is not correct for my requirement. I have to calculate total based on everything, so I'd love to have 65 as my base for calculation of share, instead of 45. 

 

Can you help me? 

 

Best,

Luc 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @lucas105 ,

 

Try to create a Measure like so:

 

calculation of share 2 = SUM ( 'Table'[Area] ) / SUMX ( ALL ( 'Table' ), 'Table'[Area] )

 

share.PNG

 

If I understand it wrong, please let me know.

 

 

 

Best Regards,

Icey

 

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

1 REPLY 1
Icey
Community Support
Community Support

Hi @lucas105 ,

 

Try to create a Measure like so:

 

calculation of share 2 = SUM ( 'Table'[Area] ) / SUMX ( ALL ( 'Table' ), 'Table'[Area] )

 

share.PNG

 

If I understand it wrong, please let me know.

 

 

 

Best Regards,

Icey

 

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.