Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
hej
i got this sql scrip that i need to use in power bi, but i just cant get it to work in dax
UPDATE b SET
[Parent] = ISNULL
(
(
SELECT
MAX(a.[LedgerAccount])
FROM
[dbo].[DIM_LedgerAccounts] a
WHERE
a.[LedgerAccount] < b.[LedgerAccount]
AND a.[Indentation] = b.[Indentation] - 1
AND a.[IncomeBalanceType] = b.[IncomeBalanceType]
AND a.[Company] = b.[Company]
)
,b.[LedgerAccount]
)
FROM
[dbo].[DIM_LedgerAccounts] b
GO
can someone help me make a solution
Solved! Go to Solution.
@Anonymous,
Check the post below.
https://community.powerbi.com/t5/Desktop/This-Function/m-p/326489#M145679
@Anonymous,
Try using ISBLANK, MAXX and FILTER to add a calculated column.
https://community.powerbi.com/t5/Desktop/conditional-join/m-p/340423#M152404
Hej
so i made this dax from your input
but it doesnt return an error but just cells with no value
i made the column parent in d_ledger account to be equel = 1 because there never is a parent in this data.
@Anonymous,
Check the post below.
https://community.powerbi.com/t5/Desktop/This-Function/m-p/326489#M145679
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |