Forum Discussion
Alternate for my SQL query in DAX
Hi Guys,
for time being, let's forget about the Parameter AsOfDate, all I am looking for is the alternate query select query with left join using group by in it..
Kindly help me..
refined query
--------------
,cte_Allocation as
(
select distinct
cr.RemittanceCode,
sum(fa.AllocAmount_OC_A) as 'AllocationAmount_Orig',
sum(fa.AllocAmount_FC_A) as 'AllocationAmount_Func'
from
cte_Remittance cr /* <= A data-table is available in the same name in power bi */
left join Fact_Allocation fa
on cr.LedgerBalance_ID = fa.LedgerBalance_1_ID
group by
cr.RemittanceCode
)
Thanks a lot..
Prabhu_MDU can you send pbix file if it doesn't contain sensitive information and will do it for you, I guess cte table has one to many relationship with fact table?
- Prabhu_MDU7 years ago
Advocate I
sorry, I could not share the pbix file, since it has very sensitive data..
- parry2k7 years ago
Super User
basically you have to setupi relationship between cte and fact table in powerbi on common column and then everything should work.
I'm assuming cte to fact is one to many relationship.