Forum Discussion
Need help to make formula work (filter)
- 6 years ago
Hi Anonymous ,
Try the followin code:
Comission = CALCULATE ( MINX ( FILTER ( Bank; Bank[Interval] <= FORMAT ( Store[Amount]; "#" ) && Bank[Interval] >= FORMAT ( Store[Amount]; "#" ) ); Bank[Comission] ) )Be aware that since you don't have values above 10.000 on the comissions will return blank, you can add a level with 9999999999 and a 0 value or another one that you think is correct.
Hi,
Yes you are correct, i will after divide it by a simple countrows.
i have a small data sample, but i don’t know how to upload it to you?
but the general idea is that it will look for a document number, in a payment file. if the document number is there and it has the payment type 26 it will sum all of them together
calculate (sum (data[Amount Tendered]); FILTER( FILTER( data;data[Receipt No_]= EARLIER(store[DocumentNo])); data[Tender Type]="26"))
afterwards instead of the amount I want to have the commission, based on the result the formula gives me and it is in a another table:
| Interval | Comision |
| 0 | 0 |
| 2000 | 50 |
5000 | 100 |
| 10000 | 150 |
| 20000 | 200 |
The last part is where I need the help.
Expected result is, any amount from the first sumif between 0-1999 should be 0, everything between 5000-9999 should be 1000 a.o.
Hope it all make sense, or else i can email you the data sample.
Regards
Hawjeen
You can share the sample data by onedrive, google drive or wetransfer link.
- Anonymous6 years agoNot applicable
here is the link: https://we.tl/t-dt933ZIkGA
I really apreciate your help! i'm new into the powerbi world and having a hard time transtiting from excel
- Anonymous6 years agoNot applicable
Hi again,
After hours of trying, i finally figured out a simple method with Lostnonblank formula.
Once again, thank you for trying. im sure the 1st formula was right, i just could not get it to work.
Regards
Hawjeen