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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vibration85
Helper II
Helper II

Return a value by dividing a column value from another table with specific condition

Hello everyone,

 

Could anyone help me to have a DAX code with this logic:

 

measure = distinctcount (table 1[value1]) / (if table2[value 2] ="xxx", table2[value 3])

 

value 1= txt (which I need the number of them)

value 2 = text

value 3 = number

 

my logic is dividing the number of  value1 from table 1 by column value 3 from table 2 but with this condition which value 2 from table 2 is a specific name.

 

I don't know if I could explain it well or not but if you need more explanation, please let me know.

 

Many thanks

1 REPLY 1
Jimmy801
Community Champion
Community Champion

Hello @Vibration85 

 

I think you are looking here fore a new column, not for a measure. In a measure you can not reference a row... You can access with FIRSTNONBLANK(YourColumn,0) to a row that is filtered in a measure context

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors