Hello
Please help me to calculate in DAX this table.
I have the initial table named "Account balance" which contains all client invoices.
I must display in another table only the data for top five clients after column "Value", without considering account "7888918333".
So first must do SUM on column "Value" than order DESC, see which are top 3, show the columns only for these clients and filer <> 7888918333.
The new table must contain all columns.
I tried to do something like this but even if i obtain the total value correct, when i filter by report date or company code , i obtain wrong values.
here i exemplified only for Report date 31.12.2023 but i have this for all months of 2023
Top15TableA =
VAR Top15Clients2 =
TOPN(
3,
VALUES('Account balance'[Client name]),
CALCULATE(SUM('Account balance'[Value])),
DESC
)
RETURN
SELECTCOLUMNS(
FILTER(
'Account balance',
'Account balance'[Client name] IN Top15Clients2 &&
'Account balance'[Account] <> "7888918333"
),
"Value", 'Account balance'[Value],
"Client name", 'Account balance'[Client name],
"Company code", 'Account balance'[Company code],
"Invoice", 'Account balance'[Invoice],
"Account", 'Account balance'[Account],
"Report date", 'Account balance'[Report date]
)
Thank you.
Please help me to calculate in DAX this table.
I have the initial table named "Account balance" which contains all client invoices.
I must display in another table only the data for top five clients after column "Value", without considering account "7888918333".
So first must do SUM on column "Value" than order DESC, see which are top 3, show the columns only for these clients and filer <> 7888918333.
The new table must contain all columns.
I tried to do something like this but even if i obtain the total value correct, when i filter by report date or company code , i obtain wrong values.
here i exemplified only for Report date 31.12.2023 but i have this for all months of 2023
Top15TableA =
VAR Top15Clients2 =
TOPN(
3,
VALUES('Account balance'[Client name]),
CALCULATE(SUM('Account balance'[Value])),
DESC
)
RETURN
SELECTCOLUMNS(
FILTER(
'Account balance',
'Account balance'[Client name] IN Top15Clients2 &&
'Account balance'[Account] <> "7888918333"
),
"Value", 'Account balance'[Value],
"Client name", 'Account balance'[Client name],
"Company code", 'Account balance'[Company code],
"Invoice", 'Account balance'[Invoice],
"Account", 'Account balance'[Account],
"Report date", 'Account balance'[Report date]
)
Thank you.