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.
DATE | Manager | Sale value | Profit |
2021-01-01 | A | 1000 | 500 |
2021-01-01 | B | 2000 | 600 |
2021-01-01 | C | 500 | 100 |
2021-01-05 | A | 1000 | 500 |
2021-01-05 | B | 2000 | 600 |
2021-01-05 | C | 3000 | 400 |
2021-01-10 | A | 1000 | 300 |
2021-01-10 | B | 1000 | 200 |
2021-01-10 | C | 1000 | 500 |
2021-01-18 | A | 3000 | 600 |
2021-01-18 | B | 1000 | 400 |
2021-01-18 | C | 3000 | 300 |
Hi all,
I have a report like above, and edited in power bi.
I created the 1st measure called rate of profit(=profit/sales values x 100%) .
I want to alert when the measure(rate of profit) continuosly decreasing over date.( Maybe 3 consecutive decreasement over days of the table) And the date is not consecutive.
By now, i think i can make 2nd measure to decide if there are 3 consecutive decreasement on the measure(rate of profit), and the 2nd measure can be used in visual to show just like traffic light.
Can anyone help me this? Thanks
This is a pretty standard "previous row" pattern. You will need to define what "previous row" means in your situation. Assuming that you want to see this by manager, sorted by date, here is one implementation:
Hi @lbendlin ,Thank you very much. It's almost what i want, still have a little question in the lastest step.
Return switch(TRUE(),[Rate of Profit]>p,"Up",[Rate of Profit]<p,"Down","Same")
To this step, what i want is decided by date, for example
If (and([the Rate of profit] in the lastest day> [the Rate of profit] in the 2nd lastest day,[the Rate of profit] in the 2nd lastest day>[the Rate of profit] in the 3nd lastest day),‘up’,'noramal')
so i don't know how to get the 2nd and 3rd lastest day from datasource by using dax.