Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LeaRupnik
Helper III
Helper III

How to apply where condition

I have table tets

IDnamefil
1a1
2b2
3c2

 

i would like to get like this Select * from test where fil = 2

name

name
b
c

 

Thanks 

LP

LEa

11 REPLIES 11
Tahreem24
Super User
Super User

@LeaRupnik ,

 

Or You can also create a field like below:

Column=CALCULATE(VALUES(Table1[Name]),Table1[Fill]=2)
 
Don't forget to hit THUMBS UP and mark it as a solution if it helps you!
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

sorry is work, now i have a quastion about 

How i create 1 new table with some where condition in another table. 

tableTest = SELECTCOLUMNS(ORGANIZACIJA;"PARENT_ID";ORGANIZACIJA[PARENT_ID];"ID";ORGANIZACIJA[ID];"i";1)
 
where condition is from another known table. 
 
thanks
Lea

@LeaRupnik ,

 

For extracting values from different table use the RELATED function with column name of another table.

 

Don't forget to hit THUMBS UP and mark it as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Jes bat where i have tu incude this. 

I create tem table from another table and i have distinct tihi tam table from jon sam key from another table. 

Table1 = SELECTCOLUMNS(ORGANIZACIJA;"PARENT_ID";ORGANIZACIJA[PARENT_ID];"ID";ORGANIZACIJA[ID];"i";1)

 

Table2 --> PAKIRNAO - KEY  from pakirano is ORG with ORGANIZACIJA with key ORG. 

 

Lp

LEa

Hi @LeaRupnik ,

I'm a little confused by your description. Do you want results similar to the following:

31.PNG32.PNG

You can use Fiter function and Allexcept function, here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EQtYTLC_n5RPoJMr85...

If not your case, kindly share your sample data and expected result if you don't have any Confidential Information. 

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My problem is laki this  a have table Organization and packing, how a create a new table lake table1.

Organization    packing    table1  
idfirmaorg   nameorg   idfirma org
1121   a31   1121
21A30   b21   21151
31151   a31      
411b2   b11      
      c11      
      s27      
      f51      
      b51      

 

Lp

Lea

Hi @LeaRupnik ,

It seems that table1 is not directly related to table packing and table Organization. Can you share the calculation logic of the second row in table1 with id = 2, firma = 11, org = 51?

1.PNG

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

WITH TEMP (PARENT_ID, ID, i) AS
(
SELECT
PARENT_ID,
ID,
1
FROM
DW.ORGANIZACIJA
WHERE
PROGENOT IN (SELECT DISTINCT PROGENOT FROM DW.PAKIRANO)
UNION ALL
SELECT
A.PARENT_ID,
A.ID,
i + 1
FROM
DW.ORGANIZACIJA A,
TEMP T
WHERE
T.PARENT_ID=A.ID
AND A.PARENT_ID IS NOT NULL
AND i < 1000
)
SELECT
DISTINCT
'SISTEMIMPOL' CONCAT ORG1.PROGENOT as parent_id,
ORG1.ORGENOTA AS PARENT,
'SISTEMIMPOL' CONCAT ORG2.PROGENOT as child_id,
ORG2.ORGENOTA AS CHILD,
TEMP.PARENT_ID AS RAZVRSTI_PARENT_ID,
TEMP.ID AS RAZVRSTI_CHILD_ID
FROM
TEMP
INNER JOIN DW.ORGANIZACIJA AS ORG1 ON TEMP.PARENT_ID=ORG1.ID
INNER JOIN DW.ORGANIZACIJA AS ORG2 ON TEMP.ID=ORG2.ID
ORDER BY
RAZVRSTI_PARENT_ID,
RAZVRSTI_CHILD_ID
;

 

this i have in sql. 

This

"Column=CALCULATE(VALUES(Table1[Name]),Table1[Fill]=2)" 

dosent work 

LP

Lea

@LeaRupnik ,

 

That works fine. (Screen shot is attached)

Capture.JPG

Don't forget to hit THUMBS UP and mark it as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Tahreem24
Super User
Super User

@LeaRupnik ,

 

Refer below screen shot.

Capture.JPG

 

Don't forget to hit THUMBS UP and mark it as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.