cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors