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

Dax mesuring with 2 colmuns (filter)

Hello,

 

I am new here and I need help. 

 

I would like create a mesure where I can combine the number of rows of one column (A) and the numbers distincts values for another column (B). 

 

I was able to create a mesure that shows the numbers distancts values (column B): 

 

Total Distinct value B =
IF (
HASONEFILTER ( 'Calendar'[Month Name] ),
CALCULATE ( DISTINCTCOUNT ( 'BB List'[column B] ) ),
SUMX (
ALLSELECTED ( 'Calendar'[Month Name] ),
CALCULATE ( DISTINCTCOUNT ( 'BB List'[column B] ) )
)
)

 

Unfortunatelly I can't find a formula that I can combine the two requests... 

 

This is an example of the table

 

powerbi dax.png

 

Someone can help me? 

 

 

 
5 REPLIES 5
amitchandak
Super User
Super User

Did not get it completely

 

Try

Measure = countrows(table)+distinctcount(table[column B)

Measure = count(table[column A])+distinctcount(table[column B)

 

Anonymous
Not applicable

Hi @amitchandak 

 

Thank you but it is not what I really need. 

 

I need to filter the column email with only distinct resultants and count the values of the job board column. 

 

Do you have any idea? 

Anonymous
Not applicable

Hi @v-frfei-msft 

 

I created a link that you can have access to the sample of the same structure that I have in my file. Some information are confidential so I needed to change a bit. But the structure still the same.

 

Link(we tranfer): Sample data 

 

In this example we have: 

 

28 emails

7 jobat

7 Monster

14 Stepstone

 

The result that I expect is: 

 

(22 distincts emails in total)

When I select in my sicler the job board, I expect see these results 

6 jobat

5 monster

11 septs

 

I hope that you can help me. 

 

Thank you! 

 

Can you create an example display and explain.

If  I take email, restaurants in the matrix, it will display distinct restaurants. What do you mean by filter email by distinct restaurants?

Hi @Anonymous ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.