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.
Hi everyone,
i have the following data set
With each row represents the moviment in a account,i tried to create a Measure where i have to do Credit - Debit while i filter everything that if before my "DateTime" collumn, but it doesnt work the way i imagined, i did a model of what i expect in excel
Basically i need to use my Measure Column deduct my values per row level, (5555-2246 = 3309) ,(3309-4465 = -6711)and goes on to give the results of my "Expected Value"
Thanks everyone
Solved! Go to Solution.
Hi @Anonymous ,
Would you please try to use the following measure:
final balance = CALCULATE(SUM('Table'[Credit])-SUM('Table'[Debit]),FILTER(ALLSELECTED('Table'),'Table'[DateTime]<= MAX('Table'[DateTime])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi,
How did you arrive at the number -6.711? A mystery indeed.
My mistake, the excel formula was wrong when i created that example, this one is the new and right number
Hi,
This approach will work:
Total debit = SUM(Data[Debit])
Total credit = SUM(Data[Credit])
Net = [Total credit]-[Total debit]
Running net = calculate([net],datesytd(calendar[date],"31/12"))
Hope this helps.
Please try this expression, replacing Table1 with your actual table name.
Total =
VAR thisdate =
MIN ( Table1[Date] )
RETURN
CALCULATE (
SUMX (
Table1,
Table1[Credit] - Table1[Debit]
),
ALL ( Table1 ),
Table1[Date] <= thisdate
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thats it!! this is worked in my sample, but when i tried in my original file (with a slicer) the measure table started to loading and dont display the measure @mahoneypat
(My original file, if you can see the loading icon on my table top, i just used the filter os the same table)
Here i used a filter too, but the measure worked perfectly
Hi @Anonymous ,
Would you please try to use the following measure:
final balance = CALCULATE(SUM('Table'[Credit])-SUM('Table'[Debit]),FILTER(ALLSELECTED('Table'),'Table'[DateTime]<= MAX('Table'[DateTime])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |