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.
I would need to replicate, in a new column, a very simple SUMIF function. I've tried for hours, but i'm unable to complete this task in PowerBI.
My database (DB_CORP) has, for each observation a single client name and 3 columns: "CUSTOMER" (the customer name); "GROUP" (the holding name of the customer, multiple customers can have the same GROUP name); "REVENUE"
Below a screenshot of the new column formula I need to replicate. If a Group's revenues are negative, put a "Y" for each customer part of that group, and viceversa.
ve
Solved! Go to Solution.
hi, @robdan
try below for column
Column =
var a = SUMX( FILTER('Table','Table'[group]=EARLIER('Table'[group])),'Table'[revenur])
return
IF(a<0,"y","n")
Hi @robdan
for a calculated column, you may try
Group Revenue =
IF (
SUMX (
CALCULATETABLE ( ALLEXCEPT ( 'Table', 'Table'[Group] ) ),
'Table'[Revenue]
) >= 0,
"N",
"Y"
)
hi, @robdan
try below for column
Column =
var a = SUMX( FILTER('Table','Table'[group]=EARLIER('Table'[group])),'Table'[revenur])
return
IF(a<0,"y","n")
who knew that asking on the internet would have saved me a couple of hours! thanks a lot it works very well, unfortunately i'm not familiar with DAX
Hi, @robdan
Asking on internet is easy
But it valueble when you shake your mind and still not get answer.
you learn new things and gain knowledge from your efforts.
Enjoy your day 😊
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |