Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello,
I have difficulty. I created a DAX formula like this.
However, the results are not appropriate.
it should be that on 1 Feb 2024 the column "SisaNilaiKontrak"after deducting the value on 1 Jan 2024 should be worth 279.64.
($424.64 - $145)
what should I change to the formula?
Thank you
https://drive.google.com/file/d/1oXdO-1hdSNzbpNH4brRZTkRyeSxxJ5zj/view?usp=sharing
Solved! Go to Solution.
Hi @esuryahadi ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) Click "transform data" to enter the power query and add a index column.
(3) We can createa measure and calculated columns.
Column =
CALCULATE(SUM('Contract'[Remaining Contract Value (USD)]),FILTER('SPK Plan',[No. Contract]=EARLIER('SPK Plan'[No. Contract])))-[Spk Plan ]
Measure = CALCULATE(MAX('SPK Plan'[Column]),FILTER(ALL('SPK Plan'),[Index]=1))
Column 2 = var _a=CALCULATE(SUM('SPK Plan'[Spk Plan ]),FILTER('SPK Plan','SPK Plan'[Index]<=EARLIER('SPK Plan'[Index])-1))
return [Measure]-_a
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide your expected result with backend logic and special examples. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @esuryahadi ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) Click "transform data" to enter the power query and add a index column.
(3) We can createa measure and calculated columns.
Column =
CALCULATE(SUM('Contract'[Remaining Contract Value (USD)]),FILTER('SPK Plan',[No. Contract]=EARLIER('SPK Plan'[No. Contract])))-[Spk Plan ]
Measure = CALCULATE(MAX('SPK Plan'[Column]),FILTER(ALL('SPK Plan'),[Index]=1))
Column 2 = var _a=CALCULATE(SUM('SPK Plan'[Spk Plan ]),FILTER('SPK Plan','SPK Plan'[Index]<=EARLIER('SPK Plan'[Index])-1))
return [Measure]-_a
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide your expected result with backend logic and special examples. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
what's the calculation logic?
pls provide the sample data (not the screenshot) and the expected output
Proud to be a Super User!
Hi @esuryahadi
Try to create a measure instead of a calculated column.
If it doesn't help
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
107 | |
68 | |
48 | |
44 | |
43 |