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 have a table with 4 columns, 'kpi', 'month', 'status' and 'value'. Status is either 'final' or 'preliminary'. I'd like to create a month_status column that returns 'final' if all the rows for the specific month are 'final', or 'prelim', if there is at least 1 row that has 'prelim' in column 'status'.
I tried modifying somehow below formula, but I could not make it do the search within a specific month only.
Solved! Go to Solution.
This could/should be done as a measure probably, but here is a column expression that should work. Not sure if you are checking all KPIs within the month or within a given KPI for that month, but both variations shown.
month_status =
VAR vPrelimRows =
CALCULATE (
COUNTROWS ( table ),
ALLEXCEPT (
table,
table[Month]
),
table[Status] = "Preliminary"
)
RETURN
IF (
ISBLANK ( vPrelimRows ),
"Final",
"Preliminary"
)
replace Table with your actual table name. If you are looking within a KPI and month use
ALLEXCEPT(Table, Table[Month], Table[KPI])
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
This could/should be done as a measure probably, but here is a column expression that should work. Not sure if you are checking all KPIs within the month or within a given KPI for that month, but both variations shown.
month_status =
VAR vPrelimRows =
CALCULATE (
COUNTROWS ( table ),
ALLEXCEPT (
table,
table[Month]
),
table[Status] = "Preliminary"
)
RETURN
IF (
ISBLANK ( vPrelimRows ),
"Final",
"Preliminary"
)
replace Table with your actual table name. If you are looking within a KPI and month use
ALLEXCEPT(Table, Table[Month], Table[KPI])
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
It works, thank you!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |