Showing results for 
Search instead for 
Did you mean: 
Responsive Resident
Responsive Resident

Distinct count based on selected date range DAX?

Hi Experts,


Is there any way to get distinct count of "User Logins" based on selected date range, we can solve it using simply using the column and change the aggregation type distinct count. But I am trying use this in some measures, instead of giving Distinct count my measure is giving total. I tied the methods suggested in this forum but I am unable to get to the solution.





Can you please see the attached file and point me to right direction.


Thank you.



Thanks for your inputs team. I am able to resolve this issue using Calculated table with different granularity.

View solution in original post

Super User
Super User


Please try to write the below measure, and put it into the card visualization.

And, please check the attached file.


User Name Count: = 
DISTINCTCOUNT('Fact'[User Name] )


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Go to My LinkedIn Page


Thanks for your inputs team. I am able to resolve this issue using Calculated table with different granularity.



Sorry I should have mentioned this earlier. I am able to make it work when I use it within dataset but when i use this dataset as source to other report in that report these values are showing incorrectly .


  I also observed when I use MDX to pull this data from AAS this measure being considered as Column Tool instaed of measure. Doest it make any difference?



Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors