Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
I have a set of financial data which contain negative number. I make to measure to sum the "This Year Result" and "Last Year Result". Right now, I would like to create new measure "My IDeas" to show the performance accordingly. However, some negative number make me confuse and not sure how to write the DAX. Any people have experience to handle this situation?
LYR | TMR | Change | Change % | My Ideas |
-100 | -80 | 20 | -20% | Improve |
-100 | -120 | -20 | 20% | Not Improve |
-100 | 90 | 190 | -190% | Improve |
100 | -90 | -190 | -190% | Not Improve |
100 | 120 | 20 | 20% | Improve |
120 | 100 | -20 | -17% | Not Improve |
@KH_Mike Maybe:
My Ideas =
SWITCH(TRUE(),
[Change]>0,"Improve",
[Change]<0,"Not Improve",
"Unchanged"
)
Hi @Greg_Deckler ,
Thank you. If I want to include one more criteria (e.g.: Change More / Less than 10%) how to amend the DAX? Because for the first row or recrod, if I just calculate the change in %, then it will become negative change. In reality, that is really a improvement. Thank you.
@KH_Mike When checking the % use ABS for absolute value? Or when caculating the change use ABS for LYR like:
[Change] / ABS([LYR])
Probably ought to do that anyway.
Hi @Greg_Deckler ,
Seems the logic should be use the absolute value for % and positive change then "Improve". If negative change then "Not Improve". Thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |