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.
Hello people,
I am new to Power BI. I need a new column that subtracts two rows of a table.
I have this table, and I need show the anual growth of each database, so I want to generate a column that subtracts the USED_GB of the current year less those of the previous year of each database.
The idea is to generate this new column in DAX. How can I do that?
Thanks.
Hi Ajendra,
This is the desire output, but I would like not view the rows with PREVIOUS_YEAR with empty values:
Thanks.
hi @Anonymous
try to add a calculated column like:
column =
VAR _pre =
MAXX(
FILTER(
data,
data[DATABASE]=EARLIER(data[DATABASE])
&&YEAR(data[DATE])=YEAR(EARLIER(data[DATE]))-1
),
data[USED_GB]
)
RETURN
[USED_GB] - _pre
it worked like:
Hi FreemanZ, thanks for your help.
I tried this, but my PowerBi showed this error (My table name is
Regards.
Hello,
Please provide some dummy data alongwith the desire output. Thanks!!
Ajendra!
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
10 | |
10 | |
10 | |
9 |