Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
I am using the measure below in my report. However, when I try to add the Customer Status measure to the matrix table's Rows field, I am unable to do so. Could this be due to the way I have created the measure?
Customer Status =
IF(
[Lost Client Duration] > 3, "Lost Client",
IF(
[Months Difference] > 12, "Existing Client",
IF(
[Months Difference] > 0 && [Months Difference] <= 12, "NBTO",
"Trialing Client"
)
)
)
Lost Client Duration =
DATEDIFF(
[Last Sale Date ALL],
[Last Date in selected Month],
MONTH
)
Months Difference =
DATEDIFF(
[First Start Date ALL],
[Last Date in selected Month],
MONTH
)
Thanks
Solved! Go to Solution.
Create a disconnected table that holds the value of your expected output of your customer status measure. You can use enter data
Then create this measure which evaluates the [Customer Status] by customer in a temporary table
Status by Customer =
VAR _tbl =
--temporary table of status by by customer and the corresponding sales
ADDCOLUMNS (
SUMMARIZE ( Customer, Customer[Customer_Code] ),
"@Status", [Customer Status],
"@Sales", [Sales]
)
VAR _filtered_tbl =
FILTER ( _tbl, [@Status] IN VALUES ( CustomerStatus[Status] ) )
VAR _sales =
SUMX ( _filtered_tbl, [@Sales] )
VAR _customer =
COUNTROWS ( _filtered_tbl )
RETURN
_customer --use _sales if you want to re turn the sales by customer status
Measures don't have row context so you cannot use them as dimensions. They are evaluated based on the other fields added to a viz. If you want that be shown in the rows field, a placeholder row must exist in the same field as well. For example, if a row field contains A, B, C but doesn't have D but you want D to appear, D must exist in that row field and then write measure to return the desired value if the current row is D.
If you could provide a workable sample data (not an image) and your expected result from that with the reasoning behind, we might be able to whip up a working solution for you.
Hi @danextian - Please find attached the sample file. Click Here
Also the result is to be displayed as below.
| Customer Status | Count of Customers | Sales |
| Existing | ||
| Lost | ||
| NBTO |
Thank You!
Create a disconnected table that holds the value of your expected output of your customer status measure. You can use enter data
Then create this measure which evaluates the [Customer Status] by customer in a temporary table
Status by Customer =
VAR _tbl =
--temporary table of status by by customer and the corresponding sales
ADDCOLUMNS (
SUMMARIZE ( Customer, Customer[Customer_Code] ),
"@Status", [Customer Status],
"@Sales", [Sales]
)
VAR _filtered_tbl =
FILTER ( _tbl, [@Status] IN VALUES ( CustomerStatus[Status] ) )
VAR _sales =
SUMX ( _filtered_tbl, [@Sales] )
VAR _customer =
COUNTROWS ( _filtered_tbl )
RETURN
_customer --use _sales if you want to re turn the sales by customer status
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 42 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 62 | |
| 31 | |
| 26 | |
| 25 |