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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

DIstinct Count of Category Name Filtered by One of Multiple Demand Columns

Hi everyone,

 

I'm unable to get the correct distinct count of my product based on whether there is current demand, while I have two different demand columns which do not overlap in row entries. I provide simplified data in which I want it to be calculated like the following: 

 

Daniel7_0-1677259500410.png

 

As you can see, I want my Product column to be distinctly counted based on whether it is also populated by the Current Demand measure (this measure directly refencing a demand column in my data, since I want to create an explicit rather than implicit measure for Excel use). My thinking has been to create the following: Count=CALCULATE( DISTINCTCOUNT(ProductTable[Product],[Current Demand] <> BLANK()). However, it is not working. 

 

Please note that I don't have access to the most recent DAX functions such as DISTINCTCOUNTNOBLANK, so I hope there is still a way around this.

 

Any help will be much appreciated.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

Pease try

COUNTX (

VALUES ( ProductTable[Product] ),

[Current Demand]

)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

That works now, thanks!

tamerj1
Super User
Super User

Hi @Anonymous 

Pease try

COUNTX (

VALUES ( ProductTable[Product] ),

[Current Demand]

)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors