Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |