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 nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
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! |
|
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 20 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 35 | |
| 28 | |
| 21 | |
| 19 | |
| 17 |