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

Dax Calculation Help

Dear All,

 

 

I am making a property management report, where I am calculating what is *Revenue Recognition* to calculate that I have two date fields one *[Revenue Start Date]* & *[Revenue End Date]* now, i made date calender using min date and max date of start and end fields 

i have give two inActive relation now, how would i calculate the amount ???

Revnue Recognition Amt = calculate(sum(table[Amt]),userrelationship(table[Revenue Start Date], Dates[date])
OR

Revnue Recognition Amt = calculate(sum(table[Amt]),userrelationship(table[Revenue End Date], Dates[date])

 

which one is correct, how would i calculate the exact amount

 

I want to put this into a tabular form where property name and month name with exact amount

 

 

please help

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous Both are incorrect in that the function is USERELATIONSHIP, not USERRELATIONSHIP. If you fix that then the correct one is dpendent on what you are trying to achieve. What you might want is something like:


Take a look at these two Quick Measures as I think you want something like them.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365


@ 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...

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

It depends on which dates you want to filter by when calculating the Sum. If you want to filter the table by Start Date, you can use the former one. If you want to filter the table by End Date, you can use the latter one. Here is a blog that may be helpful: How To Work With Multiple Dates In Power BI | Enterprise DNA

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Greg_Deckler
Super User
Super User

@Anonymous Both are incorrect in that the function is USERELATIONSHIP, not USERRELATIONSHIP. If you fix that then the correct one is dpendent on what you are trying to achieve. What you might want is something like:


Take a look at these two Quick Measures as I think you want something like them.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365


@ 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...

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.