Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi,
I am trying to create a dax measure as below:
But I am confused how to refer the variable arguments inside the return statement & so its incomplete.
Here is the incomplete measure that i tried:
VT_Profile =
VAR _table = SUMMARIZE(Accruals,Accruals[DBName-Point_Id],Accruals[Date],"Switch Units",[Switch Units],"Accrual Unit Source",[Accrual unit source])
RETURN
CALCULATE(SUM(),)
My expected dax measure:
I want to sum the switch units argument from virtual (_table) table variable and filter by its argument Accrual unit Source = "Profile"
Here is the dax below:
VT_Profile =
VAR _table = SUMMARIZE(Accruals,Accruals[DBName-Point_Id],Accruals[Date],"Switch Units",[Switch Units],"Accrual Unit Source",[Accrual unit source])
RETURN
CALCULATE(SUM(_table(Switch Units),_table(Accrual unit source) = "Profile")
PFA file here Financial Management -Tanvi Trial - Copy.pbix
Thanks in advance!
@SamWiseOwl @Greg_Deckler @marcorusso @jgeddes @Anonymous @Anonymous @amitchandak
Solved! Go to Solution.
@sivarajan21 you need to use the SUMX function to iterate over the virtual table and sum the "Switch Units" while applying the filter for "Accrual unit source".
dax
VT_Profile =
VAR _table =
SUMMARIZE(
Accruals,
Accruals[DBName-Point_Id],
Accruals[Date],
"Switch Units", [Switch Units],
"Accrual Unit Source", [Accrual unit source]
)
RETURN
CALCULATE(
SUMX(
FILTER(
_table,
[Accrual Unit Source] = "Profile"
),
[Switch Units]
)
)
Proud to be a Super User! |
|
@sivarajan21 you need to use the SUMX function to iterate over the virtual table and sum the "Switch Units" while applying the filter for "Accrual unit source".
dax
VT_Profile =
VAR _table =
SUMMARIZE(
Accruals,
Accruals[DBName-Point_Id],
Accruals[Date],
"Switch Units", [Switch Units],
"Accrual Unit Source", [Accrual unit source]
)
RETURN
CALCULATE(
SUMX(
FILTER(
_table,
[Accrual Unit Source] = "Profile"
),
[Switch Units]
)
)
Proud to be a Super User! |
|
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 18 | |
| 13 |
| User | Count |
|---|---|
| 69 | |
| 57 | |
| 42 | |
| 42 | |
| 30 |