Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.