Forum Discussion
Slicer to Operate 2 tables
GREGBLACK Ensure that the relationships between your tables are correctly set up and active. Specifically, verify that the relationship between the NavTable and the Bridge_Acc_Owner table is active and correctly defined.
Make sure that the Account_owner values in the NavTable match the A/c Owner values in the Bridge_Acc_Owner table. Any mismatch or missing values could result in blanks.
To debug the DAX formula, you can create a simple measure to check the intermediate results.
DAX
SellerfromTrenderTableValue = 'Bridge_Acc_Owner'[A/c Owner]
DefaultSegmentValue =
CALCULATE(
SELECTEDVALUE('NavTable'[segment]),
FILTER(
'NavTable',
'NavTable'[Account_owner] = 'Bridge_Acc_Owner'[A/c Owner]
)
)
Use LOOKUPVALUE: Instead of CALCULATE and FILTER, you can use LOOKUPVALUE to directly fetch the segment value
DAX
Teams =
VAR SellerfromTrenderTable = 'Bridge_Acc_Owner'[A/c Owner]
VAR DefaultSegment =
LOOKUPVALUE('NavTable'[segment], 'NavTable'[Account_owner], SellerfromTrenderTable)
RETURN
SWITCH(
TRUE(),
SellerfromTrenderTable IN {"1","2", "3"},"DACH Local Govt",
SellerfromTrenderTable IN {"4","5","6"} ,"DACH Federal Govt",
DefaultSegment
)
hi--i have played around with the dax and now i am getting blanks where an account owner has accoutns in several segments--each accutn has a unique navid and segment but the dax can't seem to associate the segment to the navid
this is my revised dax:
SWITCH(
TRUE(),
SellerfromTrenderTable IN {"1","2", "3"},"DACH Local Govt",
SellerfromTrenderTable IN {"4","5","6"} ,"DACH Federal Govt",
NOT(ISBLANK(DEFAULTSEGMENT)),DEFAULTSEGMENT)
How can i make sur that even if an account oner has several accounts spread across multiple segments that the dax returns the segment at the navid level
- v-aatheeque1 year ago
Community Support
Hi GREGBLACK ,
Modify the DAX with reference to the specific NAVID when calculating the segment.
below is the revised DAX measure :Teams = VAR SellerfromTrenderTable = LOOKUPVALUE( Trender[A/c Owner], Trender[A/c Owner], Bridge_Acc_Owner[A/c Owner] ) -- Retrieve NAVID for the current row VAR CurrentNAVID = SELECTEDVALUE('NAV TABLE'[NAVID]) -- Get segment at NAVID level to ensure uniqueness VAR DefaultSegment = CALCULATE( SELECTEDVALUE('NAV TABLE'[Segment]), 'NAV TABLE'[NAVID] = CurrentNAVID ) RETURN SWITCH( TRUE(), SellerfromTrenderTable IN {"1", "2", "3"}, "DACH Local Govt", SellerfromTrenderTable IN {"4", "5", "6"}, "DACH Federal Govt", NOT ISBLANK(DefaultSegment), DefaultSegment )
Hope this helps !If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
- v-aatheeque1 year ago
Community Support
Hi GREGBLACK ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!Thank you!
- v-aatheeque1 year ago
Community Support
Hi GREGBLACK ,
Has your issue been resolved? If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!