Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am new to this forum and happy to be part of the community!
I have put a link to an excel file in one drive for what I am trying to get in Power BI. I need to get the allocation by adding a column to the table in the data model (The table is the sheet 'Before'). The column to be added to the data model is Allocation by month in the sheet 'After'.
The aim is to allocate ADMIN DIRECT to the direct channels (Door to door & Mail order Underlined in blue) taking into account the initial account repartion and an allocation percentage by Channel (in the column Alloc %).
Since in the raw data, the days with Admin Direct amount are not necessarily on the same day than other direct channel line, the repartition needs to be done at the month level.
The same logic is to be applied to ADMIN INDIRECT into the Indirect channels wholesale, department store, retail (Underlined in orange).
Thanks,
Solved! Go to Solution.
Hi, @PowerEti
You need to enter a table like :
Then you can try formula like:
Alloc % = RELATED('Alloc Table'[Alloc%])
Admin = RELATED('Alloc Table'[ADMIN])
Alloc by date = CALCULATE(SUM( 'Table'[Amount]),ALLEXCEPT('Table','Table'[Date],'Table'[Account],'Alloc Table'[ADMIN]))*'Table'[Alloc %]+0
Alloc by month =
var a=CALCULATE(SUM( 'Table'[Amount]),ALLEXCEPT('Table','Table'[Month],'Table'[Account],'Alloc Table'[ADMIN]))*'Table'[Alloc %]+0
return IF(DAY('Table'[Date])=1,a,BLANK())
result:
Best Regards,
Community Support Team _ Eason
Hi,
Thanks a lot for solution! Used in my model and it works!!! The only problem is that it takes only single month a
My model is based on Calendar.Date, BUBA - is conc of BU(business unit) and BA(business area) and formulas which I use are
The goal is to allocate amounts of BU COMM to other BU based on coefficient from related table (
Could you please advise what to do with formula?
Thank you in advance and best regards,
Victoria
Hi, @PowerEti
You need to enter a table like :
Then you can try formula like:
Alloc % = RELATED('Alloc Table'[Alloc%])
Admin = RELATED('Alloc Table'[ADMIN])
Alloc by date = CALCULATE(SUM( 'Table'[Amount]),ALLEXCEPT('Table','Table'[Date],'Table'[Account],'Alloc Table'[ADMIN]))*'Table'[Alloc %]+0
Alloc by month =
var a=CALCULATE(SUM( 'Table'[Amount]),ALLEXCEPT('Table','Table'[Month],'Table'[Account],'Alloc Table'[ADMIN]))*'Table'[Alloc %]+0
return IF(DAY('Table'[Date])=1,a,BLANK())
result:
Best Regards,
Community Support Team _ Eason
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |