Forum Discussion
sqlguru448
6 years agoHelper III
Complex Dax Measure - Help Needed
Hello Folks, I have a complex requirement in Power BI reporting which is sourced from Azure Analysis Services Tabluar Model via Live Connection. I cannot change the Tabular model, so the measure ...
sqlguru448
6 years agoHelper III
Anonymous I am implementing the measure in Power BI desktop.
basically I am trying to mimic below SQL code from the view
-- get specifc product which starts with 'Toys%'
Select * into ##Toys From vwSales_Fact
where Product like 'Toys%'
-- get specifc Product which starts with 'stat%'
Select * into ##stat From vwSales_Fact
where Product like 'stat%'
Select R1.*, From ##Toys r1
inner join ##stat E1 on r1.customer_ID= E1.customer_ID and r1.Location_ID= E1.Location_ID
and r1.state= E1.state
And datediff(dd,r1.purchase_date,E1.purchase_date) <=90
Anonymous
6 years agoNot applicable
sqlguru448
Yeah, I understand but the description you gave at the beginning of the thread does not really correspond to the SQL. At the beginning you're talking about matching on specific products, not about a hazy match on some products.
Please think carefully about the phrasing of the problem and then post it here. The more info you'll include (maybe some pictures as well), the better chance that you'll get a good answer.
I do understand the SQL, of course, but I want to know how entities are mapped to your PBI model.
Yeah, I understand but the description you gave at the beginning of the thread does not really correspond to the SQL. At the beginning you're talking about matching on specific products, not about a hazy match on some products.
Please think carefully about the phrasing of the problem and then post it here. The more info you'll include (maybe some pictures as well), the better chance that you'll get a good answer.
I do understand the SQL, of course, but I want to know how entities are mapped to your PBI model.
- sqlguru4486 years agoHelper III
Anonymous apologies for incorrect statements, instead of same products it should be specific products. I have corrected my initial post.
- Anonymous6 years agoNot applicablesqlguru448
Still, your formulation of the problem does not let anyone solve this. When you say that some products are to be considered with some other products, you have to state how one product is connected to another. If you have groups of products that should trigger the logic, then you have to tell us exactly what the association is.
Please re-think how you'd like to phrase the problem because right now it's not possible to give you any answer.