Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
InsightSeeker
Helper III
Helper III

Issue Adding Measure to Matrix Rows Field

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

1 ACCEPTED SOLUTION

Hi @InsightSeeker 

 

Create a disconnected table that holds the value of your expected output of your customer status measure. You can use enter data

danextian_0-1733959320987.png

 

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

 

danextian_3-1733959775576.png

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @InsightSeeker 

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.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian - Please find attached the sample file.  Click Here

 

Also the result is to be displayed as below.

 

Customer StatusCount of CustomersSales
Existing  
Lost  
NBTO  

 

Thank You!

Hi @InsightSeeker 

 

Create a disconnected table that holds the value of your expected output of your customer status measure. You can use enter data

danextian_0-1733959320987.png

 

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

 

danextian_3-1733959775576.png

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Bibiano_Geraldo
Super User
Super User

Hi @InsightSeeker ,

Matrix Rows field do not support measures, you need to use columns instead.

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors