The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Users,
I have to create calculated column in source table where the result would be from look up table provided below.
I have to filter, CurrencyNamre = Source table "C" column, Financial year = Source table "A" column, Filter P1-P12 by Source table "B" column
Source table sample below.
Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
You can use calculated column by dax, but you need to unpivot your first table first. I suggest you use the following m query.
My sample data:
Then you can create a cutom function in m-query:
= (X,Y,Z) =>Record.Field(Table{[FY = X,Currency = Y]},Z)
You can use the function to add custom column in query editor:
For more details, please refer to the pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
You can use calculated column by dax, but you need to unpivot your first table first. I suggest you use the following m query.
My sample data:
Then you can create a cutom function in m-query:
= (X,Y,Z) =>Record.Field(Table{[FY = X,Currency = Y]},Z)
You can use the function to add custom column in query editor:
For more details, please refer to the pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai