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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to filter distinct values by other columns using Power BI DAX

Hello guys,
 
I have the data below:
 
Id     Date      Value
10195  6/4/2020  ABC
10225  19/5/2020 ABC
10257  18/6/2020 ABC
10280  20/7/2020 ABC
10280  20/7/2020 ABC
10280  20/7/2020 ABC
10280  20/7/2020 ABC
10299  30/7/2020 ABC
10299  30/7/2020 ABC
10299  30/7/2020 DEF
10299  30/7/2020 ABC
10299  30/7/2020 ABC
10299  30/7/2020 ABC
 
Using DAX in Power BI, I would like to calculate the amount of values by id and date. The result table must be like this one:
 
Id.    Date      Value
10195  6/4/2020  ABC
10225  19/5/2020 ABC
10257  18/6/2020 ABC
10280  20/7/2020 ABC
10299  30/7/2020 ABC
10299  30/7/2020 DEF
 
Thanks in advance!
 
Best regards,
Gustavo
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Three ways to do that (at least). 

1 - You can do it in the query editor by adding a GroupBy step in the ID column, clicking on Advanced in the Group pop up and add grouping to the other 1 or 2 columns. 

 

2 - Also in the query editor, you could add a step with Remove Duplicates and update the  Table.Distinct( ) with the list of columns to summarize by.

 

3 - You can make a DAX calculated table with

 

New Table = SUMMARIZE(Table, Table[ID], Table[Date], Table[Value])

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@Anonymous 

You cam go to Modeling Click on  New Table and paste the following code to get the result as a table:

Distinct Table = DISTINCT(Table) 

Fowmy_0-1607790088488.png

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

mahoneypat
Microsoft Employee
Microsoft Employee

Three ways to do that (at least). 

1 - You can do it in the query editor by adding a GroupBy step in the ID column, clicking on Advanced in the Group pop up and add grouping to the other 1 or 2 columns. 

 

2 - Also in the query editor, you could add a step with Remove Duplicates and update the  Table.Distinct( ) with the list of columns to summarize by.

 

3 - You can make a DAX calculated table with

 

New Table = SUMMARIZE(Table, Table[ID], Table[Date], Table[Value])

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.