Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
felipesaw
Frequent Visitor

Problem with filter columns

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!?

 

BANCODATEVALUEANSWER
ABC01/01/20211000950
TOB01/01/202120001900
TOB01/02/202121001900
TOB01/03/202122001900
ABC01/02/20211200 
NNN01/01/2021  
TTT01/01/2021  
ABC01/03/20211300950
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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

)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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

)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors