Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
analyst101
Frequent Visitor

fixed values count irrespective of the field displayed in the grid

Hi,

I'm trying to count milestones in the pic(pic 1) to find out how many milestones are tied to a project by count distinct, but when I add the milestone code to the grid the milestone count defaults to 1.  I want to show milestone counts(say 4,3,2) even if I add the Milestone to the grid (2nd pic)

The Projects and Milestones are separate tables joined by Proj ID (1:m)

In Tableau I would use a Fixed LOD to achieve this result.  Please help with a DAX solution for this one.

 

Thanks,

Raj

 

        MS1.jpgMS2.jpg

3 REPLIES 3
Anonymous
Not applicable

Hi @analyst101 

 

Please try this measure:

Milestone Count =
VAR _currentProjNum =
    SELECTEDVALUE ( 'Table'[Proj Num] )
RETURN
    COUNTROWS (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Proj Num] = _currentProjNum )
    )

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your reply.  I forgot to mention that the Project and Milestones are separate tables joined by Proj ID.

Your above solution did not work! 

Anonymous
Not applicable

Hi @analyst101 

 

I've tried to create some sample data, but I don't know which table your fields belong to.

If possible could you please share some raw data(exclude sensitive data) or create some sample data, so that we can help you better.

You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.