Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I gotta column with weekending dates and another coulumn with full name, so im trying use DAX to calculate distinct value of each full name with no of weeks,
I'm getting error with full name as text type cannot be used as true/false or text type cannot be used in filter with distinct count.
can anyone help me please.
I want output to be gareth 2 weeks, Darran 1 week (since 12/11/21 repeating so distinct count)
Solved! Go to Solution.
@Moni just to be sure, you put 'Table[Full Name] on rows of the matrix and created this measure:
Distinct Weeks Measure = DISTINCTCOUNT('Table'[Week Ending])
And put that measure on the values and it didn't work?
@Moni just to be sure, you put 'Table[Full Name] on rows of the matrix and created this measure:
Distinct Weeks Measure = DISTINCTCOUNT('Table'[Week Ending])
And put that measure on the values and it didn't work?
Hi @SpartaBI
I tried those measures, it calculates distinctcount of weekending but not name, example it shows
Darren 7 weeks
Gareth 2 weeks
but i expect answer,
Daren 2 weeks (since 12/11/2021, 19/11/2021 only two days are ter)
Hi @Moni ,
Adding name and distinct count of week ending gives me 2 weeks for both persons.
Not sure what exactly your expected output is?
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊
Hi @rohit_singh
I tried, changing count and everything
I tried those measures, it calculates distinctcount of weekending but not name, example it shows
Darren 7 weeks
Gareth 2 weeks
but i expect answer,
Daren 2 weeks (since 12/11/2021, 19/11/2021 only two days are ter)
@Moni maybe these values are not really unique in the data. How did you created this column? Do you have maybe a sample data you can share?
Hi @SpartaBI
Example
Moni 12/1/2020
yuvi 1/3/2021
Moni 12/1/2020
yuvi 1/3/2021
Distinctcount(table(weekending))
showing Moni 2 weeks
Yuvi 2 weeks
but what I expect is Moni 1 week
Yuvi 1 week
Hey @Moni I saw now you acceted my solution. Making sure it was solved cause this is the last reply you wrote to me.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!