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
ElliotP
Post Prodigy
Post Prodigy

Difference between two measures

Evening,

 

I've calculated the proportions between a table of Group Sizes and the number of group sizes & Table Sizes and the number of those tables.

 

When I attempt to calculate the difference between these two measures (m1 - m2) instead of finding the difference, I'm presented with different values depending upon which Size column i use from either table (Group Size or Table Size) as well as either of Sizes gives a dramatically different value. In some cases the numbers should equal 0.5, but they instead somehow equal 0.9 or -1.1.

 

There is a relationship between both tables, I have tried setting it to both single and both. I have tried using variables, yet it doesn't seem to want to come together.

 

Here is a picture of the page: https://gyazo.com/d468848286364a3ee6f65cb2976dcc13

 

Top right hand corner, Customer Grp Proportions are the numbers for m1.

 

Bottom right hand corner, Table Config Proportions are the numbers for m2.

 

NumberOneG and NumberT are the difference by doing m1-m2

 

NumberTwoG and NumberTwoT are the difference through using variables var1-var2

 

Instead of GroupSize/TableSize showing the difference for Catergory 1 as 0.53, it's showing these values.

 

I'll link a pbix if anyone wants me to.

7 REPLIES 7
Eric_Zhang
Employee
Employee

@ElliotP

A pbix could help to better understand your requirement. Please share a pbix.

The 'itemdetailsdogfood$' is the data table.

 

Link to my pbix: https://1drv.ms/u/s!At8Q-ZbRnAj8hkQ0BAAxiXnUdKJm

@ElliotP

Thanks for sharing the pbix. However I'm not finding the page as the snapshot in the original post and measures named as m1, m2, var1, var2 are also missing. Could you be more specific?

Sorry I sent the wrong pbix. Here's the new one: https://1drv.ms/u/s!At8Q-ZbRnAj8hk7mZ-n67sX1bj1H

 

M1 is called [proportion2] in the table 'group size - 2'

 

M2 is called [proportiont] in the table 'Table Configuration (2)'.

 

 

@ElliotP

Instead of GroupSize/TableSize showing the difference for Catergory 1 as 0.53, it's showing these values.

 

 


I am digging into you pbix, however I still don't get the quoted? Do you mean what visuals are showing values not expected? Can you be more specific?

Sorry;

 

In 'Group Size - 2' there is the measure [proportion2]. This measures the proportion of the GroupSize (like a group of 3 people) by GroupCount as a % of the total Group Count.

 

In 'TableConfiguration (2)' there is a measure [proportiont]. This measures the proportion of the TableSize (like table size of One, five, etc) byte the total number of seats in the column 'number'.

 

I'm trying to to complete the operation [proportion2] - [proportiont]. This will contrast the number of groups as a proportion of all group sizes throughout the day against the current table configuration to be able to see if for example 50% of your customers are in groups of One, but your table configuration is 90% for 10 people tables.

 

At the moment when I use the measure [grp2] in the 'Group Size - 2' table, I recieve the top two graphics "NumberOneG" & "NumberOneT" on the left side. The difference between them is using either [tablesize] or [groupsize] from their respective tables as axes. Neither of the calculated values are correct and I'm not sure why.

 

Sorry for not being more clear early, I spent a decent bit of time and I couldn't work out.

 

@richbenmintzI like your suggestion but I'm unable to create a relationship between 'Group Size - 2' and 'Group Size Join - 2'; thoughts?

 

There is a relationship between 'Group Size - 2' (one of my data tables) and 'Table Configuration (2)', so I'm not sure why I'm seeing different values between the axes' choice.

Is there a reason why you have chosen to use calculated columns rather that measures in your 'group size' table to represent the numbers you are dividing? If you create a relationship between the 'group size' and 'group size join' tables you should get the sums you want without the additional calculated columns using measures. 

 

you will also notice that [proportiont] will always be 100% in the top lesft hand corner visual as you have not used the 'Table Size' column in the visual and your measure [proportaint] requires the 'table size' column from 'tableConfiguration (2)' to be on rows columns or filters to get a value other than 1.

 

I would sugget creating table size and group size dimensions that would join to your facts, then all facts would be slicable by a single table value.

 

Hope that make sense

 

Richard



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


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.