Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm trying to create a measure that I can use on a table visual to display spending by category using only data from members who have spent above a certain total amount in the filtered time range.
The data table looks similar to this:
I am looking to only include values from members who have spent above $4000 total across all categories.
I used the following measure to find the total spent by these high-spending customers, but I really cannot figure out how to write a measure that will allow me to break it down by category.
Solved! Go to Solution.
It is not clear what is the output you are expecting.
Try this:
a) Add the measure:
Category Total =
var summaryTable = Filter(SUMMARIZE('Table','Table'[Category], "sumamt", CALCULATE( SUM('Table'[PaidAmt]))), [sumamt] >= 4000 )
var c = COUNTROWS(summaryTable) -- Testing! ... RETURN C
return CALCULATE( sum('Table'[PaidAmt]), summaryTable)
b) Drag a table visual
Add Category, measure "Category Total" and Sum of "PaidAmt" and check the output match your requirements.
If yes, then tune to your requirements. (like formatting the measure, building the rest)
If no, copy the data to excel, and paste again here, and the output you are expecting.
This helps to test!
It is not clear what is the output you are expecting.
Try this:
a) Add the measure:
Category Total =
var summaryTable = Filter(SUMMARIZE('Table','Table'[Category], "sumamt", CALCULATE( SUM('Table'[PaidAmt]))), [sumamt] >= 4000 )
var c = COUNTROWS(summaryTable) -- Testing! ... RETURN C
return CALCULATE( sum('Table'[PaidAmt]), summaryTable)
b) Drag a table visual
Add Category, measure "Category Total" and Sum of "PaidAmt" and check the output match your requirements.
If yes, then tune to your requirements. (like formatting the measure, building the rest)
If no, copy the data to excel, and paste again here, and the output you are expecting.
This helps to test!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 8 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 13 | |
| 12 | |
| 10 | |
| 5 |