Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I have 2 tables
Table A
Equipment | Parent | Code |
GSC0B | 107428 | 107501 |
GSC0V | 107428 | 107500 |
GSC7S | 107503 | 107504 |
GSCA3 | 107508 | 107506 |
GSCAE | 107499 | 107498 |
GSCBD | 107509 | 105921 |
GSCC6 | 107511 | 107510 |
GSCFV | 107502 | 107503 |
GSCIP | 107505 | 107508 |
GSCJ5 | 107507 | 107499 |
GSCJW | 107428 | 107509 |
GSCL2 | 107428 | 107511 |
GSCNZ | 107501 | 107502 |
GSCSF | 107501 | 107505 |
GSCZG | 107501 | 107507 |
GSCZY | 107428 | 107497 |
GSC1T | 107427 | 340979 |
GSC7T | 107501 | 107516 |
GSCAH | 107500 | 107522 |
GSCBG | 107504 | 107520 |
GSCCD | 107506 | 107523 |
GSCEQ | 107498 | 107524 |
GSCGX | 105921 | 107517 |
GSCHI | 107510 | 107526 |
GSCJN | 107427 | 107515 |
GSCM9 | 107427 | 107514 |
GSCNF | 107427 | 107513 |
GSCRU | 107427 | 107512 |
GSCV0 | 107519 | 107521 |
GSCVV | 107525 | 107519 |
GSCXV | 107518 | 107525 |
GSCZT | 107427 | 107518 |
Table B
Equipment |
GSC0B |
GSC0V |
GSC7S |
GSCA3 |
GSCAE |
GSCBD |
GSCC6 |
GSCFV |
GSCIP |
GSCJ5 |
GSCJW |
GSCL2 |
GSCNZ |
GSCSF |
GSCZG |
GSCZY |
GSC1T |
GSC7T |
GSCAH |
GSCBG |
GSCCD |
GSCEQ |
Table C
( Table A[Equipment] * -----1 Table C[Equipment])
Equipment | Parent | Size | brand |
GSC0B | 107428 | 12 | HP |
GSC0V | 107428 | 13 | DELL |
GSC7S | 107503 | 14 | HP |
GSCA3 | 107508 | 15 | DELL |
GSCAE | 107499 | 16 | HP |
GSCBD | 107509 | 17 | DELL |
GSCC6 | 107511 | 18 | HP |
GSCFV | 107502 | 19 | DELL |
GSCIP | 107505 | 20 | HP |
GSCJ5 | 107507 | 21 | DELL |
GSCJW | 107428 | 22 | HP |
GSCL2 | 107428 | 23 | DELL |
GSCNZ | 107501 | 24 | HP |
GSCSF | 107501 | 25 | DELL |
GSCZG | 107501 | 16 | HP |
GSCZY | 107428 | 17 | DELL |
GSC1T | 107427 | 18 | HP |
GSC7T | 107501 | 19 | DELL |
GSCAH | 107500 | 20 | HP |
GSCBG | 107504 | 21 | ASC |
GSCCD | 107506 | 22 | RVN |
GSCEQ | 107498 | 23 | VDE |
GSCGX | 105921 | 24 | DELL |
GSCHI | 107510 | 25 | HP |
GSCJN | 107427 | 25 | ASC |
GSCM9 | 107427 | 25 | RVN |
GSCNF | 107427 | 25 | VDE |
GSCRU | 107427 | 25 | DELL |
GSCV0 | 107519 | 25 | HP |
GSCVV | 107525 | 25 | ASC |
GSCXV | 107518 | 25 | RVN |
GSCZT | 107427 | 20 | VDE |
There is a slicer with the name of Equipment (Table B)
When a Equipment selected, here for example: Equipment: GSC0B in table A, the code is 107501, then I use this code to search in column Parent, the result is below but it takes like forever to load this table:
Nom_Equipement | Parent | Code_Barre | Size | brand |
GSCNZ | 107501 | 107502 | 24 | HP |
GSCSF | 107501 | 107505 | 25 | DELL |
GSCZG | 107501 | 107507 | 16 | HP |
GSC7T | 107501 | 107516 | 19 | DELL |
I use the following measure :
Flag =
var _a = ALLSELECTED('Table B'[Equipment])
var _b = SELECTCOLUMNS(FILTER(ALL('Table A'),[Equipment] in _a),"Code",[Code])
return IF(SELECTEDVALUE('Table A'[Parent]) in _b,1)
Final output:
Thank you in advance for any suggestion to reduce the loading time.
Tg
Hi @vnqt
You may try this measure. I hope it will perform faster.
Flag =
var _a = VALUES('Table B'[Equipment])
var _b = CALCULATETABLE(VALUES('Table A'[Code]),ALL('Table A'),'Table A'[Equipment] IN _a)
return
IF(SELECTEDVALUE('Table A'[Parent]) IN _b, 1, 0)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Thank you for your reply. Could you please share pbix cause I can't reproduce the same effect with your measure.
Here is the screenshot with 2 measure : Flag 1 and Flag 2 ( your suggested measure)
There is no result with second flag measure:
Here is the Relation of tables
Thank you for your help.
Tg
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
110 | |
109 | |
94 | |
61 |
User | Count |
---|---|
171 | |
139 | |
133 | |
103 | |
86 |