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
Anonymous
Not applicable

How to get the Status Column in Power Bi

Hello Super Users ,

 

Need help on the below scenario.

 

So i have 3 tables -

Employee Assigned Level

Employee NameLevels
JohnLevel 1
PeterLevel 2
JaneLevel 3
TinaLevel 4
JoeLevel 1
MikeLevel 2
LarryLevel 3
AnitaLevel 4
NimiLevel 1
ShaneLevel 2
ScottLevel 3

 

Level Master

Transaction CodeTransaction nameAssigned Level
12ABCLevel 1
13DEFLevel 1
14GHILevel 1
15JKLLevel 2
16MNQLevel 2
17PTSLevel 2
18MNSLevel 3
19YWXLevel 3
20UFOLevel 3
21JKLLevel 4
22PQRLevel 4
23TATLevel 4
26PPPLevel 5
27ABBLevel 6
28IRSLevel 5

 

Base Data

Employee NameTransaction NameTransaction Status (Yes/No)
JohnABC?
JohnDEF 
JohnGHI 
PeterMNQ 
PeterJKL 
PeterPTS 
JaneMNS 
TinaJKL 
TinaPQR 

 

First table represents employee name with the level assigned to them to complete. Second table is a level master wherein it gives details of the what the level comprises of. So to complete a particular level, employee has to complete the related transactions.

The third table is the actual base data.

 

Here is what is needed-

-> I need a status column wherein I want to know if a employee completes all the transactions in a level then should be marked Yes, otherwise should be No

 

Issue here is needless of what is assigned the employee will complete any level, we want to capture the transaction status, also the number of transaction(Count) he completed within the level assigned to them

 

I could do this in an excel using concatenate and lookup, need help in figuring out how to do this in Power BI.

 

I have been stuck on this for a while now. Your inputs would really help.

 

Thanks in Advance

 

1 ACCEPTED SOLUTION

@Anonymous  take a look here

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Please help on this 

Anonymous
Not applicable

Thank You @smpa01 for your quick response.

 

This works beautifully, But in the same table if i want to know the number of assigned transactions an employee completed v/s the actual Transaction he is supposed to complete.

 

How should i calculate that as employee has done many transaction which may or may not be assigned to his level.

 

Thanks again

 

 

@Anonymous  take a look here

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
smpa01
Super User
Super User

@Anonymous  a calculated column would be following

 

 

Column =
VAR _alreadyCompleted =
    CALCULATE (
        DISTINCTCOUNT ( Actual[Transaction Name] ),
        ALLEXCEPT ( Actual, Actual[Employee Name] )
    )
VAR _supposedToComplete =
    CALCULATE (
        CALCULATE (
            COUNTX (
                FILTER (
                    dimLevel,
                    dimLevel[Assigned Level]
                        = CALCULATE (
                            MAX ( dimEmployee[Levels] ),
                            CROSSFILTER ( Actual[Employee Name], dimEmployee[Employee Name], BOTH )
                        )
                ),
                dimLevel[Transaction name]
            )
        ),
        ALLEXCEPT ( Actual, Actual[Employee Name] )
    )
VAR _x =
    IF ( _alreadyCompleted = _supposedToComplete, "Yes", "No" )
RETURN
    _x

 

 

and you can use the same expression in a measure as well

 

smpa01_0-1635176785066.png

 

smpa01_1-1635176806078.png

 

 

 

 

 

 

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

Top Solution Authors