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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
RichOB
Post Partisan
Post Partisan

Need help correcting my easy measure

Hi, I need Major, Minor, and Moderate to be their own measures if possible so I can use those details in other calculations. But first I need to isolate them.

 

I could have sworn I've made a measure kind of like this before, but it doesn't work so something must be wrong:

Major = CALCULATE(SUM('Table'[Clientcount]), 'Table'[Severity]="Major")
 
Here's my data set:
NameSeverityClientcount
DaveMajor1
MarkMinor1
PhilModerate1
StaceyMajor1
EmilyMajor1
AnnaMajor1

 

Is there a measure that can isolate each severity type and the number of Clientcount that belong to that severity type like this?:

Measure 1: Major  = 4

Measure 2: Minor = 1

Measure 3: Moderate = 1

 

Thanks

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @RichOB ,

 

Your measures seems to be correct already. Putting that Major measure in a table with all those other fields will show the Major measure total regardless of the severity value in the current row. If you want to show just for major when it is the current value, you can use:

Major =
CALCULATE (
    SUM ( 'Table'[Clientcount] ),
    KEEPFILTERS ( 'Table'[Severity] = "Major" )
)

 

If you want the total for each without  using separate measures:

Major =
CALCULATE (
    SUM ( 'Table'[Clientcount] ),
    ALLEXCEPT( 'Table',  'Table'[Severity] )
)




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

3 REPLIES 3
RichOB
Post Partisan
Post Partisan

Hi @danextian thanks for getting back to me. I tried that but it's giving me this error. Any ideas why?

PBIerror.png

@danextian ah the numerical type was text, not a number. Thanks for your help the measure works perfectly!

 

danextian
Super User
Super User

Hi @RichOB ,

 

Your measures seems to be correct already. Putting that Major measure in a table with all those other fields will show the Major measure total regardless of the severity value in the current row. If you want to show just for major when it is the current value, you can use:

Major =
CALCULATE (
    SUM ( 'Table'[Clientcount] ),
    KEEPFILTERS ( 'Table'[Severity] = "Major" )
)

 

If you want the total for each without  using separate measures:

Major =
CALCULATE (
    SUM ( 'Table'[Clientcount] ),
    ALLEXCEPT( 'Table',  'Table'[Severity] )
)




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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.