Forum Discussion
Need help with calculation
Hello all,
I have a rather complex problem and I am in need of a little help. I am not as familiar with DAX as I would like to be, which may be the reason I can't seem to figure this out.
My data set has:
- Different offices w/ an office code
- This office code is part of a larger code used in different proposal codes
- There is a regional vs. national tag for contributions to specific proposals
I need to make a list of proposals that a specific office made to themselves at a regional level. I was going to do this via a CONTAINS statement. Since the proposal code has the office code in it, if the office code had an exact match in the proposal code, then I would have the list I need. However, I have not been able to get this to work.
Any help would be appreciated on this!
- Anonymous2 years ago
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure = MAXX( FILTER(ALL(Table2), CONTAINSSTRING( 'Table2'[proposal codes],MAX('Table1'[office code]))=TRUE()),[Regional])2. Result:
If the results don't meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
2 Replies
- parry2kSuper User
Anonymous It will be easier if you post some data with the expected output. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - AnonymousNot applicable
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure = MAXX( FILTER(ALL(Table2), CONTAINSSTRING( 'Table2'[proposal codes],MAX('Table1'[office code]))=TRUE()),[Regional])2. Result:
If the results don't meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly