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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
bhavsar08
Frequent Visitor

Need to create measure to do some calculation based out of column fields

Hello All,

 

i have 2 columns - Status 1 and application

 

Status 1 column have texts - Green, Red, Yellow

Application column have 2 fields - Yes, No

 

i need to create measure of - Sum of total application - sum of Red  and then  sum of Yes /(devide) by total 

 

 

1 ACCEPTED SOLUTION
_AAndrade
Super User
Super User

Hi @bhavsar08,

According to my understanding of your request I build this sample data:

_AAndrade_0-1716538482904.png


With this data table I wrote this measures:

Sum Application = SUM(f_data[Value])

Sum Red = 
CALCULATE(
    [Sum Application],
    FILTER(
        ALLSELECTED(f_data),
        f_data[Status] = "RED"
    )
)

Sum Yes = 
CALCULATE(
    [Sum Application],
    FILTER(
        ALLSELECTED(f_data),
        f_data[Application] = "Yes"
    )
)

Total Applications = 
CALCULATE(
    [Sum Application],
    ALL(f_data)
)

% Yes = DIVIDE([Sum Yes], [Total Applications])


The final output was this:

_AAndrade_1-1716538735379.png

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

2 REPLIES 2
_AAndrade
Super User
Super User

Hi @bhavsar08,

According to my understanding of your request I build this sample data:

_AAndrade_0-1716538482904.png


With this data table I wrote this measures:

Sum Application = SUM(f_data[Value])

Sum Red = 
CALCULATE(
    [Sum Application],
    FILTER(
        ALLSELECTED(f_data),
        f_data[Status] = "RED"
    )
)

Sum Yes = 
CALCULATE(
    [Sum Application],
    FILTER(
        ALLSELECTED(f_data),
        f_data[Application] = "Yes"
    )
)

Total Applications = 
CALCULATE(
    [Sum Application],
    ALL(f_data)
)

% Yes = DIVIDE([Sum Yes], [Total Applications])


The final output was this:

_AAndrade_1-1716538735379.png

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi @bhavsar08,


Could you please provide some data and the expectec output?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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