I need a DAX formula ( calculated field) maybe FILTER () or CALCULATE () (not a expert in DAX that assign the correct High school (table: tabSBISD) to the correct address (table consolidatedOne).
I have 3 tables.
1) tabSBISD assigns schools from - to address. This able contains all the schools ,but assign them (from - to)
2) This table contains the street numbers and an index so I can crate relationships between 3 tables.
3 Contains the Address. Ineed to lookup the correct High school for each address.
This s a simple quer in SQL:
[SELECT ConsolidateOne.StreetNum, ConsolidateOne.StreetName, tabSBISD.[High School]
FROM (tabStreets INNER JOIN ConsoliatedOne ON tabStreet.StreetName=ConsolidatedOne.treetName) INNER JOIN tabSBISD ON tabStreets.StreetNam=abSBISD.Streetnme
WHERE (((tabSBISD.FromNumbe)<=[StreetNum]) AND abSBIS.ToNumber)>=[streetNum]))]
Thank you very much for your time
Marious
<!-- ######### Start Created Html Code To Copy ########## -->
DAX
<TBODY>
[TD="bgcolor: #cacaca, align: center"]4
[/TD]
[TD="bgcolor: #cacaca, align: center"]5
[/TD]
[TD="bgcolor: #cacaca, align: center"]6
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]100
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]50
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]7
[/TD]
[TD="align: right"]100
[/TD]
[TD="align: right"]300
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]55
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]8
[/TD]
[TD="align: right"]300
[/TD]
[TD="align: right"]3000
[/TD]
[TD="align: right"]3
[/TD]
[TD="align: right"]150
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]9
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]4
[/TD]
[TD="align: right"]325
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]10
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]2
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]11
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]2000
[/TD]
[TD="align: right"]600
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]12
[/TD]
[TD="align: right"]2000
[/TD]
[TD="align: right"]3000
[/TD]
[TD="align: right"]3
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]13
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]14
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]550
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
</TBODY>
Excel tables to the web >> Excel Jeanie HTML 4
<!-- ######### End Created Html Code To Copy ########## -->
I have 3 tables.
1) tabSBISD assigns schools from - to address. This able contains all the schools ,but assign them (from - to)
2) This table contains the street numbers and an index so I can crate relationships between 3 tables.
3 Contains the Address. Ineed to lookup the correct High school for each address.
This s a simple quer in SQL:
[SELECT ConsolidateOne.StreetNum, ConsolidateOne.StreetName, tabSBISD.[High School]
FROM (tabStreets INNER JOIN ConsoliatedOne ON tabStreet.StreetName=ConsolidatedOne.treetName) INNER JOIN tabSBISD ON tabStreets.StreetNam=abSBISD.Streetnme
WHERE (((tabSBISD.FromNumbe)<=[StreetNum]) AND abSBIS.ToNumber)>=[streetNum]))]
Thank you very much for your time
Marious
<!-- ######### Start Created Html Code To Copy ########## -->
DAX
* | A | B | C | D | E | F | G | H | I | J | K | L | M | N |
tabSBISD | * | * | * | * | tabStreet | * | * | ConsolidatedOne | * | * | * | * | * | |
StreetName | FromNumber | ToNumber | High School | * | ID | StreetName | * | StreetName | StreetNum | Calculated_Field | * | * | Correct Answer | |
First | SchoolName1 | * | First | * | First | * | * | SchoolName1 | ||||||
First | SchoolName2 | * | Second | * | First | * | * | SchoolName1 | ||||||
First | SchoolName3 | * | Third | * | First | * | * | SchoolName2 | ||||||
Third | SchoolName2 | * | Main | * | First | * | * | SchoolName3 | ||||||
Third | SchoolName3 | * | * | * | * | Main | * | * | SchoolName3 | |||||
Third | N/A | * | * | * | * | Main | * | * | SchoolName1 | |||||
Third | SchoolName | * | * | * | * | Main | * | * | SchoolName3 | |||||
Main | SchoolName3 | * | * | * | * | Third | * | * | * | |||||
Main | SchoolName1 | * | * | * | * | Third | * | * | SchoolName3 |
<TBODY>
[TD="bgcolor: #cacaca, align: center"]4
[/TD]
[TD="bgcolor: #cacaca, align: center"]5
[/TD]
[TD="bgcolor: #cacaca, align: center"]6
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]100
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]50
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]7
[/TD]
[TD="align: right"]100
[/TD]
[TD="align: right"]300
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]55
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]8
[/TD]
[TD="align: right"]300
[/TD]
[TD="align: right"]3000
[/TD]
[TD="align: right"]3
[/TD]
[TD="align: right"]150
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]9
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]4
[/TD]
[TD="align: right"]325
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]10
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]2
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]11
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]2000
[/TD]
[TD="align: right"]600
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]12
[/TD]
[TD="align: right"]2000
[/TD]
[TD="align: right"]3000
[/TD]
[TD="align: right"]3
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]13
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
[TD="bgcolor: #cacaca, align: center"]14
[/TD]
[TD="align: right"]500
[/TD]
[TD="align: right"]1000
[/TD]
[TD="align: right"]550
[/TD]
[TD="bgcolor: #ffff00"]*
[/TD]
</TBODY>
Excel tables to the web >> Excel Jeanie HTML 4
<!-- ######### End Created Html Code To Copy ########## -->
Last edited: