Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a query that runs like this:
SELECT H.TKT_DAT,
L.ITEM_NO
FROM VI_PS_DOC_HDR H JOIN VI_PS_DOC_LIN L ON H.DOC_ID = L.DOC_ID
JOIN PO_VEND P ON L.ITEM_VEND_NO = P.VEND_NO
WHERE H.TKT_TYP = 'T' AND H.DOC_TYP = 'T' AND H.DEP_ONLY_TKT='N' and L.LIN_TYP IN ('S','R')
When I run it in SQL Management Studio, it outputs only 2 items. But if I run in Power BI it outputs several items.
And even if I output only H.TKT_DAT in the Power BI Visual table, it shows 4 items.
I already checked the Power BI relationship of the tables and it seems to be correct. The only difference is the filter in selection of L.LIN_TYP is only "S" because there's no "R" in the row data.
Hi @jhonKy0t ,
I'm guessing you have Include relationship columns checked, and it will return all the associated data.
Please uncheck the box to try.
Please feel free to correct me and provide more information if I have misunderstood you!
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
It just outputs the number of rows in each of the date
@jhonKy0t , Try a measure like this
Calculate( Countrows(Summarize(VI_PS_DOC_LIN , VI_PS_DOC_HDR [TKT_DAT], VI_PS_DOC_LIN[ITEM_NO])), filter(VI_PS_DOC_HDR , [TKT_TYP] = "T" && [DOC_TYP] = "T" && [DEP_ONLY_TKT]="N"), filter(VI_PS_DOC_LIN, VI_PS_DOC_LIN[LIN_TYP] in {"S", "R"}))
Assuming line table is on many side
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |