cancel
Showing results for 
Search instead for 
Did you mean: 
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!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

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!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors