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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

App status based on component status

Hello community,

 

I need to see the application status based on the component status. Each app consists of several components. As soon one of the component status is red, the whole app status is red. Only if all component status is green, the app status is green as well.


My data:

 

App.Comp.Comp. Status
A-1SWgreen
A-1HWgreen
A-2SWgreen
A-2HW1red
A-2HW2red
A-3SWred
A-4HWgreen

 

Do you have any suggestions?

Thank you very much in advance. Your help ist very appreciated.

 

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Anonymous you can create this measure:

 

 

App Status = 
IF(
    HASONEVALUE('Table'[App.]),
    VAR _current_app = SELECTEDVALUE('Table'[App.])
    RETURN
    IF(
        COUNTROWS(
            FILTER(
                'Table',
                'Table'[App.] = _current_app && 'Table'[Comp. Status] = "red"
            )
        ) > 0,
        "red",
        "green"
    )
)

 

 

 

SpartaBI_0-1652960870797.png

 


2022-05-09 22_36_04-Power BI Workspace Datasets License Permissions - Microsoft Power BI Community.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png  SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

View solution in original post

4 REPLIES 4
SpartaBI
Community Champion
Community Champion

@Anonymous you can create this measure:

 

 

App Status = 
IF(
    HASONEVALUE('Table'[App.]),
    VAR _current_app = SELECTEDVALUE('Table'[App.])
    RETURN
    IF(
        COUNTROWS(
            FILTER(
                'Table',
                'Table'[App.] = _current_app && 'Table'[Comp. Status] = "red"
            )
        ) > 0,
        "red",
        "green"
    )
)

 

 

 

SpartaBI_0-1652960870797.png

 


2022-05-09 22_36_04-Power BI Workspace Datasets License Permissions - Microsoft Power BI Community.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png  SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Anonymous
Not applicable

rry I checked badly the firs formula,

 

Here is the good one

Status =
var App='status app'[App.]
var result2=countrows(filter(summarize('status app','status app'[App.],'status app'[Comp. Status]),'status app'[App.]=App&&'status app'[Comp. Status]="Red"))
return
if (result2=0,"Ok","Not Ok")
Anonymous
Not applicable

Hi,

 

try this. I added a cloumn to the table

JamesFr06_0-1652960412964.png

 

tamerj1
Super User
Super User

@Anonymous 
You can slice by App. then New Measure:
Status =
IF ( COUNTROWS ( VALUES ( TableName[Comp. Status] ) ) = 1, "Green", "Red" )

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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