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
ppatil
Helper III
Helper III

DAX function

Hi Community..!!

datename
16-MayABC
16-MayXYZ
16-MayWOP
17-MayABC
17-MayABC
18-MayABC
17-MayXYZ
17-MayXYZ
17-MayXYZ
17-MayABC


expected output is :

namecount
ABC3
XYZ2
WOP1

 

please refer the above images ,

name should be counted with respect to date.

ABC coming thrice in date 17-May then also it is counted as one.

will u please help me to do that?

waiting for quick response.

1 ACCEPTED SOLUTION
NickolajJessen
Solution Sage
Solution Sage

5 REPLIES 5
NickolajJessen
Solution Sage
Solution Sage

NickolajJessen_0-1652873495322.png

 

Thank U @NickolajJessen 

Anonymous
Not applicable

HI

 

Distinctcount(table[name])

Hi @Anonymous 

It is not matching with expected output.

U can refer the expected output what I have mentioned.

Anonymous
Not applicable

Ppatil

 

Excuse me; Please find the code for the measure

 

testdistinct =
var namedistinct=SELECTEDVALUE(Disticnt[name])
var tabledisctinct=filter(SUMMARIZE(Disticnt,Disticnt[date],Disticnt[name]),Disticnt[name]=namedistinct)
var result = countrows(tabledisctinct)


return
result

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.