The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi.
The issue I am facing is filtering a table based on another tables values i.e. date, wholenumber etc. see example:
The table A is unchanging table (the reference).
The calculation is about how to make Table B show only "Litra" shown in A with same with same "Fokus Gruppen" items as Fejlgruppe in B. Additionally, the Date must be "same or newer" than the one shown in Table A.
I tried some calculate() functions, but it ended circular calculation error.
anyone had this problem and solved?
thanks
Solved! Go to Solution.
HI @Anonymous ,
I'd like to suggest you write measure to compare records between two table and apply it on 'visual level filter' to filter unmatched records.
Sample:
Measure = VAR temp = SELECTCOLUMNS ( ALLSELECTED ( TableA ), "Litra Fokus", [Litra] & " " & [Fokus gruppen] ) VAR currLitra = SELECTEDVALUE ( TableB[Litra] ) VAR currFokus = SELECTEDVALUE ( TableB[Fokus gruppen] ) RETURN IF ( currLitra & " " & currFokus IN temp, "Y", "N" )
You can use above measure formula on 'TableB' 'visual level filter' to filter 'Y' result.
Regards,
Xiaoxin Sheng
HI @Anonymous ,
I'd like to suggest you write measure to compare records between two table and apply it on 'visual level filter' to filter unmatched records.
Sample:
Measure = VAR temp = SELECTCOLUMNS ( ALLSELECTED ( TableA ), "Litra Fokus", [Litra] & " " & [Fokus gruppen] ) VAR currLitra = SELECTEDVALUE ( TableB[Litra] ) VAR currFokus = SELECTEDVALUE ( TableB[Fokus gruppen] ) RETURN IF ( currLitra & " " & currFokus IN temp, "Y", "N" )
You can use above measure formula on 'TableB' 'visual level filter' to filter 'Y' result.
Regards,
Xiaoxin Sheng
Hi,
Seems I have problem with adding date filter aswell.
So for dates above or equal the listed date in Fokustog must be shown, since it is a "focus".
However, I cannot make it work.
Gentaget = VAR temp = SELECTCOLUMNS ( ALLSELECTED ( Fokustog ); "Litra"; [Litra] & " " & [Fokus gruppen];"Dato"; [Dato] ) VAR currLitra = SELECTEDVALUE ( 'TCI2-ER'[Litra] ) VAR currFokus = SELECTEDVALUE ( 'TCI2-ER'[Fejlgruppe] ) VAR currdato = SELECTEDVALUE ( 'TCI2-ER'[Dato] ) RETURN IF ( currLitra & " " & currFokus & " " & CALCULATE(currdato;currdato >= Fokustog[Dato]) IN temp; "JA"; "NEJ" )
User | Count |
---|---|
161 | |
111 | |
96 | |
87 | |
75 |
User | Count |
---|---|
158 | |
136 | |
133 | |
81 | |
61 |