Forum Discussion
how to implement subquery in power bi
- 5 years ago
Hi fmariesh ,
Based on the understanding of your requirement, I have created the Fact and Dimension tables and connected them based in Currency table.
Also created a new date table based on standard M query and also related them based on which you will be able to filter out ypur records.
For the multiplication I created a new calculated column using the below DAX:
column = FactContractDetails[Txn Amount] * LOOKUPVALUE('Backlog DimUSDExchangeRates'[Value],'Backlog DimUSDExchangeRates'[Curr],FactContractDetails[Curr])Here is the pbix file which might be helpful for you.
fmariesh
As PC2790 said, those queries can be achieve in Power BI, but not in statements format. It can only be achieved step by step, using both power query editor and power bi desktop.
And to calculate for each year, you can create dax column something like:
column = calculate(sum(amount),allexept(table,[Year]))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.