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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

How to get a names based on existing measure

Jolly Day,

 

This seems like a very simple thing to get but I am new to Power BI and can't quite get it. I have a measure that returns the lowest counts based off of Entry type. I need to also add the names of the lowest to my Matrix. 
Here is the measure already created to grab the value. I need the Full Name based off of that value from the System_Users table

Least COUNT =
VAR FilteredTable =
    FILTER ( System_Users, [Sum Audits and Entries] <> 0 )
RETURN
    CALCULATE (
        Audit[Sum Audits and Entries],
        FILTER (
            FilteredTable,
            RANKX ( FilteredTable, [Sum Audits and Entries],, ASC, DENSE ) = 1
        )
    ) + 0

IGotTheP0werBI_0-1664381068998.pngIGotTheP0werBI_1-1664381093884.pngIGotTheP0werBI_2-1664381113373.png

 

 



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

Hi  @Anonymous ,

I created some data:

Table1:

vyangliumsft_0-1664417448998.png

Table2:

vyangliumsft_1-1664417448999.png

vyangliumsft_2-1664417449000.png

Here are the steps you can follow:

1. Create measure.

Name1 =
MAXX(
    FILTER(ALL(Table1),
    [Job Entry]=[Least COUNT]),[Full Name])
Name2 =
MAXX(
    FILTER(ALL(Table1),
    [Job Audit]=[Least COUNT]),[Full Name])
Name =
SWITCH(
    TRUE(),
    MAX('Table2'[Entry Type])="Job Audit",[Name2],
    MAX('Table2'[Entry Type])="Job Entry",[Name1])

2. Result:

vyangliumsft_3-1664417449006.png

 

Best Regards,

Liu Yang

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

Table1:

vyangliumsft_0-1664417448998.png

Table2:

vyangliumsft_1-1664417448999.png

vyangliumsft_2-1664417449000.png

Here are the steps you can follow:

1. Create measure.

Name1 =
MAXX(
    FILTER(ALL(Table1),
    [Job Entry]=[Least COUNT]),[Full Name])
Name2 =
MAXX(
    FILTER(ALL(Table1),
    [Job Audit]=[Least COUNT]),[Full Name])
Name =
SWITCH(
    TRUE(),
    MAX('Table2'[Entry Type])="Job Audit",[Name2],
    MAX('Table2'[Entry Type])="Job Entry",[Name1])

2. Result:

vyangliumsft_3-1664417449006.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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