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
JoseLuisAGZZ
Helper I
Helper I

Summarize a table by month, year, and type

Hi yall

Im facing a problem that is I want to count the distinct id of a table based on the type 
So the tables are basically like this:

hist:
id_eqip      date                 status
1               01/01/2023       ok

2               01/01/2023       ok

3               01/01/2023       ok

1               01/02/2023       ok

2               01/02/2023       ok
3               01/02/2023       ok
1               01/03/2023       ok
2               01/03/2023       ok

 

and the other one is
eqip:

id_eqip    type
1              box

2              monitor

3              full-eqip


so what I expect to see is a chart or table where I can count the distinct number of eqip by type,month,year something like this

Type               Month        year        Qty
Box                 Jan            2023         2
Monitor          Jan            2023         3
full-eqip         Jan            2023         1
Box                 Feb           2023         2
Monitor         Feb            2023         4
full-eqip        Feb            2023         6

 

any help will be highly appreciated

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@JoseLuisAGZZ How is the Qty being calculated from your sample data? I don't understand why Box has 2 for January for example. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

In this case is an example, but the Qty is calculated by how many times the item apears in the hist table in that month or week and by type of item, so if the item 1 appear 3 times in week 1 and 2 in week 2 but the type is box I want that item to be summarized with the other ones that are box too

for example:
i have the hist table and the eqip table, combining this two tables I want to have a dax or summarized table that looks like this

item      date                  type
1            01/01/20223    box
2            01/01/20223    box

3            01/01/20223    box

4             01/01/2023     monitor

So when I filter that table I want the result to looks like this:
Month    Qty    Type
Jan           3       Box
Jan           1       Monitor

and so on with other months and weeks, so I can check how many items by type, week,month  are in the hist table registered

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.

Top Solution Authors