Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
i am new here do if something is not clear i will add 🙂
in my company there is a table of deals and table of orders - from each deal let say 100000 the customer can pull from his deal the products he want till he finished the 100000
on each time, the ERP server of the system update the deal balance as given value and not giving me the balance for each date.
i tried to calculate the running balance by myself based on the orders date(UDATE) and the orders amount(Qprice)
my measure as below:
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
Hi @avi123
Thank you very much bhanu_gautam for your prompt reply. Allow me to share something.
You can try adjusting the measure to make sure it handles each customer and transaction correctly:
RunningTotalBalance =
VAR CurrentDeal = MAX(DEAL_Alpha[DEAL])
VAR CurrentDate = MAX(ORDERS_Alpha[UDATE])
VAR DealAmount = MAXX(FILTER(ALL(DEAL_Alpha), DEAL_Alpha[DEAL] = CurrentDeal), DEAL_Alpha[QPRICE])
VAR OrdersToDate =
CALCULATE(
SUM(ORDERS_Alpha[QPRICE]),
FILTER(
ALL(ORDERS_Alpha),
ORDERS_Alpha[DEAL] = CurrentDeal &&
ORDERS_Alpha[UDATE] <= CurrentDate
)
)
RETURN
DealAmount - OrdersToDate
If you're still having problems, please provide sample data that fully covers your issue and the expected outcome based on the sample data you provided.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@avi123 , Try using below measure
RunningTotalBalance =
VAR CurrentDeal = MAX(DEAL_Alpha[DEAL])
VAR CurrentDate = MAX(ORDERS_Alpha[UDATE])
VAR DealInitialBalance = MAXX(FILTER(DEAL_Alpha, DEAL_Alpha[DEAL] = CurrentDeal), DEAL_Alpha[QPRICE])
VAR OrdersTotal = CALCULATE(
SUM(ORDERS_Alpha[QPRICE]),
FILTER(
ALL(ORDERS_Alpha),
ORDERS_Alpha[DEAL] = CurrentDeal &&
ORDERS_Alpha[UDATE] <= CurrentDate
)
)
RETURN
DealInitialBalance - OrdersTotal
Proud to be a Super User! |
|
tx for the help but it giving me the same result and still 0 in the total per the cust_ID
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |