The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
The AMOUNT field is a positive number and DOCTYPE determines if the record is a sale or a return. I want to convert the AMOUNT to a negative number in my dataset if it is a return and keep it positive if it is a sale. Doctype=5 for returns and 6 for sales. In Excel I would normally do the following but that doesn’t work. What is the correct syntax? Thanks for any help you can provide.
=IF(SOP30200[DOCTYPE]=5,-SOP30200[AMOUNT] , SOP30200[AMOUNT])
Suggest you look at at the Switch statement in DAX. Here is a link that gives you details.
https://powerpivotpro.com/2012/06/dax-making-the-case-for-switch/
Good luck!
Luis
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |