The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 :
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 :
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
Solved! Go to Solution.
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]
)
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]
)
Hi @VoltesDev ,
Please create a column as below:-
Name = LOOKUPVALUE('Table (2)'[Name],'Table (2)'[statecode],'Table'[Statecode])
Now drag all your values on visual as below:-
or if you need a new summerized table then you could use below formula:-
Table 2 = SUMMARIZE('Table','Table'[Step],'Table'[Statecode],'Table'[Name])
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
@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
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |