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 guys, I have a doubt about something that I believe is simple.
I created a conditional measure in DAX to understand if the product passed the reorder point or not.
# Status Stock = SWITCH(
TRUE(),
SUM(fStock[STOCK]) >= [Order Point], "Ok",
SUM(fStock[STOCK]) >= [Order Point] * 0.8, "Attention",
"Request Product")
I would like to create a chart that contains the count of each of the 3 statuses. But when trying to use the Count function, it is not allowed to include measures, only columns.
Hi @FelipMark
Manually create a single column table 'Statuses' that contains the 3 statuses. Then you can place 'Statuses'[Status] in the x-axis and the following measure in the values.
Count =
SUMX (
CROSSJOIN ( VALUES ( 'Statuses'[Status] ), VALUES ( fStock[Material ID] ) ),
INT ( 'Statuses'[Status] = [Status Stock] )
)
Hey, can you create a calculated column of this measure so that you can use it as a column for the chart?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |