Add currently selected slicer selection to calculated table

Basically I’m using the technique learned in Sam’s Financial Reporting with Power BI course so I’m using manually created account hierarchy templates. It all works fine up until the point where I need this to be dynamic depending on the Business Unit which is selected in a slicer.

Basically I have a data table from ERP with loads of accounts per Business Unit

Then I have the manually created Excel with the Template. It contains 2 columns. One for Business Unit and one for the accounts which should be shown (Note that there are accounts in the Data table which should not be shown and are therefore not included in the Template Excel)

What I do now is I create a calculated table using DAX in which i combine data from the two tables above. All good so far. What I also need in the calculated table is a column which shows the currently selected business unit and this is where I struggle.

Attached excel file shows some sample data which hopefully makes my explanation a bit cleared

calc table.xlsx (19.4 KB)

Hi @PascalKiefer, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.

  • When posting a topic with formula make sure that it is correctly formatted to preformated text </>.

  • Use the proper category that best describes your topic

  • Provide as much context to a question as possible.

  • Include demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline https://forum.enterprisedna.co/t/how-to-use-the-enterprise-dna-support-forum/3951. Not adhering to it may sometimes cause delay in getting an answer.

Hi Pascal,

Just to add to the above. If you can provide more information like suggested in the bullet points then I’m sure we can get some support for you on this.

Thanks
Sam

Hi Sam

Thanks for that. I was rethinking the topic and found the solution myself.
So now I have the template which dynamically shows the accounts depending on which Business Unit has been selected and it works like a charm :slight_smile: