The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
This is proving difficult:
I have a measure which is SUM(Sheet1[amount1]/SUM(Sheet1[amount2)*10000. This works just fine, but for one name in the column, the amounts involved are negative which of course creates a positive result. I need to show a negative result so I was hoping to simply use an IF function to flip the calc when it encounters the 'negative' name, giving me a negative result where required in the report. In Excel creating an IF function is easy, and works, and I can do it as a calculated column in DAX, but I need it as a measure in order to be able to show everything in a single column with the correct sign.
Any clues as to how to build this correctly?
Could you pleas show us some sample data? Generally, we can use IF function to check if it's a negative value. In your scenario, please elaborate your expected with sample data, so that we can make further analysis.
Regards,
Charlie Liao
Thanks for taking a look Charlie, but I've built a way around. I really don't think it's possible any other way in fact!
I did the most basic thing possible. I calculated the equation to create the negative value I wanted and then just set up a new visual with that calculation in. I can't create a list with all the values together, bnut rather I now have two lists, one with positive values and one with negative. It's inelegant and messy, but that's life for me...
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |