Forum Discussion
Cannot relate tables
- 2 years ago
Hi,
In the attached PBI file, create a single column table of all unique products from Dollar and Qty tables. Create a Many to One relationship from Dollar and Qty tables to this new product table. To your visual, drag Product from the new table.
Hope this helps.
- Anonymous2 years ago
Hi Oros ,
I updated your sample pbix file(see the attachment), please find the details in it.
1. Delete the relationship between tables
2. Create a calculated column as below
Column = VAR _invoiceqty = CALCULATE ( SUM ( 'INVOICE QTY'[QTY INVOICED] ), FILTER ( 'INVOICE QTY', 'INVOICE QTY'[PRODUCT] = 'SALES TABLE'[PRODUCT] ) ) VAR _maxpdate = CALCULATE ( MAX ( 'CREDIT QTY'[POSTING DATE] ), FILTER ( 'CREDIT QTY', 'CREDIT QTY'[PRODUCT] = 'SALES TABLE'[PRODUCT] ) ) VAR _creditqty = CALCULATE ( SUM ( 'CREDIT QTY'[QTY CREDITED] ), FILTER ( 'CREDIT QTY', 'CREDIT QTY'[PRODUCT] = 'SALES TABLE'[PRODUCT] ) ) RETURN IF ( ISBLANK ( _creditqty ), BLANK (), IF ( 'SALES TABLE'[POSTING DATE] = _maxpdate, _invoiceqty + _creditqty ) )Best Regards
No file there.
HI Ashish_Mathur ,
My apology, I change the link. Thanks.
https://www.sendbig.com/view-files/?Id=cc1d8b88-17eb-6b08-49dd-9526cde7879e
- Ashish_Mathur2 years agoSuper User
Hi,
In the attached PBI file, create a single column table of all unique products from Dollar and Qty tables. Create a Many to One relationship from Dollar and Qty tables to this new product table. To your visual, drag Product from the new table.
Hope this helps.
- Oros2 years agoPost Prodigy
- Ashish_Mathur2 years agoSuper User
You are welcome.