cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

Did not get it completely

 

Try

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

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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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?



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.