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
harshagraj
Post Partisan
Post Partisan

To count max in row

Hi all i need to display as higlighted on the Image. Here the total unique count of Tools are 5. 
Eg Count of T1 will be 2 Because  D & E are at T1 and Count of T4 is 1 because A is at T4. 
Kindly help to achieve this.count.JPG

8 REPLIES 8
amitchandak
Super User
Super User

@harshagraj , These T1, t2 members are column or dimension members.

What is the format of the raw data. please share example

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
amitchandak
Super User
Super User

@harshagraj , These T1, t2 members are column or dimension members.

What is the format of the raw data. please share example

From now on I can think

if it's measures

_t1 distinctCOUNT(Table[T1])
_t2 distinctCOUNT(Table[T2])
table table _t3 table in the table of different characteristics table([T3])

and more

then treat as
calculatecalculate(countx(values(Table[tool]),_t1),filter(Table, isblank(_t2) && isblank(_t3))

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

hi @amitchandak thanks for the reply. Actually they are all Caluclated Colomns based on DateDiff(Weeks).

Then something like this

calculate(countx(values(Table[tool]),_t1),filter(Table, isblank(_t2) && isblank(_t3))

 

or this should work

countx(filter(summarize(Table,Table[tool], "_t1" , distinctCOUNT(Table[T1]), "_t2" , distinctCOUNT(Table[T2])
, "_t3" , distinctCOUNT(Table[T3]) ,, "_t4" , distinctCOUNT(Table[T4])),
isblank([_t2]) && isblank([_t3]) && isblank([_t4])),[_t1])

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

hi @amitchandak  thank you for the responce. Pleases help me i am totally confused andunable to replicate the formula below. Please tell me if it is a Calculated Measure or Column. Actual Table name is PPR and Column names are Tool Number and Date Diff column names are T0,T1,T2,T3 & T4.

@harshagraj , I suggested measures. If this did not work

 

Can you share sample data and sample output.

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

Hi @amitchandak i tried the other calculation but unfortunately it didnt work. Please find the below sample data.
Eg: Tool Number 9 - A is at T3 so it should not be counted in T0,T1,T2.
      Tool Number 41- A  is at T2 so it should not be counted in T0,T1 & T3
Here the total tool count of tool number is 100. The required output is I need count of T0,T1,T2,T3
(Hint:Count of Tool(100)= Count(T0)+Count(T1)+Count(T2)+Count(T3))

Hi @amitchandak i tried the other calculation but unfortunately it didnt work. Please find the below sample data.
Eg: Tool Number 9 - A is at T3 so it should not be counted in T0,T1,T2.
      Tool Number 41- A  is at T2 so it should not be counted in T0,T1 & T3

1-A   0
2-A   4
3-A   4
4-A   0
5-A   0
6-A   4
7-A   0
8-A   13
9-A17184719
10-A17151826
11-A17151826
12-A16211421
13-A19751112
14-A19243539
15-A1515328
16-A1515368
17-A1515328
18-A1515328
19-A1515328
20-A1515368
21-A19263663
22-A6014218
23-A6014218
24-A6014218
25-A6014218
26-A1822610
27-A661102
28-A192345 
29-A203840
30-A223840
31-A223840
32-A20241969
33-A192466 
34-A223840
35-A22241572
36-A57598425
37-A3-64737
38-A23226233
39-A232355 
40-A15161009
41-A242558 
42-A242251 
43-A283424 
44-A17261448
45-A15-21011
46-A15-21011
47-A15-21011
48-A36415618
49-A2222-220
50-A36425724
51-A2326330
52-A44  
53-A3837340
54-A44494 
55-A3139698
56-A4343468
57-A 1659 
58-A49511011
59-A49511011
60-A49511011
61-A272900
62-A30-58630
63-A25-4900
64-A -5300
65-A25-4900
66-A -5400
67-A25-490-4
68-A2025325
69-A13-49830
70-A13-4983-19
71-A2631140
72-A2631145
73-A2631465
74-A56633423
75-A40-46  
76-A6767105
77-A6767105
78-A6767105
79-A148211412
80-A148211412
81-A148211412
82-A -4400
83-A3035170
84-A3035170
85-A2929  
86-A5-434518
87-A596928 
88-A 40  
89-A 40  
90-A 40  
91-A15182 
92-A15181 
93-A15181 
94-A15181 
95-A15185 
96-A15181 
97-A15181 
98-A22-4075-19
99-A22-40750
100-A23-397446



Hi @amitchandak i tried the other calculation but unfortunately it didnt work. Please find the below sample data.
Eg: Tool Number 9 - A is at T3 so it should not be counted in T0,T1,T2.
      Tool Number 41- A  is at T2 so it should not be counted in T0,T1 & T3

hi @amitchandak @parry2k  could you please help me?

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