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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
VoltesDev
Helper V
Helper V

How do we SUMMARIZE table with some lookup ?

Hi guys,

 

I am wondering how to use DAX to summarize a table, but with a lookup by one of its summarized column ?

I have table and data like this :

VoltesDev_0-1649823326125.png

And I want to summarize the 2nd table but with addition column of the step name getting from 1st table. So to be like this :

VoltesDev_1-1649823405045.png

I believe I can use Lookup function, but I don't know the correct way of doing it. Anyone can teach me how to ?

Thanks

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @VoltesDev 
If you want with DAX you can use

Table3 = 
SELECTCOLUMNS (
    FILTER (  
        CROSSJOIN (  
            SELECTCOLUMNS ( Table1, "Code", Table1[Statecode], "Name", Table1[Name] ),
            DISTINCT ( Table2 ) 
        ),
        [Statecode] = [Code]
    ),
    "Statecode", [Statecode],
    "Name", [Name],
    "Step", [Step]
)

1.png

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @VoltesDev 
If you want with DAX you can use

Table3 = 
SELECTCOLUMNS (
    FILTER (  
        CROSSJOIN (  
            SELECTCOLUMNS ( Table1, "Code", Table1[Statecode], "Name", Table1[Name] ),
            DISTINCT ( Table2 ) 
        ),
        [Statecode] = [Code]
    ),
    "Statecode", [Statecode],
    "Name", [Name],
    "Step", [Step]
)

1.png

Samarth_18
Community Champion
Community Champion

Hi @VoltesDev ,

 

Please create a column as below:-

 

Name = LOOKUPVALUE('Table (2)'[Name],'Table (2)'[statecode],'Table'[Statecode])

 

Samarth_18_0-1649825175449.png

Now drag all your values on visual as below:-

Samarth_18_1-1649825222445.png

 

or if you need a new summerized table then you could use below formula:-

Table 2 = SUMMARIZE('Table','Table'[Step],'Table'[Statecode],'Table'[Name])

Samarth_18_2-1649825401163.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

amitchandak
Super User
Super User

@VoltesDev , Merge in power bi and remove duplicate


Append and merge  : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Remove Empty and Remove duplicate Rows (Power Query) : https://youtu.be/Hc5bIXkpGVE

 

Or user Group by 

https://docs.microsoft.com/en-us/power-query/group-by

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
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.