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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
M_SBS_6
Helper V
Helper V

Odd Value within Matrix table

Hi, 
I have the following measure used within my Matrix and I am getting an odd value that I don't quite understand. From the logic below I have certain criteria and if it matches that, I want it to output a 1 however, it outputs an amount of 90.00. If I set it to 2 I then get the output of 180.00. 

SUMX(apps, 
IF(apps[apps_month_period] = "Current Month" && 'apps'[app_category] in {"Test"}, 1 ,
'apps'[amount]))))

Any idea why this is happening please? I just want to set this to a value of 1. 
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

It sounds like you have 90 rows in your apps table so it is returning a 1 and then suming them to give you 90.  Tyre the measure more like this and see if that helps.

Your Measure =
IF (
    SELECTEDVALUE ( apps[apps_month_period] ) = "Current Month"
        && SELECTEDVALUE ( 'apps'[app_category] ) IN { "Test" },
    1,
    'apps'[amount]
)

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

Did you take out the SUMX part?  

jdbuchanan71
Super User
Super User

It sounds like you have 90 rows in your apps table so it is returning a 1 and then suming them to give you 90.  Tyre the measure more like this and see if that helps.

Your Measure =
IF (
    SELECTEDVALUE ( apps[apps_month_period] ) = "Current Month"
        && SELECTEDVALUE ( 'apps'[app_category] ) IN { "Test" },
    1,
    'apps'[amount]
)

Thanks for your suggestion. I have tried adding in SELECTEDVALUE but I am still getting the same value of 90. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.