- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

DAX Query Assistance Required
Hello - I need to add a condition to the following DAX formula. Could you provide any suggestions?
```DAX
If Table 2_Check = Location or Place then check
LEN('TABLE_1'[From_Sector] ) = 3 &&
LEN('TABLE_1'[To_Sector] ) = 3 &&
DATEVALUE('TABLE_1'[DepDate]) &&
DATEVALUE('TABLE_1'[ArrDate]) &&
'TABLE_1'[Basis] <> BLANK() &&
LEN('TABLE_1'[Rbd] ) = 1 &&
LEN('TABLE_1'[Code] ) = 2 &&
'TABLE_1'[Miles] <> BLANK(),
"Valid",
If Table 2_Check = Non-Location then check
IF(
LEN('TABLE_1'[From_Sector] ) = 3 &&
LEN('TABLE_1'[To_Sector] ) = 3 &&
DATEVALUE('TABLE_1'[DepDate]) &&
DATEVALUE('TABLE_1'[ArrDate]) &&
LEN('TABLE_1'[Rbd] ) = 1 &&
LEN('TABLE_1'[Code] ) = 2 &&
"Valid","Error")
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

it's better to provide some sample data and expected output.
based on the coding you provided
If Table 2_Check =" Location" || Table 2_Check ="Place", if xxxx
and there is something wrong with the last part
LEN('TABLE_1'[Code] ) = 2 &&
"Valid","Error")
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

it's better to provide some sample data and expected output.
based on the coding you provided
If Table 2_Check =" Location" || Table 2_Check ="Place", if xxxx
and there is something wrong with the last part
LEN('TABLE_1'[Code] ) = 2 &&
"Valid","Error")
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 03-25-2024 09:08 PM | ||
10-05-2024 04:15 AM | |||
09-06-2024 04:23 AM | |||
07-12-2024 06:05 AM | |||
05-10-2024 05:46 AM |
User | Count |
---|---|
90 | |
80 | |
58 | |
46 | |
40 |
User | Count |
---|---|
115 | |
81 | |
81 | |
52 | |
39 |