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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to get Table for year wise distinct count of quantity.

Hi Team,

I quite newbie to Power BI DAX

Apology of this is silly question but I am not able to get it.

 

I have a table: has data for suppose 2010 to 2015 (refer table below). I want to get the output as a

Table where I will have 2 columns YEAR and DISTINCT COUNT OF QUANTITY YEAR WISE

note: I want a table. I am able to create measure for getting distinctcount of quantity.

Distinctcount = DISTINCTCOUNT(Table1[Quantity])
but this is measure where i need to see through table visual. I want table in data view.
How can I create table to get distinct count of quantity year wise.
 

below is a input table: 

Year           Month     Day    Quantity

201011184
2010222130
2010321113
2010413122
2010530145
2010612157
2010717100

 

output table should be:

YearQuantity
20107
20119
201210
201320
201456
201578
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , New table like 

New table =

summarize(Table, Table[Year], "Qty", DISTINCTCOUNT(Table1[Quantity]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , New table like 

New table =

summarize(Table, Table[Year], "Qty", DISTINCTCOUNT(Table1[Quantity]))

Anonymous
Not applicable

Thanks alot its working.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors