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
achristopherson
Frequent Visitor

Could really use help with this! Measure to find 30% of a value.

I need to find all people whose gross income is more than 30% of their rent.  I have columns for both gross income and rent amount. How do I create a measure to calculate this value so that I can sort it? 

 

Here is an example of the data:

example.PNG

8 REPLIES 8
vbigham
Frequent Visitor

Instead of Measures, try adding one or more columns. 

 

For example:

RentPercentage = [Rent] / [GrossIncome] 

GT30 = [RentPercentage] > 0.30

 

This will give you the rent percentage per row, and whether it is greater than 30% per row. If you want to see the totals for your whole table, then you might want to add a measure.

This sounds like what I wan to do. However, the data resides in two different tables. Do you have to create  new table from this or can I create a custom column and combine fields from two tables?

I am trying to do this: RentPercentage = RELATED(Unit[Rent])/[GrossIncome] but it's telling me this: The column 'Unit[Rent]' either doesn't exist or doesn't have a relationship to any table available in the current context.

Hi @achristopherson

Does those suggestion help you? if you still have any problem ding this, please show me your data model for better analysis.

 

Best Regards

Maggie

You can use the Manage Relationships button (Home tab on the ribbon) to add a relationship between your tables, or you can use the Merge Tables command in the Edit Queries page to combine both into a single table. If you add a relationship, then you'll need to reference the table by name, for example:
RentPercentage = Unit[Rent])/Related[GrossIncome]

DaveW
Advocate II
Advocate II

Hey there, do you mean if rent is greater than 30% of GrossIncome

For this, you could use the measure: Measure = IF(SUM(Table1[Rent])>(SUM(Table1[GrossIncome])*0.3),"Yes","No")

But you should also realise that you can't sort on a Measure, so you should create a new column where you do the formual

cheers!

Greg_Deckler
Super User
Super User

To be clear that I understand, you want to find people where:

 

GrossIncome > (Rent *.3)

 

Correct?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

cloud computing is the platform by which w can able to make a virtual memory that has no physical existence but we are able to store our personal information. I have done several projects on cloud computing by taking help from Dell printer Support  . so if you want to develop your own project can take help from them.

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.