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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Filter an unpivoted table to show rows that meet certain criteria?

I have a table with pivoted data, shown in the below images. I have created a field "MoveID" to group similar org codes together

 

jsauerla_3-1617285700300.png jsauerla_4-1617285720228.png

 

 

My objective is to create a measure that will filter to show records where MoveID has a value of Loaded, or TM queue, but MoveID DOES NOT have a value of anything else. Not Approved, Approved w/ Changes, Exported, Live, Rejected/Cancelled. So in using this measure as a filter, I can see rows where there is no Live, Approved, Exported value at all.

 

I dont want to just filter them out to not see them. I want to find rows where they don't even exist

 

jsauerla_0-1617285578608.png

 

Is this even possible? 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


According to your description, you could create flag measure, then using flag as filter; the following formula to create a measure :

step 1: Add Measure (flag)

flag =
VAR a =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Org code] ),
            [Status] IN { "loaded", "TM queue" }
        )
    )
VAR b =
    CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Org code] ) )
RETURN
    IF ( a = b, 1, 0 )

step 2: Add filter

v-yalanwu-msft_0-1618390663233.png

The final output is shown below:

Filter an unpivoted.png

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


According to your description, you could create flag measure, then using flag as filter; the following formula to create a measure :

step 1: Add Measure (flag)

flag =
VAR a =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Org code] ),
            [Status] IN { "loaded", "TM queue" }
        )
    )
VAR b =
    CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Org code] ) )
RETURN
    IF ( a = b, 1, 0 )

step 2: Add filter

v-yalanwu-msft_0-1618390663233.png

The final output is shown below:

Filter an unpivoted.png

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

ryan_mayu
Super User
Super User

@Anonymous 

you can create a column

check = if(ISBLANK(maxx(FILTER('Table','Table'[Org Code]=EARLIER('Table'[Org Code])&&'Table'[Status]<>"Loaded"&&'Table'[Status]<>"TM queue"),'Table'[Status])),"Yes","No")

1.PNG





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

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , Try a measure for only those two status and have both of them only

 

countx(Filter(summarize(Table, Table[MoveID] , "_1", calculate(distinctcount(status), filter(Table, Table[Status] in {"Loaded","TM queue"})), "_2",distinctcount(status)), [_1] =[_2] && [_1] =2), [MoveID])

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.