Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
hi all,
I have a measure like
CALCULATE ( Measure, Table2[Category] = "A" )
+ CALCULATE ( Measure, Table2[Category] = "B" )
+ CALCULATE ( Measure, Table2[Category] = "C" )
+ CALCULATE ( Measure, Table2[Category] = "D" )
+ CALCULATE ( Measure, Table2[Category] = "E" )
and so on...
Can I write it more compact? With a kind of running Filter?
Thanks for ideas.
Solved! Go to Solution.
Yes, you could do it like
Combined measure =
VAR summaryTable =
ADDCOLUMNS (
CALCULATETABLE (
VALUES ( 'Table2'[Category] ),
KEEPFILTERS('Table2'[Category] IN { "A", "B", "C" })
),
"@val", [Base Measure]
)
RETURN
SUMX ( summaryTable, [@val] )
Thank you it worked 👍
The measure dont react to a slicer with A, B and C. Is it also possible to write it in such way that I can also filter it to A, B and C?
Yes, you could do it like
Combined measure =
VAR summaryTable =
ADDCOLUMNS (
CALCULATETABLE (
VALUES ( 'Table2'[Category] ),
KEEPFILTERS('Table2'[Category] IN { "A", "B", "C" })
),
"@val", [Base Measure]
)
RETURN
SUMX ( summaryTable, [@val] )
You could do something like
Combined measure =
VAR summaryTable =
ADDCOLUMNS (
CALCULATETABLE (
VALUES ( 'Table2'[Category] ),
'Table2'[Category] IN { "A", "B", "C" }
),
"@val", [Base Measure]
)
RETURN
SUMX ( summaryTable, [@val] )
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
42 | |
30 | |
27 | |
27 |