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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Nigelbloomy
Frequent Visitor

Count with second column

I have 3 columns (Investment, Investment Status, and Line Item Detail).  I need a DAX measure (I don't have access to the dataset) to see if an investment has more than one status.

 

InvestmentInvestment StatusLine Item Detail
AApproved1
AApproved2
ANot Approved1
BApproved

1

BApproved2

 

So in this example I need to know that Investment A has more than 1 status and Investment B only has 1 status.

I have been trying to use SUMMARIZE to get a distinct set of investments and statuses, but when I use COUNTROWS I get 1 for each line.  I don't know how to compare the summarized table to the current row while only looking at the investment name.  Maybe that is not the right path to take though.

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

Measure=CALCULATE(DISTINCTCOUNT(Sample[Investment Status]),ALLEXCEPT(Sample,Sample[Investment]))

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

I think you're overcomplicating it.

If you create a table visual, drag the Investment on.  Create a measure using DISTINCTCOUNT on the Investment Status.

Add that to the visual.

That will give the distinct count of each investment.

If you want "1" or "more than 1" just alter the measure by putting the distinctcount in a variable, then use an 'if' to test the value > 1.

Let me know how you get on.

That would work if I didn't need need every field on the visualization.  I actually need all 3 columns in the viz plus the other column created from the measure.  I should have put that in the original description.

wdx223_Daniel
Super User
Super User

Measure=CALCULATE(DISTINCTCOUNT(Sample[Investment Status]),ALLEXCEPT(Sample,Sample[Investment]))

That works  Thank you!  That was much simpler than the path I was headed down.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

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!

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.

Users online (25)