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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
plantbean
Frequent Visitor

Adding measures based on value

I have a few different tables: Fake Doc 1, Fake Doc 2, Fake Doc 3. These all have some values in it. I've created three different risk measures for each of the tables - so Doc 1 Risk, Doc 2 Risk, Doc 3 Risk. In these I've summed the document values and gave it a 1, 2, or 3 score based on what I've considered is its low, medium, and high risk score. (High risk would be the sum < 40, medium < 70, etc)

 

What I would like to do next is create a measure, Count Lows, for example, that will be a sum of all the low risk scores. Then a Count Medium, and Count High. This way I can display how many low/medium/high risk scores we have. 

 

How can I sum different measures if it's equal to a certain value? This could be done if loops were a thing in DAX but I'm having a hard time adjusting to this language. There's only 3 docs in this example, but the final state would probably have much more than just 3 document tables. 

1 ACCEPTED SOLUTION
plantbean
Frequent Visitor

I wasn't able to figure it out in Power BI so I instead calculated risk on the excel sheet first and then summed it using a measure with something like this:

CALCULATE(COUNTA('Doc 1'[]),FILTER('Documents', Documents[Doc Risk]==3))

 

View solution in original post

2 REPLIES 2
plantbean
Frequent Visitor

I wasn't able to figure it out in Power BI so I instead calculated risk on the excel sheet first and then summed it using a measure with something like this:

CALCULATE(COUNTA('Doc 1'[]),FILTER('Documents', Documents[Doc Risk]==3))

 

amitchandak
Super User
Super User

@plantbean , You should try segmentation(binning) of the measure. With help from an independent atble you can do that

 

refer the example

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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