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.
Good morning friends, I have a database like this below.
With the columns, bank/date/value and I need to calculate this answer column.
It is calculated as this:
I take the lowest value of the VALUE column of the bank independent of the date, i.e. ABC = 1000, TOB = 2000, NNN= n/a ,
TTT = n/a.
And decrease from that value a specific fixed number. From the ABC bank I decrease 50 and the bank TOB decrease 100. Of the seats that have nothing in the value column, I leave blank.
Can you help me please!?
BANCO | DATE | VALUE | ANSWER |
ABC | 01/01/2021 | 1000 | 950 |
TOB | 01/01/2021 | 2000 | 1900 |
TOB | 01/02/2021 | 2100 | 1900 |
TOB | 01/03/2021 | 2200 | 1900 |
ABC | 01/02/2021 | 1200 | |
NNN | 01/01/2021 | ||
TTT | 01/01/2021 | ||
ABC | 01/03/2021 | 1300 | 950 |
Solved! Go to Solution.
@felipesaw , a new column
=
var _min = minx(filter(table, [BANCO] = earlier([[BANCO]) ), [VALUE])
return
Switch(True(),
isblank(_min ) , blank() ,
[BANCO] ="ABC", _min -50 ,
_min-100
)
@felipesaw , a new column
=
var _min = minx(filter(table, [BANCO] = earlier([[BANCO]) ), [VALUE])
return
Switch(True(),
isblank(_min ) , blank() ,
[BANCO] ="ABC", _min -50 ,
_min-100
)
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |