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
Navaneetharaju_
Helper II
Helper II

Need help in measure or column to find the comparison between the each environment

Hi ,

 

I have only one table with the all the data. the table contains pipelines which are available in all the environment ( Dev, Test, Prod).

I want the measure or column to find the pipeline which are not available in the environment based on few scenarios, 

I have mentioned those scenories here.

I need a Missing Column/measure -

Pipeline NameEnvironment Missing
Fb_PipelineDevAvailable in Dev, Test, Prod
Fb_PipelineTestAvailable in Dev, Test, Prod
Fb_PipelineProdAvailable in Dev, Test, Prod
Workday_pipelineTestMising in Dev
Workday_pipelineProdMissing in Dev
Team_pipelieneProdMissing in Dev, Test

 

given few more clear expected output manually written in excel.

 

AB, AC,AZ,AR,AE,AT,AY are pipeline

 

DevTestProd 
ABABABCorrect
AC ACTest Missing
 AZAZDev Missing
  ARDev/Test Missing
 AE Dev Missing
AT  Correct
AYAY Correct

 

Thanks you.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

HI @Navaneetharaju_ ,

 

You need to create a table with the ID of the enviroments something similar to this:

MFelix_0-1698919634784.png

 

This table will be related with your pipelines tables:

MFelix_1-1698919653495.png

 

Now add the following measure:

Pipeline Status =
VAR Enviroments =
    ALL ( Environment )
VAR PipelinesTable =
    FILTER (
        ALL ( Pipelines ),
        Pipelines[Pipeline_Name] = MAX ( Pipelines[Pipeline_Name] )
    )
VAR TotalPipelineValues =
    MAXX (
        SUMMARIZE ( PipelinesTable, Environment[EnviromentID] ),
        Environment[EnviromentID]
    )
RETURN
    IF (
        ISINSCOPE ( Environment[Enviroment] ),
        SELECTEDVALUE ( Pipelines[Pipeline_Name] ),
        SWITCH (
            TRUE (),
            COUNTROWS ( PipelinesTable ) = TotalPipelineValues, "Correct",
            COUNTROWS ( PipelinesTable ) < TotalPipelineValues,
                CONCATENATEX (
                    EXCEPT (
                        DISTINCT (
                            SELECTCOLUMNS (
                                FILTER ( Enviroments, Environment[EnviromentID] <= TotalPipelineValues ),
                                "ENV", Environment[Enviroment]
                            )
                        ),
                        DISTINCT ( SELECTCOLUMNS ( PipelinesTable, "ENV", Pipelines[Environment] ) )
                    ),
                    [ENV],
                    "/"
                ) & " Missing"
        )
    )

MFelix_2-1698919708739.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

HI @Navaneetharaju_ ,

 

You need to create a table with the ID of the enviroments something similar to this:

MFelix_0-1698919634784.png

 

This table will be related with your pipelines tables:

MFelix_1-1698919653495.png

 

Now add the following measure:

Pipeline Status =
VAR Enviroments =
    ALL ( Environment )
VAR PipelinesTable =
    FILTER (
        ALL ( Pipelines ),
        Pipelines[Pipeline_Name] = MAX ( Pipelines[Pipeline_Name] )
    )
VAR TotalPipelineValues =
    MAXX (
        SUMMARIZE ( PipelinesTable, Environment[EnviromentID] ),
        Environment[EnviromentID]
    )
RETURN
    IF (
        ISINSCOPE ( Environment[Enviroment] ),
        SELECTEDVALUE ( Pipelines[Pipeline_Name] ),
        SWITCH (
            TRUE (),
            COUNTROWS ( PipelinesTable ) = TotalPipelineValues, "Correct",
            COUNTROWS ( PipelinesTable ) < TotalPipelineValues,
                CONCATENATEX (
                    EXCEPT (
                        DISTINCT (
                            SELECTCOLUMNS (
                                FILTER ( Enviroments, Environment[EnviromentID] <= TotalPipelineValues ),
                                "ENV", Environment[Enviroment]
                            )
                        ),
                        DISTINCT ( SELECTCOLUMNS ( PipelinesTable, "ENV", Pipelines[Environment] ) )
                    ),
                    [ENV],
                    "/"
                ) & " Missing"
        )
    )

MFelix_2-1698919708739.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix ,

 

Can i have this as a calculated column, so that i can plot this value in X axis in Bar chart.

Hi @Navaneetharaju_ ,

 

Believe that when you refer that you want to have this on a bar chart you want to count the number of projects within each category correct?

 

Create a table with the status you can have:

MFelix_0-1699949955625.png

 

Then add the following measure:

Status Count =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            Pipelines,
            Pipelines[Pipeline_Name],
            "Pipeline status", [Pipeline Status]
        ),
        [Pipeline status] = SELECTEDVALUE ( 'Status update'[Status] )
    )
)

 

MFelix_1-1699950017869.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @Navaneetharaju_ ,

 

How does the example at the bottom connect to the data above?

 

Further more why do you have example that only have dev or prod and they are correct but in other examples they are missing?

 

Can you explain a little bit better the showe case?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix , 

 

We have to consider only missing pipeline alone.

Scenerios for missing pipelies

* Available in Test and Prod but missing in Dev

* Available in Dev and Prod but missing in Test

* Available in prod but missing in Dev, Test

* Available in Test but missing in PROD

 we have only one table , we have column  as environment. with that column we have to achieve for the above scnarios.

 

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.