The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I feel like I am right near the finish line with this one but can't seem to get the correct and final answer.
I have invoice transaction detail (I created some sample data that that I have included below) and I am trying to calculate what the outstanding total was at the end of each month. I have another date table that has the end date (EOM Date) of each month where I am trying to populate this as a calculated column.
So far, this is what I am using:
EOM Open Balance = CALCULATE(
SUM(TransTable[Amount Due]),
FILTER(ALLSELECTED(TransTable),
TransTable[Transaction Date] <= EOM_DateTable[EOM Date] &&
TransTable[Settle Date] > EOM_DateTable[EOM Date]
))
What I believe I am missing is picking up the line items where the settle date is still open/blank. The goal is to get the snapshot of what the open balance was historically at the end of each month.
Sample Expected Results:
EOM 8/31: $956,071.00
EOM 9/30: $1,280,565.00
Thank you in advance for any and all help!
Solved! Go to Solution.
Hi, @Anonymous
Here are the steps you can refer to:
This is my "End of month" test data :
(1)You can create a measure like this:
Measure = var _end_of_month = SELECTEDVALUE('End of Month'[End of Month])
var _t =FILTER( 'Trans' , 'Trans'[Transaction Date] <= _end_of_month && OR('Trans'[Settle Date] > _end_of_month , 'Trans'[Settle Date]= BLANK()))
return
SUMX(_t, [Amount])
(2)Then we put the [end of month] and the measure on the visual and we will meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @Anonymous
Here are the steps you can refer to:
This is my "End of month" test data :
(1)You can create a measure like this:
Measure = var _end_of_month = SELECTEDVALUE('End of Month'[End of Month])
var _t =FILTER( 'Trans' , 'Trans'[Transaction Date] <= _end_of_month && OR('Trans'[Settle Date] > _end_of_month , 'Trans'[Settle Date]= BLANK()))
return
SUMX(_t, [Amount])
(2)Then we put the [end of month] and the measure on the visual and we will meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you!
Hi @Anonymous ,
see my pbi file. Let me know if the link to OneDrive does not work.
https://1drv.ms/u/s!Aj45jbu0mDVJix-vbGLCnjoZXanr?e=hGubfu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Are you sure about your expected amounts!!??
Can you explain how did you get them from your excel file?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi, @aj1973
I will certainly go back and add them up again. To get the expected amounts, I sorted by transaction date and summed all the amounts where:
Thank you
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
88 | |
70 | |
48 | |
46 |